Fix jce.jar not being included as library jar in proguard config

This commit is contained in:
Brady 2018-11-09 22:43:00 -06:00
parent 90236962c4
commit 8dfe5dfd32
No known key found for this signature in database
GPG Key ID: 73A788379A197567
1 changed files with 2 additions and 1 deletions

View File

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