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