Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
β 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