-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add module-info.java #21
Comments
I guess #22 can close this one |
While adding an automatic module name solves some issues with building modular applications, it does not help with jlink. Jlink is used to create a custom stripped down runtime environment for modular applications. The purpose of a module-info file is to inform what module the jar declares (so that other modules can use it in This can be solved by providing a "real" module-info.class. This can be done in a multi-release jar, so that Java 8 applications can use the jar without problems, or by setting the minimum required JDK version to 9+. I would suggest setting the required JDK version to 11, as versions 9 and 10 are obsolete now and wherever still used, the update should only require setting the new version in the Maven POM/Gradle build file. While there might be projects still using Java 8, they could stay on version 1.3 of this library. I'd be willing to contribute a patch/PR to change minimal Java version to 11 and provide a module-info.java file if there's a chance that would be accepted and a new version 1.4 could be released. |
I think it would be good considering to have 2 branches, one to continue supporting java 8 (1.x.x) and other one to support java 11|17|21 (2.x.x). In that way bug-fixes will not be exclusive of java11 or newer |
@xavier-figueroa I created a minimal PR to add a real module-info. The patch retains java 6 compatibility. But projects downstream that want to be jlink compatible need a working module-info first, and I think not breaking backwards compatibility increases the chances of getting this in. |
When SparseBitSet is used as dependency, the parent project can't be processed by jlink, which rejects dependencies with automatic module names.
Adding
module-info.java
with this content could fix this:The text was updated successfully, but these errors were encountered: