diff --git a/build.gradle.kts b/build.gradle.kts index 3538cec..3312b13 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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()