RFR: 7903136: Don't require jdk18_home to be set in jextract gradle build

Brice Dutheil duke at openjdk.java.net
Tue Mar 29 09:41:06 UTC 2022


On Mon, 28 Mar 2022 16:02:21 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Drop the requirement to set `jdk18_home` in the gradle build, and rely instead on `JAVA_HOME` being set to JDK 18.
> 
> I've also updated the build instructions. The `-Pjtreg_home` flag seems to have been dropped by accident from the test command. I've re-added it. Also renamed `libclang_dir` -> `llvm_dir` which was missed in an earlier change.

That's indeed an issue but the toolchain allows to specify where to find the JDKs via properties


org.gradle.java.installations.fromEnv=JDK18,JDK19


org.gradle.java.installations.paths=/custom/path/jdk18,/custom/path/jdk19


The benefit is that there's no collusion with `JAVA_HOME` which may be used by something else, in particular Gradle.

----

>From what I understand Gradle team is working to provide a better toolchain selection, but it is not there yet.

-------------

PR: https://git.openjdk.java.net/jextract/pull/9


More information about the jextract-dev mailing list