Open hfhbd opened 4 months ago
The build JDK should always be the newest. The source and target bytecode version should be the minimum supported version. Toolchains should only be used for testing on old JDKs or running tools that don't work on modern JDKs.
This feature is about the JVM used by the daemon itself, not about the JVM used for compiling, although without specifying the compiling tasks, it's the same JVM, but we do specify the compiler options.
Yeah but then this forces the use of JDK 11 which is ancient. I should be able to use any JDK from 11-22. 22 is my default, and anything that uses a toolchain, aside from for testing purposes, will waste my disk space and RAM for worse performance.
We can also use 22, but we already use the toolchains feature for compiling with Java 11 and for testing with Java 20
If you want to drop toolchains for compiling, we also should add test with JVM 11.
That would be my preference. One should be able to compile on any JDK newer than or equal to our minimum, and we should be testing on the latest + the minimum... uh... at minimum.
There is a new feature from Gradle 8.8 to use the jvm toolchain feature for the daemon: https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:daemon_jvm_criteria
And why do we use 21 in builds, but 11 in releases?