From f81e32122349e0dd79d1ec25ebe18988e69f04cc Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Sun, 1 Mar 2020 12:34:31 +0100 Subject: [PATCH 1/5] =?UTF-8?q?[FEATURE]=20=D0=A5=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=BC=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B5=D0=B9=20?= =?UTF-8?q?=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D0=BC?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B5=20(=D1=87.=201)...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LaunchServer/build.gradle | 52 +++++++++++++++++++----------------- Launcher/build.gradle | 6 ++--- LauncherAPI/build.gradle | 4 +-- LauncherAuthlib/build.gradle | 2 +- LauncherCore/build.gradle | 14 +++++----- ServerWrapper/build.gradle | 2 +- build.gradle | 2 ++ props.gradle | 17 ++++++++++++ 8 files changed, 60 insertions(+), 39 deletions(-) create mode 100644 props.gradle diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 84875664..cf91ce83 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -28,10 +28,10 @@ } jar { - dependsOn parent.childProjects.Launcher.tasks.build + dependsOn parent.childProjects.Launcher.tasks.assemble from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } } - from(parent.childProjects.Launcher.tasks.shadowJar.archivePath) - from(parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath) + from(parent.childProjects.Launcher.tasks.shadowJar) + from(parent.childProjects.Launcher.tasks.genRuntimeJS) manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, "Can-Redefine-Classes": "true", @@ -71,24 +71,22 @@ task cleanjar(type: Jar, dependsOn: jar) { dependencies { pack project(':LauncherAPI') - bundle 'org.ow2.asm:asm-commons:7.3.1' - bundle 'mysql:mysql-connector-java:8.0.16' - bundle 'org.postgresql:postgresql:42.2.6' - bundle 'org.jline:jline:3.13.1' - bundle 'org.jline:jline-reader:3.13.1' - bundle 'org.jline:jline-terminal:3.13.1' - bundle 'net.sf.proguard:proguard-base:6.2.0' - bundle 'org.fusesource.jansi:jansi:1.18' - bundle 'commons-io:commons-io:2.6' - bundle 'commons-codec:commons-codec:1.12' - bundle 'org.apache.httpcomponents:httpclient:4.5.10' - bundle 'io.netty:netty-all:4.1.43.Final' - bundle 'org.hibernate:hibernate-core:5.4.9.Final' - bundle 'org.bouncycastle:bcpkix-jdk15on:1.61' - - bundle 'org.slf4j:slf4j-simple:1.7.25' - bundle 'org.slf4j:slf4j-api:1.7.25' + bundle group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi'] + bundle group: 'org.jline', name: 'jline', version: rootProject['verJline'] + bundle group: 'org.jline', name: 'jline-reader', version: rootProject['verJline'] + bundle group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline'] + bundle group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: rootProject['verBcpkix'] + bundle group: 'org.ow2.asm', name: 'asm-commons', version: rootProject['verAsm'] + bundle group: 'io.netty', name: 'netty-all', version: rootProject['verNetty'] + bundle group: 'org.slf4j', name: 'slf4j-simple', version: rootProject['verSlf4j'] + bundle group: 'org.slf4j', name: 'slf4j-api', version: rootProject['verSlf4j'] + bundle group: 'org.hibernate', name: 'hibernate-core', version: rootProject['verHibernate'] + bundle group: 'mysql', name: 'mysql-connector-java', version: rootProject['verMySQLConn'] + bundle group: 'org.postgresql', name: 'postgresql', version: rootProject['verPostgreSQLConn'] + bundle group: 'net.sf.proguard', name: 'proguard-base', version: rootProject['verProguard'] + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] + //TODO rewrite hikari 'io.micrometer:micrometer-core:1.0.6' hikari('com.zaxxer:HikariCP:3.4.1') { exclude group: 'javassist' @@ -101,6 +99,7 @@ pack project(':LauncherAPI') exclude group: 'net.java.abeille' exclude group: 'foxtrot' exclude group: 'com.jgoodies' + exclude group: 'org.slf4j' } launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-win32') { @@ -110,13 +109,15 @@ pack project(':LauncherAPI') launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-linux') { exclude group: '*' } + // Rewrite end. - compileOnlyA 'com.google.guava:guava:26.0-jre' - compileOnlyA 'log4j:log4j:1.2.17' // Do not update (laggy dep). + compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] + // Do not update (laggy deps). + compileOnlyA 'log4j:log4j:1.2.17' compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2' - testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1' } +//TODO rewrite task hikari(type: Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/hikaricp" @@ -152,10 +153,11 @@ task launch4jA(type: Copy) { fcp.mode = 0755 } } +// Rewrite end. task dumpLibs(type: Copy) { duplicatesStrategy = 'EXCLUDE' - dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA + dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA //TODO rewrite this into "$buildDir/libs/libraries" from configurations.bundleOnly } @@ -173,7 +175,7 @@ task bundle(type: Zip) { destinationDirectory = file("$buildDir") from(tasks.dumpLibs.destinationDir) { into 'libraries' } from(tasks.dumpCompileOnlyLibs.destinationDir) { into 'launcher-libraries-compile' } - from tasks.jar.archivePath + from tasks.jar from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' } } diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 918ace4a..3b08c43e 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -53,9 +53,9 @@ task javadocJar(type: Jar) { dependencies { pack project(':LauncherAPI') - bundle 'com.github.oshi:oshi-core:3.13.0' - pack 'io.netty:netty-codec-http:4.1.43.Final' - pack 'org.ow2.asm:asm-tree:7.1' + bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore'] + pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] + pack group: 'org.ow2.asm', name: 'asm-tree', version: rootProject['verAsm'] } task genRuntimeJS(type: Zip) { diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 3cb0f2c7..0b33f0bd 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -3,8 +3,8 @@ dependencies { api project(':LauncherCore') - compileOnly 'io.netty:netty-codec-http:4.1.43.Final' - testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1' + compileOnly group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] } test { diff --git a/LauncherAuthlib/build.gradle b/LauncherAuthlib/build.gradle index b0be2cb6..4e0a33d5 100644 --- a/LauncherAuthlib/build.gradle +++ b/LauncherAuthlib/build.gradle @@ -3,6 +3,6 @@ dependencies { api project(':LauncherAPI') - compileOnly 'com.google.guava:guava:26.0-jre' + compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] api files('../compat/authlib/authlib-clean.jar') } diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index 40e2fe6e..6b9212af 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -2,13 +2,13 @@ targetCompatibility = '1.8' dependencies { - compileOnly 'org.fusesource.jansi:jansi:1.18' - compileOnly 'org.jline:jline:3.11.0' - compileOnly 'org.jline:jline-reader:3.11.0' - compileOnly 'org.jline:jline-terminal:3.11.0' - compileOnly 'org.bouncycastle:bcprov-jdk15:1.46' - api 'com.google.code.gson:gson:2.8.5' - testImplementation 'org.junit.jupiter:junit-jupiter:5.4.1' + compileOnly group: 'org.fusesource.jansi', name:'jansi', version: rootProject['verJansi'] + compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline'] + compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline'] + compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline'] + compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: rootProject['verBcprov'] + api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson'] + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] } test { diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 0c801681..d35d9f6b 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -38,7 +38,7 @@ task javadocJar(type: Jar) { dependencies { pack project(':LauncherAuthlib') - pack 'io.netty:netty-codec-http:4.1.43.Final' + pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] } shadowJar { diff --git a/build.gradle b/build.gradle index 458b395f..280068d2 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,8 @@ group = 'pro.gravit.launcher' version = '5.1.1-SNAPSHOT' +apply from: 'props.gradle' + configure(subprojects.findAll { it.name != 'modules' }) { apply plugin: 'idea' apply plugin: 'eclipse' diff --git a/props.gradle b/props.gradle new file mode 100644 index 00000000..a59f7f53 --- /dev/null +++ b/props.gradle @@ -0,0 +1,17 @@ +project.ext { + verAsm = '7.1' + verNetty = '4.1.43.Final' + verOshiCore = '3.13.0' + verJunit = '5.4.1' + verGuavaC = '26.0-jre' + verJansi = '1.18' + verJline = '3.11.0' + verBcprov = '1.46' + verGson = '2.8.5' + verBcpkix = '1.61' + verSlf4j = '1.7.25' + verMySQLConn = '8.0.16' + verPostgreSQLConn = '42.2.6' + verProguard = '6.2.0' + verHibernate = '5.4.9.Final' +} From 665ed6a4f7ef50517480ac281f3dcf0f6b294ecb Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Wed, 11 Mar 2020 15:58:20 +0100 Subject: [PATCH 2/5] =?UTF-8?q?[ANY]=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D0=B8?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 55982085..2edb2c72 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 559820852c231b7045b2c12fabbde1261485a75e +Subproject commit 2edb2c7259d5a7dba3fa82c503f88a8a0e171840 From 84543b85f35fc4165e56003a149b669d516e45f3 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Wed, 11 Mar 2020 16:28:22 +0100 Subject: [PATCH 3/5] [FIX] Hikari and launch4j resolving. --- LaunchServer/build.gradle | 38 ++++++------------- .../launchserver/ASMTransformersTest.java | 24 ++++++------ 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index cf91ce83..21d39219 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -22,9 +22,8 @@ hikari pack launch4j - launch4jCJ bundleOnly.extendsFrom bundle - api.extendsFrom bundle, hikari, pack, launch4jCJ, launch4j + api.extendsFrom bundle, hikari, pack, launch4j } jar { @@ -86,7 +85,6 @@ pack project(':LauncherAPI') bundle group: 'net.sf.proguard', name: 'proguard-base', version: rootProject['verProguard'] testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] - //TODO rewrite hikari 'io.micrometer:micrometer-core:1.0.6' hikari('com.zaxxer:HikariCP:3.4.1') { exclude group: 'javassist' @@ -102,14 +100,13 @@ pack project(':LauncherAPI') exclude group: 'org.slf4j' } - launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-win32') { + launch4j('net.sf.launch4j:launch4j:3.12:workdir-win32') { exclude group: '*' } - launch4jCJ('net.sf.launch4j:launch4j:3.12:workdir-linux') { + launch4j('net.sf.launch4j:launch4j:3.12:workdir-linux') { exclude group: '*' } - // Rewrite end. compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] // Do not update (laggy deps). @@ -117,23 +114,24 @@ pack project(':LauncherAPI') compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2' } -//TODO rewrite task hikari(type: Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/hikaricp" from configurations.hikari } -task launch4jM(type: Copy) { +task launch4j(type: Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/launch4j" - from(configurations.launch4jCJ.collect { it.isDirectory() ? it : zipTree(it) }) + from(configurations.launch4j.collect { it.isDirectory() ? it : (it.getName().contains("workdir") ? zipTree(it) : it) }) includeEmptyDirs false eachFile { FileCopyDetails fcp -> if (fcp.relativePath.pathString.startsWith("launch4j-")) { - def segments = fcp.relativePath.segments - def pathSegments = segments[1..-1] as String[] - fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathSegments) + if (fcp.relativePath.pathString.contains("workdir")) { + def segments = fcp.relativePath.segments + def pathSegments = segments[1..-1] as String[] + fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathSegments) + } fcp.mode = 0755 } else { fcp.exclude() @@ -141,23 +139,9 @@ task launch4jM(type: Copy) { } } -task launch4jA(type: Copy) { - duplicatesStrategy = 'EXCLUDE' - into "$buildDir/libs/libraries/launch4j" - from(configurations.launch4j) - includeEmptyDirs false - eachFile { FileCopyDetails fcp -> - if (fcp.name.startsWith("launch4j")) { - fcp.name = "launch4j.jar" - } - fcp.mode = 0755 - } -} -// Rewrite end. - task dumpLibs(type: Copy) { duplicatesStrategy = 'EXCLUDE' - dependsOn tasks.hikari, tasks.launch4jM, tasks.launch4jA //TODO rewrite this + dependsOn tasks.hikari, tasks.launch4j into "$buildDir/libs/libraries" from configurations.bundleOnly } diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java index fe27cab0..f1f620ce 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java @@ -10,6 +10,8 @@ import pro.gravit.launchserver.asm.InjectClassAcceptor; import pro.gravit.utils.helper.JarHelper; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; @@ -38,11 +40,11 @@ public static class TestClass public Map map; } @BeforeAll - public static void prepare() throws Exception { + public static void prepare() throws Throwable { classLoader = new ASMClassLoader(ASMTransformersTest.class.getClassLoader()); } @Test - void testASM() throws Exception + void testASM() throws Throwable { ClassReader reader = new ClassReader(JarHelper.getClassBytes(TestClass.class)); ClassNode node = new ClassNode(); @@ -65,15 +67,13 @@ void testASM() throws Exception byte[] bytes = writer.toByteArray(); classLoader.rawDefineClass("ASMTestClass", bytes, 0, bytes.length); Class clazz = classLoader.loadClass("ASMTestClass"); - Object instance = clazz.newInstance(); - Field field = clazz.getField("test"); - Object result = field.get(instance); - Assertions.assertEquals(1234, (int) (Integer) result); - field = clazz.getField("s"); - result = field.get(instance); - Assertions.assertEquals(strings, result); - field = clazz.getField("map"); - result = field.get(instance); - Assertions.assertEquals(byteMap, result); + Object instance = MethodHandles.publicLookup().findConstructor(clazz, MethodType.methodType(void.class)).invoke(); + Assertions.assertEquals(1234, (int) + MethodHandles.publicLookup().findGetter(clazz, "test", int.class).invoke(instance)); + Assertions.assertEquals(strings, (List) + MethodHandles.publicLookup().findGetter(clazz, "s", List.class).invoke(instance)); + + Assertions.assertEquals(byteMap, (Map) + MethodHandles.publicLookup().findGetter(clazz, "map", Map.class).invoke(instance)); } } From b8f25e669efce852abb18e8e0ed7f25a8c753bdf Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Wed, 11 Mar 2020 16:40:27 +0100 Subject: [PATCH 4/5] =?UTF-8?q?[FIX]=20Gradle=20=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=8C=202/3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LaunchServer/build.gradle | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 21d39219..d1569f29 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -99,14 +99,8 @@ pack project(':LauncherAPI') exclude group: 'com.jgoodies' exclude group: 'org.slf4j' } - - launch4j('net.sf.launch4j:launch4j:3.12:workdir-win32') { - exclude group: '*' - } - - launch4j('net.sf.launch4j:launch4j:3.12:workdir-linux') { - exclude group: '*' - } + launch4j('net.sf.launch4j:launch4j:3.12:workdir-win32') { transitive = false } + launch4j('net.sf.launch4j:launch4j:3.12:workdir-linux') { transitive = false } compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] // Do not update (laggy deps). @@ -123,19 +117,16 @@ task hikari(type: Copy) { task launch4j(type: Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/launch4j" - from(configurations.launch4j.collect { it.isDirectory() ? it : (it.getName().contains("workdir") ? zipTree(it) : it) }) + from(configurations.launch4j.collect { it.isDirectory() ? it : ((it.getName().startsWith("launch4j") && it.getName().contains("workdir")) ? zipTree(it) : it) }) includeEmptyDirs false eachFile { FileCopyDetails fcp -> - if (fcp.relativePath.pathString.startsWith("launch4j-")) { - if (fcp.relativePath.pathString.contains("workdir")) { + if (fcp.relativePath.pathString.startsWith("launch4j-") && + fcp.relativePath.pathString.contains("workdir")) { def segments = fcp.relativePath.segments def pathSegments = segments[1..-1] as String[] fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathSegments) } fcp.mode = 0755 - } else { - fcp.exclude() - } } } @@ -166,7 +157,7 @@ task bundle(type: Zip) { task dumpClientLibs(type: Copy) { dependsOn parent.childProjects.Launcher.tasks.build into "$buildDir/libs/launcher-libraries" - from parent.childProjects.Launcher.tasks.dumpLibs.destinationDir + from parent.childProjects.Launcher.tasks.dumpLibs } assemble.dependsOn tasks.dumpLibs, tasks.dumpCompileOnlyLibs, tasks.dumpClientLibs, tasks.bundle, tasks.cleanjar From d278712183cb2ff2c0be9a916a21d64120e42096 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Thu, 12 Mar 2020 06:36:09 +0100 Subject: [PATCH 5/5] =?UTF-8?q?[FIX]=20=D0=A1=D0=BA=D1=80=D0=B8=D0=BF?= =?UTF-8?q?=D1=82=D1=8B=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8.=20=D0=A7?= =?UTF-8?q?=D0=B0=D1=81=D1=82=D1=8C=203/3.=20=D0=95=D1=89=D1=91=20=D0=BE?= =?UTF-8?q?=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB=20=D0=B3=D0=B4=D0=B5=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D0=B8=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE?= =?UTF-8?q?=D1=82=D0=B5=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LaunchServer/build.gradle | 12 ++++++------ props.gradle | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index d1569f29..ea5dcb76 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -92,17 +92,17 @@ pack project(':LauncherAPI') exclude group: 'org.slf4j' } - launch4j('net.sf.launch4j:launch4j:3.12') { + launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j']) { exclude group: 'org.apache.ant' exclude group: 'net.java.abeille' exclude group: 'foxtrot' exclude group: 'com.jgoodies' exclude group: 'org.slf4j' } - launch4j('net.sf.launch4j:launch4j:3.12:workdir-win32') { transitive = false } - launch4j('net.sf.launch4j:launch4j:3.12:workdir-linux') { transitive = false } + launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j'] + ':workdir-win32') { transitive = false } + launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j'] + 'workdir-linux') { transitive = false } - compileOnly group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] + compileOnlyA group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] // Do not update (laggy deps). compileOnlyA 'log4j:log4j:1.2.17' compileOnlyA 'org.apache.logging.log4j:log4j-core:2.11.2' @@ -125,7 +125,7 @@ task launch4j(type: Copy) { def segments = fcp.relativePath.segments def pathSegments = segments[1..-1] as String[] fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathSegments) - } + } else if (fcp.relativePath.pathString.contains("META-INF")) fcp.exclude() fcp.mode = 0755 } } @@ -150,7 +150,7 @@ task bundle(type: Zip) { destinationDirectory = file("$buildDir") from(tasks.dumpLibs.destinationDir) { into 'libraries' } from(tasks.dumpCompileOnlyLibs.destinationDir) { into 'launcher-libraries-compile' } - from tasks.jar + from(tasks.jar) from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' } } diff --git a/props.gradle b/props.gradle index a59f7f53..2140b970 100644 --- a/props.gradle +++ b/props.gradle @@ -1,8 +1,8 @@ project.ext { - verAsm = '7.1' + verAsm = '7.2' verNetty = '4.1.43.Final' verOshiCore = '3.13.0' - verJunit = '5.4.1' + verJunit = '5.6.0' verGuavaC = '26.0-jre' verJansi = '1.18' verJline = '3.11.0' @@ -13,5 +13,6 @@ verMySQLConn = '8.0.16' verPostgreSQLConn = '42.2.6' verProguard = '6.2.0' + verLaunch4j = '3.12' verHibernate = '5.4.9.Final' }