This commit is contained in:
Nassim Jahnke
2024-04-23 21:23:27 +02:00
parent a616fad617
commit 0898d2405e
19 changed files with 66 additions and 369 deletions

View File

@@ -87,28 +87,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+publishing {
+ publications.create<MavenPublication>("maven") {
+ artifact(tasks.shadowJar)
+ }
+}
+
+relocation {
+ // Order matters here - e.g. craftbukkit proper must be relocated before any of the libs are relocated into the cb package
+ relocate("org.bukkit.craftbukkit" to "org.bukkit.craftbukkit.v$craftbukkitPackageVersion") {
+ exclude("org.bukkit.craftbukkit.Main*")
+ }
+}
+
+tasks.shadowJar {
+ configurations = listOf(project.configurations.vanillaServer.get())
+ archiveClassifier.set("mojang-mapped")
+
+ for (relocation in relocation.relocations.get()) {
+ relocate(relocation.fromPackage, relocation.toPackage) {
+ for (exclude in relocation.excludes) {
+ exclude(exclude)
+ }
+ }
+ }
+}
+
+tasks.test {