Also fixes.

This commit is contained in:
zaxar163 2019-01-08 17:41:13 +04:00
parent d250b6432c
commit a238f79fe6
No known key found for this signature in database
GPG key ID: CEE900027AE098E0
3 changed files with 8 additions and 9 deletions

View file

@ -18,24 +18,24 @@
import ru.gravit.utils.helper.LogHelper;
public final class JARLauncherBinary extends LauncherBinary {
public ArrayList<LauncherBuildTask> tasks;
public final AtomicLong count;
public final Path runtimeDir;
public final Path guardDir;
public final Path buildDir;
public ArrayList<LauncherBuildTask> tasks;
public JARLauncherBinary(LaunchServer server) throws IOException {
super(server);
tasks = new ArrayList<>();
tasks.add(new UnpackBuildTask(server));
tasks.add(new MainBuildTask(server));
if(server.config.enabledProGuard) tasks.add(new ProGuardBuildTask(server));
if(server.config.stripLineNumbers) tasks.add(new StripLineNumbersTask(server));
count = new AtomicLong(0);
syncBinaryFile = server.dir.resolve(server.config.binaryName + ".jar");
runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR);
guardDir = server.dir.resolve(Launcher.GUARD_DIR);
buildDir = server.dir.resolve("build");
tasks = new ArrayList<>();
tasks.add(new UnpackBuildTask(server));
tasks.add(new MainBuildTask(server));
if(server.config.enabledProGuard) tasks.add(new ProGuardBuildTask(server));
if(server.config.stripLineNumbers) tasks.add(new StripLineNumbersTask(server));
}
@Override

View file

@ -14,7 +14,7 @@ public class UnpackBuildTask implements LauncherBuildTask {
public UnpackBuildTask(LaunchServer server) {
this.server = server;
result = server.dir.resolve(server.config.binaryName + "-clean.jar");
result = server.launcherBinary.buildDir.resolve(server.config.binaryName + "-clean.jar");
}
@Override

View file

@ -65,4 +65,3 @@ public static JsonElement jsonRequest(JsonElement request, URL url) throws IOExc
private HTTPRequest() {
}
}
}