Gradle Project shall use the Java from the tooling not runtime.
Gradle Java tooling is the recommended way to set the Java version for source sets since provably version 7.x. Java Tooling has been introduced in Gradle 6.7. In order to be able to split the Java compilation form the java runtime.
NetBeans haven't respected the tooling version from Gradle so far, rlied on that people would use the same tooling as runtime. This really needed to be fixed.
The Java Dependencies node in Java projects was removed.
The Java Platform is displayed per source group in the project Properties Sources:
Did some limited testing on Java 20, and Java 21 as toolchains with Gradle 8.3 and Gradle 8.4 running NetBeans with Java 21
I wonder if some more integration with NB IDE would be useful: suggest to install gradle-detected JVMs as java platforms into the IDE, or pass Java platforms configured in the IDE to the gradle build to choose from.
please make sure that tests don't start to install JDKs
edit: what i mean by that is that existing tests should not suddenly start setting up their own env
please make sure that tests don't start to install JDKs
edit: what i mean by that is that existing tests should not suddenly start setting up their own env
This PR has no effect on the existing tests.
Would it be possible to retain the java platform node, provided that all source groups share the same JDK setting ? Removal would make the project view inconsistent compared to Maven project view -- there is also "Java Depenendencies" node that shows the JDK.
Well, @sdedic I've put that node back.
Thanks !
It seems the paperwork check needs #7117
The build is finally green now. If no one objects, I'm going to merge this tomorrow!