From 4f14647c373e4b13f18a617059907a1c15af7a38 Mon Sep 17 00:00:00 2001 From: Riley Park Date: Thu, 17 Jun 2021 20:38:22 -0700 Subject: [PATCH] Thanks for joining us for the magic show tonight --- patches/server/0001-Setup-Gradle-project.patch | 8 ++++---- patches/server/0003-Build-system-changes.patch | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 0f2ae5ca19..9f3bc56dc2 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -20,7 +20,7 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..3e05459f27c4c5697ae65da504d67a6a /.project diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..393f282ea082772593ae34c0b3d3dcd2ea9e4c52 +index 0000000000000000000000000000000000000000..fada7057dcb81c3206bdb0ca1730c3df2420ae3e --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,135 @@ @@ -101,6 +101,9 @@ index 0000000000000000000000000000000000000000..393f282ea082772593ae34c0b3d3dcd2 +tasks.shadowJar { + archiveClassifier.set("mojang-mapped") + ++ relocate("org.bukkit.craftbukkit", "org.bukkit.craftbukkit.v$packageVersion") { ++ exclude("org.bukkit.craftbukkit.Main*") ++ } + listOf( + "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io", + "org.apache.commons.lang3", "org.apache.http", "org.apache.maven", "org.codehaus.plexus", @@ -108,9 +111,6 @@ index 0000000000000000000000000000000000000000..393f282ea082772593ae34c0b3d3dcd2 + ).forEach { pack -> + relocate(pack, "org.bukkit.craftbukkit.libs.$pack") + } -+ relocate("org.bukkit.craftbukkit", "org.bukkit.craftbukkit.v$packageVersion") { -+ exclude("org.bukkit.craftbukkit.Main*") -+ } + mergeServiceFiles() + transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java) +} diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index 520965d72a..0e7ca16999 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes diff --git a/build.gradle.kts b/build.gradle.kts -index 393f282ea082772593ae34c0b3d3dcd2ea9e4c52..f3b51015bcd765e2035e9071fab273903b48abdf 100644 +index fada7057dcb81c3206bdb0ca1730c3df2420ae3e..ba7087874f781a0de57e5a637da4c69c6aea5943 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,21 +22,23 @@ repositories { @@ -44,7 +44,7 @@ index 393f282ea082772593ae34c0b3d3dcd2ea9e4c52..f3b51015bcd765e2035e9071fab27390 ) for (tld in setOf("net", "com", "org")) { attributes("$tld/bukkit", "Sealed" to true) -@@ -72,11 +75,19 @@ publishing { +@@ -72,14 +75,22 @@ publishing { } } @@ -59,6 +59,9 @@ index 393f282ea082772593ae34c0b3d3dcd2ea9e4c52..f3b51015bcd765e2035e9071fab27390 + rename { "pom.xml" } + } + + relocate("org.bukkit.craftbukkit", "org.bukkit.craftbukkit.v$packageVersion") { + exclude("org.bukkit.craftbukkit.Main*") + } listOf( - "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io", + "jline", "org.apache.commons.codec", "org.apache.commons.io", // Paper - don't relocate fastutil