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

[#228] build with Java 11 #229

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bmarwell
Copy link
Contributor

@bmarwell bmarwell commented Feb 8, 2024

Fixes #228

This PR shows that Java 9+ methods were already used and the Java 8 bytecode uses Java 9+ APIs. This can be fixed by using Multi-Release-JARs.

I think it is related to this README sentence:

Note that moduleInfoSource and moduleInfoFile can be used on Java 8, allowing to add a Java 9 module descriptor to your JAR also if you did not move to Java 9 for your own build yet. moduleInfo can only be used on Java 9 or later.

While module-info.class files can be Java 8 compilations, I don't think we should just throw in Java 9 APIs into Java 8 bytecode (this plugin).

@bmarwell
Copy link
Contributor Author

bmarwell commented Feb 8, 2024

I added a second commit which adds MR-Jars. Interestingly, now the NPE from #91 and #216 is easily visible.

@bmarwell bmarwell force-pushed the #228_java11_build_to_java8-release branch from 7c372d7 to 4ece2e6 Compare February 8, 2024 07:20
@bmarwell bmarwell marked this pull request as draft February 8, 2024 07:57
@bmarwell
Copy link
Contributor Author

bmarwell commented Feb 8, 2024

@bmarwell bmarwell force-pushed the #228_java11_build_to_java8-release branch from 4ece2e6 to ed500cb Compare February 8, 2024 08:50
@bmarwell bmarwell marked this pull request as ready for review February 8, 2024 08:50
Fixes moditect#228

This PR shows that Java 9+ methods were already used and the Java 8 bytecode uses Java 9+ APIs.
This can be fixed by using Multi-Release-JARs.
Really fixes moditect#228.
This will also show the NPE everyone is talking about in moditect#91.
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.

[BUILD] update build to require Java 11+ for building
1 participant