From 4d519cdb4efd75d20b54ab2fdd0fcc13837ae98a Mon Sep 17 00:00:00 2001 From: phit Date: Thu, 14 Sep 2017 20:19:50 +0200 Subject: [PATCH] 1.2.0 fixed relocation and actually loads in 1.12 now --- build.gradle | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 8257fcd4..ee473594 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,11 @@ plugins { id 'signing' id 'ninja.miserable.blossom' version '1.0.1' id 'com.github.johnrengelman.shadow' version '1.2.4' - id 'org.spongepowered.plugin' version '0.6' + id 'org.spongepowered.plugin' version '0.8.1' } group = 'de.sldk.mc.prometheusexporter' -version = '1.1.1' +version = '1.2.0' description = "Sponge Minecraft Prometheus Exporter" ext.url = 'https://github.com/Stonebound/minecraft-prometheus-exporter' @@ -27,31 +27,34 @@ repositories { } configurations { - compile.extendsFrom shadow + } dependencies { - compile ("org.spongepowered:spongeapi:5.1.0") - shadow ("io.prometheus:simpleclient_common:0.0.21") - shadow ("org.eclipse.jetty:jetty-server:9.4.2.v20170220") + compile 'org.spongepowered:spongeapi:6.0.0' + compile 'io.prometheus:simpleclient_common:0.0.26' + compile 'org.eclipse.jetty:jetty-server:9.4.6.v20170531' + compile 'javax.servlet:javax.servlet-api:4.0.0' } shadowJar { - configurations = [project.configurations.shadow] + relocate 'org.eclipse.jetty', 'prometheus.shadow.jetty' + relocate 'io.prometheus', 'prometheus.shadow.prometheus' + relocate 'javax.servlet', 'prometheus.shadow.servlet' + + configurations = [project.configurations.compile] dependencies { - include dependency('io.prometheus:simpleclient_common:0.0.21') - include dependency('io.prometheus:simpleclient:0.0.21') - include dependency('org.eclipse.jetty:jetty-server:9.4.2.v20170220') - include dependency('org.eclipse.jetty:jetty-http:9.4.2.v20170220') - include dependency('org.eclipse.jetty:jetty-io:9.4.2.v20170220') - include dependency('org.eclipse.jetty:jetty-util:9.4.2.v20170220') - include dependency('javax.servlet:javax.servlet-api:3.1.0') + include dependency('io.prometheus:simpleclient_common:0.0.26') + include dependency('io.prometheus:simpleclient:0.0.26') + include dependency('org.eclipse.jetty:jetty-server:9.4.6.v20170531') + include dependency('org.eclipse.jetty:jetty-http:9.4.6.v20170531') + include dependency('org.eclipse.jetty:jetty-io:9.4.6.v20170531') + include dependency('org.eclipse.jetty:jetty-util:9.4.6.v20170531') + include dependency('javax.servlet:javax.servlet-api:4.0.0') } - relocate 'org.eclipse.jetty.jetty-server', 'de.sldk.mc.relocate.jetty-server' - relocate 'org.eclipse.jetty.jetty-http', 'de.sldk.mc.relocate.jetty-http' - relocate 'org.eclipse.jetty.jetty-io', 'de.sldk.mc.relocate.jetty-io' - relocate 'org.eclipse.jetty.jetty-util', 'de.sldk.mc.relocate.jetty-util' - relocate 'javax.servlet.javax.servlet-api', 'de.sldk.mc.relocate.servlet-api' + + exclude 'jetty-dir.css' + exclude 'about.html' archiveName = "spongeprometheusexporter-${version}-plugin.jar" } @@ -65,7 +68,6 @@ blossom { replaceToken '@url@', project.url, location } -build.dependsOn(shadowJar) signing { if (project.hasProperty('signing.keyId') && project.hasProperty('signing.password') && project.hasProperty('signing.secretKeyRingFile')) {