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

Add support for multi-release Jar files #2724

Closed
wants to merge 2 commits into from

Conversation

Flowdalic
Copy link
Contributor

@Flowdalic Flowdalic commented Sep 7, 2023

If the user configures javacOptions to include Seq("--release", "17"), for example, then multi-release Jar files will be opened and processed accordingly.

Mill not being able to consume multi-release Jar files is leading to superfluous warnings because of code paths for older JREs being used.

If the user configures javacOptions to include Seq("--release", "17"),
for example, then multi-release Jar files will be opened and processed
accordingly.
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

I think dropping Java 8 support for such an rarely used feature is not an option.

As discussed in the chat, adding a Multi-Release: true header to the manifest of the assembly jar is enough to let the JVM recognize the incorporated multi-release jars.

@lefou lefou marked this pull request as draft September 8, 2023 13:07
@Flowdalic
Copy link
Contributor Author

Right, I am not even convinced that the approach of this PR is sensible. You probably want the Multi-Release classes even if you build with --release, in case there are variants for releases newer than specified and you execution JVM supports this newer release.

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