forked from RepoMirrors/baritone
Fix jce.jar not being included as library jar in proguard config
This commit is contained in:
parent
90236962c4
commit
8dfe5dfd32
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue