Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Automatic-Module-Name attribute #1375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hubertp
Copy link

@hubertp hubertp commented Sep 25, 2024

As it stands, Java 9 Platform Module System cannot infer module name from shapeless' jars due to cross compilation (underscores in _2.xx).
This simple change adds an Automatic-Module-Name attribute to MANIFEST, making it possible to require shapeless modules, rather than going through various repackaaging hacks.
A proper modularization would include definition of module-info.java but that's outside the scope.

As it stands, Java 9 Platform Module System cannot infer module
name from shapeless' jars due to cross compilation (underscores
in `_2.xx`).
This simple change adds an `Automatic-Module-Name` attribute to
MANIFEST, making it possible to require `shapeless` modules, rather than
going through various repackaaging hacks.
A proper modularization would include definition of `module-info.java`
but that's outside the scope.
@hubertp
Copy link
Author

hubertp commented Oct 14, 2024

Any problem with this PR? This should unblock anyone who wants to use shapeless as a Java module, with a minimal effort.

.settings(moduleName := "shapeless")
.settings(
moduleName := "shapeless",
javaModuleName := "shapeless.core"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should use just shapeless for this one? Shapeless 2 is not really modular, the plugin and scratch are not published artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants