Check if java.base.jmod is present in the build.gradle.kts file

This commit is contained in:
Username404 2021-05-19 14:41:33 +02:00
parent 8a49f24249
commit 870c7af084
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -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()