From ffc533fab34b369a0a53c97767152ae222e5d9ef Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Thu, 1 Jul 2021 12:20:27 -0500 Subject: [PATCH] Temporarily force-apply paper's reobf mappings patch --- ...5-Apply-paper-s-reobf-mappings-patch.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 patches/server/0225-Apply-paper-s-reobf-mappings-patch.patch diff --git a/patches/server/0225-Apply-paper-s-reobf-mappings-patch.patch b/patches/server/0225-Apply-paper-s-reobf-mappings-patch.patch new file mode 100644 index 000000000..e14b453af --- /dev/null +++ b/patches/server/0225-Apply-paper-s-reobf-mappings-patch.patch @@ -0,0 +1,51 @@ +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 + +Workaround until paperweight implements reobf mappings patch support for forks + +diff --git a/build.gradle.kts b/build.gradle.kts +index fba83a632abace5c2b280ea5919175f9574429f6..f88ade92a25cb5eda7abc658551a42318af66ce9 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -1,10 +1,16 @@ + import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer + import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer + import io.papermc.paperweight.tasks.BaseTask ++import io.papermc.paperweight.tasks.GenerateReobfMappings ++import io.papermc.paperweight.tasks.PatchMappings ++import io.papermc.paperweight.util.Constants + 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.text.SimpleDateFormat +@@ -108,6 +114,22 @@ publishing { + } + } + ++val generateReobfMappings = rootProject.tasks.named("generateReobfMappings") ++ ++val patchReobfMappings by tasks.registering { ++ inputMappings.set(generateReobfMappings.flatMap { it.reobfMappings }) ++ patch.set(rootProject.layout.cache.resolve("paperweight/upstreams/paper/build-data/reobf-mappings-patch.tiny")) ++ ++ fromNamespace.set(Constants.DEOBF_NAMESPACE) ++ toNamespace.set(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("generatePomFileForMavenPublication") + + tasks.shadowJar {