diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg index 4c93356a..b2e34d42 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg @@ -20,9 +20,9 @@ -keepattributes Signature -adaptresourcefilecontents META-INF/MANIFEST.MF --keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.**,org.slf4j.**,oshi.jna.**,com.sun.jna.**,org.apache.commons.logging.**, org.fusesource.**, com.jfoenix.** +-keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,ru.gravit.repackage.**,org.fusesource.** --keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.**,org.slf4j.**,oshi.jna.**,com.sun.jna.**,org.apache.commons.logging.**, org.fusesource.**, com.jfoenix.** { +-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,ru.gravit.repackage.**,org.fusesource.** { *; } diff --git a/Launcher/build.gradle b/Launcher/build.gradle index cb817a76..904fba57 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -36,10 +36,11 @@ } dependencies { - pack project(':LauncherAPI') // Not error on obf. + pack project(':LauncherAPI') bundle 'com.github.oshi:oshi-core:3.13.0' bundle 'com.jfoenix:jfoenix:8.0.8' bundle 'de.jensd:fontawesomefx:8.9' + bundle 'org.apache.httpcomponents:httpclient:4.5.7' pack 'io.netty:netty-all:4.1.32.Final' pack 'org.ow2.asm:asm-tree:7.1' } diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index ad4e07c0..6c28c79d 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -4,7 +4,7 @@ dependencies { compile project(':libLauncher') compileOnly 'io.netty:netty-all:4.1.32.Final' - compile 'org.apache.httpcomponents:httpclient:4.5.7' + compileOnly 'org.apache.httpcomponents:httpclient:4.5.7' compileOnly 'com.google.guava:guava:26.0-jre' compile files('../compat/authlib/authlib-clean.jar') } diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 4ec8ef0a..241d2b17 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -1,6 +1,12 @@ +apply plugin: 'com.github.johnrengelman.shadow' + String mainClassName = "ru.gravit.launcher.server.ServerWrapper" String mainAgentName = "ru.gravit.launcher.server.ServerAgent" +configurations { + pack + compile.extendsFrom pack +} repositories { maven { @@ -12,6 +18,7 @@ targetCompatibility = '1.8' jar { + classifier = 'clean' from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, @@ -21,5 +28,18 @@ } dependencies { - compile project(':LauncherAPI') + pack project(':LauncherAPI') + pack 'org.apache.httpcomponents:httpclient:4.5.7' + pack 'io.netty:netty-all:4.1.32.Final' } + +shadowJar { + classifier = null + relocate 'io.netty', 'ru.gravit.repackage.io.netty' + configurations = [project.configurations.pack] + exclude 'module-info.class' + } + + + build.dependsOn tasks.shadowJar + \ No newline at end of file