diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index 028874fd..251508f9 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -30,6 +30,7 @@ import java.io.*; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -110,8 +111,8 @@ public class ProguardTask extends BaritoneGradleTask { // Acquire the RT jar using "java -verbose". This doesn't work on Java 9+ Process p = new ProcessBuilder("java", "-verbose").start(); String out = IOUtils.toString(p.getInputStream(), "UTF-8").split("\n")[0].split("Opened ")[1].replace("]", ""); - // TODO Add jce.jar too template.add(2, "-libraryjars '" + out + "'"); + template.add(3, "-libraryjars '" + Paths.get(out).resolveSibling("jce.jar") + "'"); // API config doesn't require any changes from the changes that we made to the template Files.write(getTemporaryFile(PROGUARD_API_CONFIG), template);