RFR: 7903136: Don't require jdk18_home to be set in jextract gradle build
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Mar 29 09:58:07 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.
I've tried `org.gradle.java.installations.paths` and that indeed helps finding a non-GA version of the JDK that is locally installed.
Assuming we can make everything work (e.g. moditect plugin does not honor toolchain AFAIK), and assuming that ides work better with toolchains, that works for me. I would disable auto-provisioning out of the box though (users can re-enable locally).
> That's indeed an issue but the toolchain allows to specify where to find the JDKs via properties
>
> ```ini
> org.gradle.java.installations.fromEnv=JDK18,JDK19
> ```
>
> ```ini
> 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