diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 20cab57e..31439382 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -14,6 +14,7 @@ targetCompatibility = '1.8' configurations { + compileOnlyA bundleOnly bundle hikari @@ -69,6 +70,8 @@ bundle project(':Radon') launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-linux') { exclude group: '*' } + + compileOnlyA 'com.google.guava:guava:26.0-jre' } task hikari(type: Copy) { @@ -112,6 +115,11 @@ task dumpLibs(type: Copy) { from configurations.bundleOnly } +task dumpCompileOnlyLibs(type: Copy) { + into "$buildDir/libs/launcher-libraries-compile" + from configurations.compileOnlyA +} + task bundle(type: Zip) { dependsOn parent.childProjects.Launcher.tasks.build, tasks.dumpLibs, tasks.jar archiveName 'LaunchServer.zip' diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 4784317a..5cfec95d 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -277,7 +277,8 @@ public static void main(String... args) throws Throwable { // Start LaunchServer long startTime = System.currentTimeMillis(); try { - LaunchServer launchserver = new LaunchServer(IOHelper.WORKING_DIR, args); + @SuppressWarnings("resource") + LaunchServer launchserver = new LaunchServer(IOHelper.WORKING_DIR, args); if(args.length == 0) launchserver.run(); else { //Обработка команды launchserver.commandHandler.eval(args,false); @@ -296,6 +297,8 @@ public static void main(String... args) throws Throwable { public final Path launcherLibraries; + public final Path launcherLibrariesCompile; + public final List args; public final Path configFile; @@ -366,10 +369,7 @@ public LaunchServer(Path dir, String[] args) throws IOException, InvalidKeySpecE this.dir = dir; taskPool = new Timer("Timered task worker thread", true); launcherLibraries = dir.resolve("launcher-libraries"); - if (!Files.isDirectory(launcherLibraries)) { - Files.deleteIfExists(launcherLibraries); - Files.createDirectory(launcherLibraries); - } + launcherLibrariesCompile = dir.resolve("launcher-libraries-compile"); this.args = Arrays.asList(args); configFile = dir.resolve("LaunchServer.conf"); publicKeyFile = dir.resolve("public.key"); diff --git a/Radon b/Radon index 8b323623..9ad5210d 160000 --- a/Radon +++ b/Radon @@ -1 +1 @@ -Subproject commit 8b323623f885ea4959e8b5f0e00dc4ca1b5285d6 +Subproject commit 9ad5210d821a5fcc072dae9f8e24ef37c8544757