Move the libraryjars method calls in the proguard task.
This commit is contained in:
parent
d47de62bfa
commit
bdddec5cc8
|
@ -1,6 +1,6 @@
|
|||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.modrinth.minotaur.request.VersionType
|
||||
import org.gradle.internal.jvm.Jvm
|
||||
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath("com.guardsquare:proguard-gradle:7.1.0-beta2") {
|
||||
|
@ -51,12 +51,13 @@ subprojects {
|
|||
dontwarn("java.**")
|
||||
onlyIf {
|
||||
JavaVersion.current().isJava8.also {
|
||||
if (it) {
|
||||
libraryjars("${Jvm.current().javaHome}/lib/rt.jar")
|
||||
libraryjars("${Jvm.current().javaHome}/lib/jce.jar")
|
||||
} else println("The shrinkJar task is disabled because Java 9 or higher does not work with our current proguard configuration.")
|
||||
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")
|
||||
libraryjars("${System.getProperty("java.home")}/lib/jce.jar")
|
||||
|
||||
// Note: dontpreverify() should NOT be used, it will cause errors at runtime
|
||||
useuniqueclassmembernames()
|
||||
|
|
Loading…
Reference in New Issue