Let the proguard task run on java 9+

This commit is contained in:
Username404-59 2021-04-27 02:25:08 +02:00
parent 6f43f2de94
commit b6c0988a24
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 8 deletions

View File

@ -51,14 +51,8 @@ subprojects {
// The following lines are needed at least for the current version of proguard
dontwarn("java.**")
onlyIf {
JavaVersion.current().isJava8.also {
if (!it) {
println("The shrinkJar task is disabled because Java 9 or higher does not work with our current proguard configuration.")
}
}
}
libraryjars("${System.getProperty("java.home")}/lib/rt.jar")
val homeDir = System.getProperty("java.home") as String
libraryjars("$homeDir/lib/rt.jar")
// Note: dontpreverify() should NOT be used, it will cause errors at runtime
useuniqueclassmembernames()
optimizations("method/inlining/*, code/allocation/variable, class/merging/vertical, class/merging/horizontal, code/removal/advanced, code/simplification/branch, code/merging")