Move cb version definition to gradle patch

This commit is contained in:
Jason Penilla 2024-04-27 14:02:33 -07:00
parent b7e148a107
commit a390119b04
No known key found for this signature in database
GPG key ID: 0E75A301420E48F8
9 changed files with 26 additions and 39 deletions

View file

@ -6,34 +6,18 @@ Subject: [PATCH] Plugin remapping
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
diff --git a/build.gradle.kts b/build.gradle.kts
index 3587ff0a4c0fe92c99501aa5251f379481e43437..600b442986fa5ca9dd12f900caa284b854cc30ca 100644
index f4198f997d82ccf761137cda8c1827e202686c75..600b442986fa5ca9dd12f900caa284b854cc30ca 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -44,9 +44,13 @@ dependencies {
@@ -44,6 +44,7 @@ dependencies {
testImplementation("org.ow2.asm:asm-tree:9.7")
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
+ implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
+}
+
+paperweight {
+ craftBukkitPackageVersion.set("v1_20_R4") // also needs to be updated in MappingEnvironment
}
-val craftbukkitPackageVersion = "1_20_R4" // Paper
tasks.jar {
archiveClassifier.set("dev")
@@ -66,7 +70,7 @@ tasks.jar {
"Specification-Vendor" to "Bukkit Team",
"Git-Branch" to gitBranch, // Paper
"Git-Commit" to gitHash, // Paper
- "CraftBukkit-Package-Version" to craftbukkitPackageVersion, // Paper
+ "CraftBukkit-Package-Version" to paperweight.craftBukkitPackageVersion.get(), // Paper
)
for (tld in setOf("net", "com", "org")) {
attributes("$tld/bukkit", "Sealed" to true)
@@ -155,20 +159,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
paperweight {
@@ -158,20 +159,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
runtime.filterNot { it.asFile.absolutePath == vanilla }
}