Skip to content

Commit c53e484

Browse files
committed
Restore toolchain env sources so CI can find GraalVM
nativeCompile failed on the runners with "Cannot find a Java installation matching {languageVersion=25, vendor=GraalVM Community}". Gradle's toolchain auto-detection only reads JAVA_HOME, and the native job overwrites that with the JDK 21 it uses to compile the jars, so GRAALVM_HOME — set by setup-graalvm — was never read by anything. The build kept working locally through an entirely different path: mise exports ASDF_DATA_DIR and Gradle discovers its installs through the asdf provider, so the missing setting was invisible outside CI. Auto-provisioning stays off deliberately. It cannot produce a usable GraalVM anyway: unpacking a downloaded JDK does not preserve the symlink GraalVM ships at bin/native-image, and nativeCompile then dies on an empty file.
1 parent 9da6ae7 commit c53e484

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎gradle.properties‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAME
77
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
88
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
99
palantir.native.formatter=true
10+
11+
# Where Gradle looks for JDKs. Auto-detection only reads JAVA_HOME, and CI overwrites that with
12+
# the JDK 21 used for the jars — so without this line GraalVM stays invisible and nativeCompile
13+
# fails with "Cannot find a Java installation ... vendor=GraalVM Community". Locally these are
14+
# unset and mise's installs are found through Gradle's asdf provider instead.
15+
#
16+
# Auto-provisioning stays off deliberately: it cannot produce a working GraalVM anyway, because
17+
# unpacking a downloaded JDK does not preserve the symlink GraalVM ships at bin/native-image.
18+
org.gradle.java.installations.auto-download=false
19+
org.gradle.java.installations.fromEnv=JDK21_HOME,GRAALVM_HOME

0 commit comments

Comments
 (0)