mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
47 lines
2.0 KiB
Diff
47 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Wed, 30 Jun 2021 02:33:18 -0700
|
|
Subject: [PATCH] Apply paper's reobf mappings patch
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index 628ac56388882a1bcbeae37769a99e9ccb071f66..399641413d38f1a27165a0cf60b6c7c781cf1488 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -2,9 +2,12 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCach
|
|
import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
|
import io.papermc.paperweight.tasks.BaseTask
|
|
import io.papermc.paperweight.util.Git
|
|
+import io.papermc.paperweight.util.cache
|
|
import io.papermc.paperweight.util.defaultOutput
|
|
import io.papermc.paperweight.util.openZip
|
|
import io.papermc.paperweight.util.path
|
|
+import io.papermc.paperweight.util.registering
|
|
+import io.papermc.paperweight.util.set
|
|
import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
|
|
import java.nio.file.Files
|
|
import java.util.Locale
|
|
@@ -145,6 +148,22 @@ relocation {
|
|
}
|
|
}
|
|
|
|
+val generateReobfMappings = rootProject.tasks.named<io.papermc.paperweight.tasks.GenerateReobfMappings>("generateReobfMappings")
|
|
+
|
|
+val patchReobfMappings by tasks.registering<io.papermc.paperweight.tasks.PatchMappings> {
|
|
+ inputMappings.set(generateReobfMappings.flatMap { it.reobfMappings })
|
|
+ patch.set(rootProject.layout.cache.resolve("paperweight/upstreams/paper/build-data/reobf-mappings-patch.tiny"))
|
|
+
|
|
+ fromNamespace.set(io.papermc.paperweight.util.constants.DEOBF_NAMESPACE)
|
|
+ toNamespace.set(io.papermc.paperweight.util.constants.SPIGOT_NAMESPACE)
|
|
+
|
|
+ outputMappings.set(layout.cache.resolve("paperweight/mappings/reobf-patched.tiny"))
|
|
+}
|
|
+
|
|
+tasks.reobfJar {
|
|
+ mappingsFile.set(patchReobfMappings.flatMap { it.outputMappings })
|
|
+}
|
|
+
|
|
val generatePom = tasks.named<GenerateMavenPom>("generatePomFileForMavenPublication")
|
|
|
|
tasks.shadowJar {
|