build: support for jdk9+ build

This commit is contained in:
Connor Tumbleson 2019-07-13 07:54:41 -04:00
parent 13aa5d2e25
commit e3bead4b5b
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -43,7 +43,12 @@ task cleanOutputDirectory(type: Delete) {
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
injars shadowJar.archivePath
// Java 9 and prior uses merged package for runtime, later uses split jmod files.
if (System.getProperty("java.version").startsWith('1.')) {
libraryjars "${System.properties['java.home']}/lib/rt.jar"
} else {
libraryjars "${System.getProperty('java.home')}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
}
dontobfuscate
dontoptimize