From b34f0d62d62d4514bb81685b53f4510dd4503ecd Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 10 Feb 2020 13:13:29 -0800 Subject: [PATCH] Fixing shadow dependencies (I hope) --- 1 | 11 ------ mcmmo-core/build.gradle.kts | 34 +++++++++++++++---- .../gmail/nossr50/util/nbt/NBTManager.java | 4 +-- 3 files changed, 29 insertions(+), 20 deletions(-) delete mode 100644 1 diff --git a/1 b/1 deleted file mode 100644 index c0087c86d..000000000 --- a/1 +++ /dev/null @@ -1,11 +0,0 @@ -SkillShot tweaks -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# -# On branch master -# Your branch is up to date with 'origin/master'. -# -# Changes to be committed: -# modified: src/main/java/com/gmail/nossr50/skills/archery/Archery.java -# modified: src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java -# diff --git a/mcmmo-core/build.gradle.kts b/mcmmo-core/build.gradle.kts index 2f241a6de..2d67042f8 100644 --- a/mcmmo-core/build.gradle.kts +++ b/mcmmo-core/build.gradle.kts @@ -1,4 +1,5 @@ import org.apache.tools.ant.filters.ReplaceTokens +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { `java-library` @@ -7,10 +8,6 @@ plugins { tasks { - build { - dependsOn(shadowJar) - } - shadowJar { dependencies { include(dependency("org.spongepowered:configurate-yaml")) @@ -20,14 +17,24 @@ tasks { include(dependency("org.apache.tomcat:tomcat-jdbc")) include(dependency("org.apache.tomcat:tomcat-juli")) include(dependency("com.typesafe:config")) + include(dependency("co.aikar:acf-core")) include(dependency("co.aikar:acf-bukkit")) +// include(dependency("co.aikar:locales")) +// include(dependency("co.aikar:table")) +// include(dependency("net.jodah:expiring-map")) exclude(dependency("org.spigotmc:spigot")) } relocate("org.apache.commons.logging", "com.gmail.nossr50.commons.logging") relocate("org.apache.juli", "com.gmail.nossr50.database.tomcat.juli") relocate("org.apache.tomcat", "com.gmail.nossr50.database.tomcat") relocate("org.bstats", "com.gmail.nossr50.metrics.bstat") - relocate("co.aikar.commands", "com.gmail.nossr50.acf") + relocate("co.aikar.commands", "com.gmail.nossr50.aikar.commands") + relocate("co.aikar.locales", "com.gmail.nossr50.aikar.locales") + relocate("co.aikar.table", "com.gmail.nossr50.aikar.table") + relocate("net.jodah.expiringmap", "com.gmail.nossr50.expiringmap") + +// archiveBaseName.set("mcMMO") + mergeServiceFiles() } processResources { @@ -36,6 +43,16 @@ tasks { } } + + build { + dependsOn(shadowJar) + } +} + +tasks.named("shadowJar") { + dependencies{ + include { true } + } } @@ -45,8 +62,11 @@ dependencies { api("org.spongepowered:configurate-core:3.7-SNAPSHOT") api("org.spongepowered:configurate-yaml:3.7-SNAPSHOT") api("org.spongepowered:configurate-hocon:3.7-SNAPSHOT") - api("co.aikar:acf-parent:0.5.0-SNAPSHOT") - api("co.aikar:acf-bukkit:0.5.0-SNAPSHOT") + api("co.aikar:acf-core:0.5.0-SNAPSHOT") //Don't change without updating the artifacts for its dependencies (see the other comments) + api("co.aikar:acf-bukkit:0.5.0-SNAPSHOT") //Don't change without updating the artifacts for its dependencies (see the other comments) +// api("co.aikar:locales:1.0-SNAPSHOT") //ACF 0.5.0-SNAPSHOT is dependent on this version of locales +// api("co.aikar:table:1.0.0-SNAPSHOT") //ACF 0.5.0-SNAPSHOT is dependent on this version of table +// api("net.jodah:expiring-map:0.5.8") //ACF 0.5.0-SNAPSHOT is dependent on this version of expiring map implementation("org.jetbrains:annotations:17.0.0") implementation("org.apache.maven.scm:maven-scm-provider-gitexe:1.8.1") implementation("org.bstats:bstats-bukkit:1.4") diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/util/nbt/NBTManager.java b/mcmmo-core/src/main/java/com/gmail/nossr50/util/nbt/NBTManager.java index 4fb1154f7..0c41ee48f 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/util/nbt/NBTManager.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/util/nbt/NBTManager.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.util.nbt; -import net.minecraft.server.v1_14_R1.NBTBase; +import com.gmail.nossr50.core.nbt.NBTBase; import net.minecraft.server.v1_14_R1.NBTList; import net.minecraft.server.v1_14_R1.NBTTagCompound; import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack; @@ -149,7 +149,7 @@ public class NBTManager { } } - public NBTBase constructNBT(String nbtString) { + public net.minecraft.server.v1_14_R1.NBTBase constructNBT(String nbtString) { try { return CraftNBTTagConfigSerializer.deserialize(nbtString); } catch (Exception e) {