PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reobfJar failed at patchReobfMappings

Foorcee opened this issue · comments

The reobfJar task fails with paperweight 1.1.9-SNAPSHOT

* What went wrong:
A problem was found with the configuration of task ':Fork-Tuinity-Server:patchReobfMappings' (type 'PatchMappings').
  - Type 'io.papermc.paperweight.tasks.PatchMappings' property 'patch' specifies file '...\ForkTuinity1.17\.gradle\CACHE_PATH\paperweight\upstreams\paper\build-data\reobf-mappings-patch.tiny' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.
    
    Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 9s

img

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marco <mneuhaus44@gmail.com>
Date: Mon, 5 Jul 2021 18:37:56 +0200
Subject: [PATCH] modify build.gradle.kts


diff --git a/build.gradle.kts b/build.gradle.kts
index eba0f4599d3cbd4af3c13f2279897ddd0b7bb334..410fcfb82675cacf3536c05a87780bc7151a0b48 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,7 +3,7 @@ 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.constants.*
 import io.papermc.paperweight.util.Git
 import io.papermc.paperweight.util.cache
 import io.papermc.paperweight.util.defaultOutput
@@ -119,8 +119,8 @@ val patchReobfMappings by tasks.registering<PatchMappings> {
     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)
+    fromNamespace.set(DEOBF_NAMESPACE)
+    toNamespace.set(SPIGOT_NAMESPACE)
 
     outputMappings.set(layout.cache.resolve("paperweight/mappings/reobf-patched.tiny"))
 }

Not a paperweight issue. This is due to Tuinity's patch to workaround #45.

As far as an immediate solution for your fork, either
A) Revert the aforementioned workaround patch and live with #45 until it's properly fixed in paperweight
B) Fix/modify the workaround yourself, rootProject.layout.cache.resolve("paperweight/upstreams/paper/build-data/reobf-mappings-patch.tiny") needs to be changed to point to where this file actually is in your setup