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

Build a multi-release and provide a module descriptor #85

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

A248
Copy link
Contributor

@A248 A248 commented Apr 8, 2021

Uses multi-release jars to add full module-info support. Placing module-info inside META-INF/versions/ is the same approach taken by HikariCP and Log4jJ. Some other libraries like Gson and Lombok simply put it in the root of the jar, but seeing as this library supports JDK 6, care has to be taken to preserve compatibility.

JDK 11 will be required to build argon2-jvm. To ensure compatibility, the --release flag is used to prevent calls to newer API methods, which also improves compatibility if you were already building on a newer JDK.

This is marked as a draft for now because there is still one issue with the build process I need to work out. Besides module-info.class, every other class is duplicated in META-INF/versions/11, which can be observed with cd argon2-jvm-nolibs/build/libs && unzip argon2-jvm-nolibs-2.11-SNAPSHOT.jar. I'll keep wrestling with gradle unless someone else knows a solution.

Another factor I will investigate is the relation between JNI resources and JPMS. Also, I'm thinking about adding more compatibility tests besides the current one. If one is not careful, adding module-info sometimes breaks features when running on the module path.


As an unrelated suggestion, have you considered changing the default branch of the repository to master? A previous project I worked on had a non-default dev branch to target PRs to, but it happened several times that PRs were made and even merged to the main/master branch.

Update CI and CONTRIBUTING with JDK 11 requirement
@A248 A248 marked this pull request as ready for review April 24, 2021 14:43
@A248 A248 changed the title Build a multi-release Build a multi-release and provide a module descriptor Apr 24, 2021
@A248
Copy link
Contributor Author

A248 commented Apr 24, 2021

@phxql Looks like this is ready

@phxql phxql self-assigned this Apr 26, 2021
@phxql
Copy link
Owner

phxql commented Apr 30, 2021

This works like a charm, thanks a lot for your effort!

@phxql phxql merged commit ea95916 into phxql:develop Apr 30, 2021
phxql added a commit that referenced this pull request Apr 30, 2021
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