From ae221e0447e163f02ad5a198586ce998136a55e7 Mon Sep 17 00:00:00 2001 From: AsamK Date: Fri, 21 Oct 2022 10:33:46 +0200 Subject: [PATCH] Disable graalvm toolchain detection if GRAALVM_HOME is set --- build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index b88a6bf8..49ff1f46 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,13 @@ graalvmNative { this["main"].run { resources.autodetect() configurationFileDirectories.from(file("graalvm-config-dir")) + if (System.getenv("GRAALVM_HOME") == null) { + javaLauncher.set(javaToolchains.launcherFor { + languageVersion.set(JavaLanguageVersion.of(17)) + }) + } else { + toolchainDetection.set(false) + } } } }