From 5c19866809a7c5a4856eb2e1ed079fdb86e1a9d5 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Sat, 20 Apr 2019 23:33:54 -0700 Subject: [PATCH] Some fixes for new libs shading --- build.gradle | 3 ++- worldedit-bukkit/build.gradle | 1 + worldedit-core/build.gradle | 7 ------- worldedit-forge/build.gradle | 2 -- worldedit-libs/build.gradle | 11 ++++++----- worldedit-sponge/build.gradle | 11 ++++------- 6 files changed, 13 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 16fd983db..eaa4a49b5 100644 --- a/build.gradle +++ b/build.gradle @@ -152,7 +152,8 @@ configure(['bukkit', 'forge', 'sponge'].collect { project(":worldedit-$it") }) { shadowJar { classifier 'dist' dependencies { - include(project(":worldedit-libs")) + include(project(":worldedit-libs:core")) + include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}")) include(project(":worldedit-core")) } exclude 'GradleStart**' diff --git a/worldedit-bukkit/build.gradle b/worldedit-bukkit/build.gradle index 79ec8f5c5..14550bdb5 100644 --- a/worldedit-bukkit/build.gradle +++ b/worldedit-bukkit/build.gradle @@ -15,6 +15,7 @@ dependencies { compile 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT' // zzz compile "io.papermc:paperlib:1.0.1" compile 'org.slf4j:slf4j-jdk14:1.7.26' + compile 'org.bstats:bstats-bukkit:1.4' testCompile 'org.mockito:mockito-core:1.9.0-rc1' } diff --git a/worldedit-core/build.gradle b/worldedit-core/build.gradle index c401d5b06..828833d9a 100644 --- a/worldedit-core/build.gradle +++ b/worldedit-core/build.gradle @@ -1,5 +1,3 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - apply plugin: 'eclipse' apply plugin: 'idea' @@ -28,8 +26,3 @@ sourceSets { } } } - -task jar(type: ShadowJar, overwrite: true) { - from sourceSets.main.output - configurations = [project.configurations.runtime] -} \ No newline at end of file diff --git a/worldedit-forge/build.gradle b/worldedit-forge/build.gradle index c1ce166c1..d398d05d1 100644 --- a/worldedit-forge/build.gradle +++ b/worldedit-forge/build.gradle @@ -88,10 +88,8 @@ shadowJar { relocate "org.slf4j", "com.sk89q.worldedit.slf4j" relocate "org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge" - include(dependency(':worldedit-core')) include(dependency('org.slf4j:slf4j-api')) include(dependency("org.apache.logging.log4j:log4j-slf4j-impl")) - include(dependency("net.kyori:text-serializer-gson:2.0.0")) } } diff --git a/worldedit-libs/build.gradle b/worldedit-libs/build.gradle index 51b307019..983d2dc41 100644 --- a/worldedit-libs/build.gradle +++ b/worldedit-libs/build.gradle @@ -6,6 +6,7 @@ subprojects { apply plugin: 'com.jfrog.artifactory' configurations { create("shade") + getByName("archives").extendsFrom(getByName("default")) } group = rootProject.group + ".worldedit-libs" @@ -51,11 +52,11 @@ subprojects { artifacts { add("default", jar) - add("default", sourcesJar) + add("archives", sourcesJar) } tasks.register("install", Upload) { - configuration = configurations.default + configuration = configurations.archives repositories.mavenInstaller { pom.version = project.version pom.artifactId = project.name @@ -74,7 +75,9 @@ project("core") { shade 'net.kyori:text-api:2.0.0' shade 'net.kyori:text-serializer-gson:2.0.0' shade 'net.kyori:text-serializer-legacy:2.0.0' - shade 'com.sk89q:jchronic:0.2.4a' + shade('com.sk89q:jchronic:0.2.4a') { + exclude(group: "junit", module: "junit") + } shade 'com.thoughtworks.paranamer:paranamer:2.6' shade 'com.sk89q.lib:jlibnoise:1.0.0' } @@ -82,13 +85,11 @@ project("core") { project("bukkit") { dependencies { shade 'net.kyori:text-adapter-bukkit:1.0.3' - shade 'org.bstats:bstats-bukkit:1.4' } } project("sponge") { dependencies { shade 'net.kyori:text-adapter-spongeapi:1.0.3' - shade 'org.bstats:bstats-sponge:1.4' } } diff --git a/worldedit-sponge/build.gradle b/worldedit-sponge/build.gradle index 422913966..6d75c4d84 100644 --- a/worldedit-sponge/build.gradle +++ b/worldedit-sponge/build.gradle @@ -19,6 +19,7 @@ dependencies { compile project(':worldedit-core') compile project(':worldedit-libs:sponge') compile 'org.spongepowered:spongeapi:7.1.0' + compile 'org.bstats:bstats-sponge:1.4' testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1' } @@ -40,16 +41,12 @@ jar { shadowJar { dependencies { - include(dependency(':worldedit-core')) - include(dependency('org.bstats:bstats-sponge:1.4')) - include(dependency("net.kyori:text-adapter-spongeapi:1.0.3")) + relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") { + include(dependency('org.bstats:bstats-sponge:1.4')) + } } } -artifacts { - archives shadowJar -} - if (project.hasProperty("signing")) { apply plugin: 'signing'