fix: properly determine greater than java8
@@ -44,10 +44,10 @@ task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
injars shadowJar.getArchiveFile()
// Java 9 and prior uses merged package for runtime, later uses split jmod files.
- if (System.getProperty("java.version").startsWith('1.')) {
+ if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
libraryjars "${System.properties['java.home']}/lib/rt.jar"
} else {
- libraryjars "${System.getProperty('java.home')}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
+ libraryjars "${System.properties['java.home']}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
}
dontobfuscate
