-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure consistency for module-info.class files #8
Comments
Unfortunately, there is no good solution (I can think of) to implement it in this plugin. The ability to define the exact Java version is a missing feature in Gradle's toolchain support: I also reported the issue you have with module-info.class files a while back: gradle/gradle#28806 (comment) Feel free to upvote or comment on the Gradle issues. What we could still do in this plugin is:
|
I am still somewhat perplexed by this... So I guess its really absolutely not possible to not have the bugfix version appear in the class file? what does the minor version even do? |
This would be a question for the JDK folks. |
In the spec it says requires_version_index
My interpretation of that is that the value could be If we look at the source code of the Java compiler, the value is read from the Unfortunately, there is no option to tell the compile to ignore version values. I could imagine rewriting the I could imagine an option in Gradle core for that. 🤔 One could also do that in the build configuration or a (this?) plugin through an additional task action on JavaCompile. (Some folks might consider this "a dirty hack" though...) |
I think you "can" query these generated versions at runtime using ModuleDescriptor#requires#compiledVersion/rawCompiledVersion. So its technically visible meta-info, but I am not aware of anyone doing anything with this information |
I just had the realization that for whatever reason the javacompiler compiles the minor java version into the module-info.class, therefore making the build unreprodible unless on has exactly the same java version...
The text was updated successfully, but these errors were encountered: