From 870c7af08498d78c370fff658682c44b71607dc3 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 19 May 2021 14:41:33 +0200 Subject: [PATCH] Check if java.base.jmod is present in the build.gradle.kts file --- build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e9011f1..b7c1c7b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,7 +74,9 @@ subprojects { } }) if (JavaVersion.current().isJava9Compatible) { - libraryjars("$homeDir/jmods/java.base.jmod") + val jmodLocation = "$homeDir/jmods/java.base.jmod" + if (!file(jmodLocation).exists()) throw GradleException("Java.base.jmod appears to be missing, please make sure that jmods are installed.") + else libraryjars(jmodLocation) } else libraryjars("$homeDir/lib/rt.jar") // Note: dontpreverify() should NOT be used, it will cause errors at runtime useuniqueclassmembernames()