mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
Proguard fix
This commit is contained in:
parent
a1de896141
commit
bea69c9675
1 changed files with 8 additions and 5 deletions
|
@ -7,11 +7,14 @@
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
|
import ru.gravit.utils.helper.JVMHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
|
|
||||||
|
@ -29,7 +32,7 @@ private static String generateString(SecureRandom rand, int il) {
|
||||||
public final Path config;
|
public final Path config;
|
||||||
public final Path mappings;
|
public final Path mappings;
|
||||||
public final Path words;
|
public final Path words;
|
||||||
public final Set<String> confStrs;
|
public final ArrayList<String> confStrs;
|
||||||
|
|
||||||
public ProguardConf(LaunchServer srv) {
|
public ProguardConf(LaunchServer srv) {
|
||||||
this.srv = srv;
|
this.srv = srv;
|
||||||
|
@ -37,14 +40,14 @@ public ProguardConf(LaunchServer srv) {
|
||||||
config = proguard.resolve("proguard.config");
|
config = proguard.resolve("proguard.config");
|
||||||
mappings = proguard.resolve("mappings.pro");
|
mappings = proguard.resolve("mappings.pro");
|
||||||
words = proguard.resolve("random.pro");
|
words = proguard.resolve("random.pro");
|
||||||
confStrs = new HashSet<>();
|
confStrs = new ArrayList<>();
|
||||||
prepare(false);
|
prepare(false);
|
||||||
confStrs.add("@".concat(config.toString()));
|
|
||||||
if (this.srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'");
|
if (this.srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'");
|
||||||
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||||
confStrs.add("-injar \'../" + srv.config.binaryName + ".jar\'");
|
confStrs.add("-injar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + ".jar\'");
|
||||||
confStrs.add("-outjar \'../" + srv.config.binaryName + "-obf.jar\'");
|
confStrs.add("-outjar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-obf.jar\'");
|
||||||
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
|
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||||
|
confStrs.add(readConf());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue