This commit is contained in:
Nassim Jahnke 2024-04-23 21:23:27 +02:00
parent 380c4d2313
commit 7cdf804392
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
23 changed files with 199 additions and 502 deletions

View file

@ -28,10 +28,10 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..8116ef8a1d098f0fe4fab661f913132ce3ec4ae9
index 0000000000000000000000000000000000000000..4ceb1ff4349ce60b418a2cb1140f2612139ccb5d
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,141 @@
@@ -0,0 +1,124 @@
+import io.papermc.paperweight.util.*
+
+plugins {
@ -87,28 +87,11 @@ index 0000000000000000000000000000000000000000..8116ef8a1d098f0fe4fab661f913132c
+
+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 {