-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use JVM Toolchain #32
base: main
Are you sure you want to change the base?
Conversation
Thanks, @StefMa, for submitting this PR! |
Hey @hartmut-co-uk, any chance to have a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @StefMa for picking this up again! I'm happy with this feature.
There's one detail that worries me - the volume of gradle dependencies cached jumps from 170MB to 356MB (due to the JDK...). So the data volumes written and read from cache is higher, also the JDK is downloaded with each and every workflow run.
But maybe that's generally a misconfiguration here?
Thank you very much for the contribution and apologies for the delay! π
Let's wrap this up quickly!
Co-authored-by: Hartmut <info@hartmut.co.uk>
I don't get this π€ Normally, it should write it to the cache but not downloading again (but fetched from cache). |
β Type of change
π Description, Motivation and Context
This PR moves the JVM Version selection from the machine to the build time.
With that change, Gradle makes sure that the code will be compiled with the configured JVM ersion (21) from the configured vendor (Corretto/Amazon).
There is "no need" to install a specific JVM version on CI or your dev machine.
You only need "a" JVM installation that can start Gradle.
Gradle will detect that the configuration say it should compile the code with Java 21/Corretto, it will install the respective toolchain and use that to compile the code and run tests with that.
More information can also be found here:
https://docs.gradle.org/8.6/userguide/toolchains.html
π§ͺ How Has This Been Tested?
Remove your locally installed JVM version (21/Corretto).
Then use another JVM version and kick of Gradle (
./gradlew check
).Wihin the configuration phase you will see an output like this:
Indicating that the requested toolchain (was donwloaded) and now installing on the machine for later usage.
π Checklist