Move the libraryjars method calls in the proguard task.

This commit is contained in:
Username404-59 2021-04-17 14:54:24 +02:00
parent d47de62bfa
commit bdddec5cc8
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 6 additions and 5 deletions

View File

@ -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()