From 0970b687600991ae19d823ffed832c95c5e003de Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Mon, 29 Apr 2019 12:47:11 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20Include=20=D0=B2=20ServerWrapper/build.?= =?UTF-8?q?gradle.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ServerWrapper/build.gradle | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 4ec8ef0a..b2669795 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,7 +18,7 @@ targetCompatibility = '1.8' jar { - from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } + classifier = 'clean' manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, "Can-Redefine-Classes": "true", @@ -21,5 +27,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