Code Monkey home page Code Monkey logo

paperweight's People

Contributors

bramhaag avatar cijaaimee avatar clrxbl avatar denwav avatar electronicboy avatar jpenilla avatar kashike avatar kennytv avatar lynxplay avatar machine-maker avatar minidigger avatar octylfractal avatar prof-bloodstone avatar proximyst avatar rgbcube avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperweight's Issues

Add easy way to disable mojmap conversion for forks based off pre 1.17

It is currently impossible to maintain a fork pre 1.17 with this because of the forced mojmap steps. It would be nice to have a setting to disable just those steps so we don't have to deal with hassle of either remapping all of the patches or manually editing the gradle task list.

User dev plugin fails on prepareKotlinBuildScriptModel

Currently the userdev plugin fails because the diff option --color=never is not recognized by the present diff cli tool.
In every patch in the directory .gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/ the following is printed.

diff: unrecognized option --color=never' diff: Try diff --help' for more information.

I probably can fix that myself by installing a diff tool the support this color parameter but it could be a big issue for others.
Additionally it tries to apply package-info patches which aren't present here.

Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply /Users/myUser/gitWorldBorderAPI/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/package-info.java.patch Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply /Users/myUser/git/WorldBorderAPI/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/package-info.java.patch

Provide the dependencies from userdev plugin also for tests

Hello!

I'm not 100% sure whether I'm doing something wrong or if this is missing as of now (since I'm pretty new to Gradle), so please be lenient with me:

Judging by the example/test plugin for the userdev plugin provided here, only a single dependency (a bundle) has to be added to the dependencies section and this bundle contains the API and NMS dependencies.

But we've got tests that also depend on NMS code and it seems the bundle will only register the dependencies for something like compileOnly (totally guessing that one), so the classes don't get added to the classpath of testCompile. Is it possible to also provide the dependencies to the test classpath (ideally as testImplementation)?

Thanks for reading!

Userdev plugin injected repositories are missing for PMD

Hello!

Since I've got no clue on how the plugin performs the injection of the repositories (quiltmc.org, aikar.co, emc.gs, velocitypowered.com, etc.) and I don't want to create an xy-problem, I'll just outline my problem:

We perform a PMD analysis as part of our CI pipeline and PMD is also invoked as part of gradle build. This task fails with the message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':pmdMain'.
> Could not resolve all task dependencies for configuration ':mainPmdAuxClasspath'.
   > Could not find org.quiltmc:tiny-mappings-parser:0.3.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/quiltmc/tiny-mappings-parser/0.3.0/tiny-mappings-parser-0.3.0.pom
       - https://oss.sonatype.org/content/groups/public/org/quiltmc/tiny-mappings-parser/0.3.0/tiny-mappings-parser-0.3.0.pom
       - https://papermc.io/repo/repository/maven-public/org/quiltmc/tiny-mappings-parser/0.3.0/tiny-mappings-parser-0.3.0.pom
       - https://libraries.minecraft.net/org/quiltmc/tiny-mappings-parser/0.3.0/tiny-mappings-parser-0.3.0.pom
     Required by:
         project :
   > Could not find com.velocitypowered:velocity-native:1.1.0-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/velocity-native-1.1.0-SNAPSHOT.pom
       - https://oss.sonatype.org/content/groups/public/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/groups/public/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/velocity-native-1.1.0-SNAPSHOT.pom
       - https://papermc.io/repo/repository/maven-public/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/maven-metadata.xml
       - https://papermc.io/repo/repository/maven-public/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/velocity-native-1.1.0-SNAPSHOT.pom
       - https://libraries.minecraft.net/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/maven-metadata.xml
       - https://libraries.minecraft.net/com/velocitypowered/velocity-native/1.1.0-SNAPSHOT/velocity-native-1.1.0-SNAPSHOT.pom
     Required by:
         project :

Since the repositories in question are not included in the "locations" part of the message (aside from papermc, which I added manually), this makes me believe that the repositories are not injected for this task. Could the repositories be added to other stages/tasks as well, so that the dependencies can be resolved for plugins like PMD?

Incompatible with macOS AArch64

I get the following error with paperweight on the M1 MacBook Air:

> Task :generateReobfMappings FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateReobfMappings'.
> Error while evaluating property 'launcher' of task ':generateReobfMappings'
   > Failed to query the value of task ':generateReobfMappings' property 'launcher'.
      > Unable to download toolchain matching these requirements: {languageVersion=16, vendor=ADOPTOPENJDK, implementation=vendor-specific}
         > Unable to download toolchain. This might indicate that the combination (version, architecture, release/early access, ...) for the requested JDK is not available.
            > Could not read 'https://api.adoptopenjdk.net/v3/binary/latest/16/ga/mac/aarch64/jdk/hotspot/normal/adoptopenjdk' as it does not exist.

* 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

This is because the file at that URL gives the error message {"errorMessage":"No releases match the request"} since there is currently no AArch64 build for AdoptOpenJDK. Currently, I am using Zulu JDK since it does have an AArch64 release.

Rework dev bundle patch generation to not use GNU diff

This is generally not very high priority as most of the time dev bundles will be generated by CI and published to maven, but it would be nice to not need GNU diff for dev bundle generation, for easier local testing on macOS (for those who for some reason don't install GNU coreutils) and Windows.

Two possible alternatives are

  • Using git to generate the patches (looked into briefly before and didn't have much luck, but I was probably missing something obvious)
  • Using Diff4j/Diffpatch/something else to generate the patches

Implement arbitrary patch set support

Patch sets would have properties which define how they are applied and what they are etc.

Example config in Kotlin I came up with on the fly:

patchSets {
    "base" {
        "decomp"()
        "impl" {
            patchType = PatchType.FILE
        }
    }
    "feature" {
        "async" {
            "some-thing"()
            "other-thing"()
        }
    }
}

A language designed for configuration like hocon (or other options) may be better and cleaner. There may be other options and properties for patch sets as well.

This is just for book keeping so I don't forget about building out this functionality.

More Missed Mappings (after 1.17.1 update)

Some mappings that are incorrect after the 1.17.1 update.

  1. The GeneratorSettings object named "Y" in net.minecraft.server.dedicated.DedicatedServerProperties now has a private access modifier instead of public
  2. The Executor object named "aA" in net.minecraft.server.MinecraftServer has been renamed to "az"
  3. The DataPackResources object named "aC" in net.minecraft.server.MinecraftServer has been renamed to "aB"

Add helpful message for when `git` is not installed

Currently Paperweight doesn't check whether git is installed, resulting in a bit cryptic error:

$ ./gradlew applyPatches
<CRAP>
FAILURE: Build failed with an exception.

* Where:
Build file '/root/Paper/build.gradle.kts' line: 1

* What went wrong:
An exception occurred applying plugin request [id: 'io.papermc.paperweight.core', version: '1.1.6']
> Failed to apply plugin 'io.papermc.paperweight.core'.
   > Failed to call git command: git -c commit.gpgsign=false -c core.safecrlf=false submodule update --init

* 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 27s

If paperweight depends on other tools to be installed (patch perhaps?), it'd be good to handle them too.

Allow forking Paper-MojangAPI

This is a requirement for forks otherwise they end up with an error:
Project with path ':Paper-MojangAPI' could not be found in project ':Purpur-Server'

Investigate methods of moving dependency downloads to configurations

For simplicity and to just get paperweight working I have dependencies downloading in tasks using a download service that I copied from the download-task plugin. This works fine but isn't able to cache as well as Gradle's built-in dependency system.

There's some issues which makes this not a terribly straight-forward thing to do, but I have some ideas now that I've learned more about Gradle on how I can actually do this successfully. Not guaranteed though.

Fork: PaperRef change not detected when running applyPatches

I feel this mechanic of the system got broken or got changed with issue: #25
note: this was using the useStandardUpstream type which could have been a bit different in behavior but they look the same in working

  • check if this also happens on a blank Paper Fork repo

Maybe there is a way to match PaperRef to cached paper repo,
If HEAD = PaperRef commit hash else
Re-pull and rerun all the steps that normally get bypassed due to changed made #25

or was this intentional and someone should run cleanCache before applyPatches?

Cross-project configuration resolution

Starting with Gradle 7.1.1, resolving configurations of another project in a task is now deprecated for removal in Gradle 8 (see https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors).

This warning is currently triggered for reobfJar in core and patcher.

These are some possible solutions, in no particular order:

  1. Resolve the remapper configuration during configuration time and provide the list of resolved files to RemapJar
  2. Add a remapper configuration to the server project as well
  3. Move reobfJar to the parent project instead of the server project

How to use paperweight in plugin development env

Does anybody has an example by hand how to use paperweight without gradle kotlin dsl?

In my env I do apply the plugin

id "io.papermc.paperweight.userdev" version "1.1.12"

But then using

dependencies {
        paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.17.1-R0.1-SNAPSHOT")

Fails

Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:89)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:346)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:249)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:141)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy1/jdk.proxy1.$Proxy47.afterEvaluate(Unknown Source)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:183)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:180)
	at org.gradle.api.internal.project.DefaultProject.stepEvaluationListener(DefaultProject.java:1454)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:189)
	... 175 more
Caused by: java.lang.NoClassDefFoundError: org/gradle/util/internal/NameMatcher
	at io.papermc.paperweight.userdev.PaperweightUser$apply$4.execute(PaperweightUser.kt:134)
	at io.papermc.paperweight.userdev.PaperweightUser$apply$4.execute(PaperweightUser.kt:48)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:100)
	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:152)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction.execute(DefaultListenerBuildOperationDecorator.java:149)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:95)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:83)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:43)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:245)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:157)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:61)
	... 185 more

Im on gradle 7.2.0 and java 16

I have found few projects on github that seems to utilize paperweight for plugin dev into some extent, but all of these were using kotlin dsl.

I would like to make it work on gradle - groovy.

Allow forks to import mc dev

There is currently no way for forks to be able to have mc dev imports, making it impossible to update/create many patches.

patchCraftBukkit caching sometimes fails on macOS

#60 may have introduced a regression in that on macOS the unpacked build cache entry for patchCraftBukkit is sometimes not a git repo, which causes the task to fail.

Only previously tested on linux where it worked fine.

A possible solution/workaround is to zip the task output

update: seems to work after clearing and rebuilding caches, may be possible that I just had an invalid cache entry somehow? If anyone else runs into this issue please comment.

fork applyPatches repatches paper everytime without any change to paperRef

It feels a bit redundant to repatches paper repo every time
someone does applyPatches on there fork

like it goes from
applyApiPatches -> applyServerPatches -> paper:Paper-API:compileJava -> :paper:Paper-API:jar -> :paper:Paper-MojangAPI:compileJava -> :paper:Paper-Server:compileJava -> :paper:Paper-Server:processResources -> :paper:Paper-Server:shadowJar -> :paper:generateReobfMappings -> applyApiPatches(fork) -> applyServerPatches(fork)

I feel that the steps in the code annotation feel a bit useless for a fork to run if the fork just copies over the repo after it has finished patches.
or there is a specific reasoning for doing all the extra tasks to ensure that upstream is valid/or those files are needed for the fork?

possible suggestion some kind of status file to Ref check gradle.properties to a file that hold current Ref used or check against the paper repo latest commit if the paper upstream repo needs pulling or not or rebuilding cause something has changed

Cause it feels a bit waste of time to reapply all not changing paper patches everytime a fork does a applyPatches

applyApiPatches results into a NoSuchFileException looking for a paperweight cache when using paperweight on a project that forks Paper.

> Task :tuinity:applyApiPatches FAILED
   Creating Tuinity-API from patch source...
   Applying patches to Tuinity-API...

> Task :getTuinityUpstreamData FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tuinity:applyApiPatches'.
> java.nio.file.NoSuchFileException: /home/michael/byof/.gradle/caches/paperweight/upstreams/tuinity/.gradle/caches/paperweight8488332766456530141

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

Full stacktrace:
https://paste.gg/p/anonymous/0ca9a6bc1bbf4b72abeeb3060d8f2a14

Project / build.gradle.kts used:
https://github.com/clrxbl/byof/blob/ver/1.17/build.gradle.kts

Missed Mapping

https://i.imgur.com/pN4IBO8.png

I can see the mapping in spigot-mojang+yarn+fields.csrg:
net/minecraft/server/level/WorldServer E serverLevelData
and offical-spigot.tiny:
f Ldih; E serverLevelData
but not in the reobf mappings or any of the other spigot-mojang mappings

mojang name for the class is ServerLevel

mcdev imports not processed when using submodules

When adding an import to dev-imports.txt using the default paperweight config (with usePaperUpstream and a paperRef property), everything works fine, and just before my fork's server patches are applied, I can see this:

Importing 1 classes from vanilla...
Importing 0 classes from library sources...

But when using the submodule configuration (with upstreams tag in paperweight config, I used the examples from this repo) the imports are not processed. The two lines above are never printed.

Here is my full working upstream config:

    usePaperUpstream(providers.gradleProperty("paperRef")) {
        withPaperPatcher {
            apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
            apiOutputDir.set(layout.projectDirectory.dir("Papyrus-API"))

            serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
            serverOutputDir.set(layout.projectDirectory.dir("Papyrus-Server"))
        }
    }

And here is the submodule one that does not process imports:

    upstreams {
        register("paper") {
            upstreamDataTask {
                dependsOn(initSubmodules)
                projectDir.set(paperDir)
            }

            patchTasks {
                register("api") {
                    upstreamDir.set(paperDir.dir("Paper-API"))
                    patchDir.set(layout.projectDirectory.dir("patches/api"))
                    outputDir.set(layout.projectDirectory.dir("Papyrus-API"))
                }
                register("server") {
                    upstreamDir.set(paperDir.dir("Paper-Server"))
                    patchDir.set(layout.projectDirectory.dir("patches/server"))
                    outputDir.set(layout.projectDirectory.dir("Papyrus-Server"))
                }
            }
        }
    }

I'm using paperweight 1.1.6.

Provide a Mod Development Kit (MDK)

This is a tracking issue per this brief discussion for the MDK.

Notable items:

  • Implement a MDK gradle plugin (?) to allow easily developing mods against mojang mappings, then building the mod with runtime mappings
  • Document the usage of said MDK

Allow forks to create paperclip jar

The paperclipJar task doesnt work on paper forks

image

and it doesn't show up when running gradlew tasks

image

Here is the copy of build.gradle.kts

plugins {
    java
    id("com.github.johnrengelman.shadow") version "7.0.0" apply false
    id("io.papermc.paperweight.patcher") version "1.1.0-SNAPSHOT"
}

repositories {
    mavenCentral()
    maven("https://papermc.io/repo/repository/maven-public/") {
        content {
            onlyForConfigurations("paperclip")
        }
    }
    maven("https://maven.quiltmc.org/repository/release/") {
        content {
            onlyForConfigurations("remapper")
        }
    }
}

dependencies {
    remapper("org.quiltmc:tiny-remapper:0.4.1")
    paperclip("io.papermc:paperclip:2.0.0@jar")
}

subprojects {
    apply(plugin = "java")

    java {
        toolchain {
            languageVersion.set(JavaLanguageVersion.of(16))
        }
    }

    tasks.withType<JavaCompile>().configureEach {
        options.isIncremental = true
        options.isFork = true
        options.encoding = "UTF-8"
        options.release.set(16)
    }

    repositories {
        mavenCentral()
        maven("https://libraries.minecraft.net/")
        maven("https://repo.codemc.io/repository/maven-public/")
        maven("https://oss.sonatype.org/content/groups/public/")
        maven("https://papermc.io/repo/repository/maven-public/")
        maven("https://ci.emc.gs/nexus/content/groups/aikar/")
        maven("https://repo.aikar.co/content/groups/aikar")
        maven("https://repo.md-5.net/content/repositories/releases/")
        maven("https://hub.spigotmc.org/nexus/content/groups/public/")
        maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
        maven("https://oss.sonatype.org/content/repositories/snapshots/")
    }
}
paperweight {
    serverProject.set(project(":Yatopia-Server"))

    usePaperUpstream(providers.gradleProperty("paperCommit")) {
        withPaperPatcher {
            apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
            apiOutputDir.set(layout.projectDirectory.dir("Yatopia-API"))

            serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
            serverOutputDir.set(layout.projectDirectory.dir("Yatopia-Server"))
        }
    }
}

Project doesn't compile

Three problems:

  1. The repo "https://repo.demonwav.com/snapshots/" dependency "org.cadixdev:mercury:0.1.0-rc2-SNAPSHOT" throws a 502, erroring the build
    Since @DemonWav seems to be the main contributor, this is probably just their repo server going down.
  2. GenerateMappings line 80 throws a resolution ambiguity error
    simple enough fix, cast null to a classloader
  3. Doesn't provide a plugin with the right id
    Full error:
  • What went wrong:
    Could not apply requested plugin [id: 'io.papermc.paperweight', version: '1.0.0-LOCAL-SNAPSHOT'] as it does not provide a plugin with id 'io.papermc.paperweight'. This is caused by an incorrect plugin implementation. Please contact the plugin author(s).

Plugin with id 'io.papermc.paperweight' not found.

Run Server Task

Pretty simple, add a task that builds a new paperclip and then runs it (in a directory more sensible than build/libs).

Update all filesystem interactions to NIO.2

Lots of Gradle APIs still use the old File API, but other than that everything should be using Path.

If done right this will solve the current issues paperweight has with running on Windows without resorting to ugly String interactions.

Add a functionality to cleanup project

Currently there is no paperweight task to cleanup / delete api and server output dir.
Once these folders are in a cursed state, applyPatches fails.

โฏ ./gradlew applyPatches

> Configure project :Some-Server
e: ~/Some-Fork/Some-Server/build.gradle.kts:83:24: Unresolved reference: reobfJar
e: ~/Some-Fork/Some-Server/build.gradle.kts:146:21: Unresolved reference: reobfJar
e: ~/Some-Fork/Some-Server/build.gradle.kts:146:40: Unresolved reference: it

FAILURE: Build failed with an exception.

* Where:
Build file '~/Some-Fork/Some-Server/build.gradle.kts' line: 83

* What went wrong:
Script compilation errors:

  Line 083:         artifact(tasks.reobfJar) {
                                   ^ Unresolved reference: reobfJar

  Line 146:     classpath(tasks.reobfJar.flatMap { it.outputJar })
                                ^ Unresolved reference: reobfJar

  Line 146:     classpath(tasks.reobfJar.flatMap { it.outputJar })
                                                   ^ Unresolved reference: it

3 errors

Fix Command finished with 128 exit code / Filename too long [Windows]

I had this issue when building our fork with paperweight.
I executed ./gradlew applyPatches in Git bash.

> Task :tuinity:paper:patchCraftBukkit FAILED
> Task :tuinity:getPaperUpstreamData FAILED
> Task :getTuinityUpstreamData FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tuinity:paper:patchCraftBukkit'.
> io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply --ignore-whitespace --directory=src/main/java ...Tuinity1.17\.gradle\caches\paperweight\upstreams\paper\.gradle\caches\paperweight\taskCache\patchCraftBukkitPatches.zip--1588702556\net\minecraft\world\entity\ai\goal\target\PathfinderGoalNearestAttackableTarget.patch

* 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

After trying to run the command manually, git tells me that the filename is too long.

The solution is to enable the following option in Git:
git config --global core.longpaths true

Look into cross project task dependencies

> Task :paper:Paper-API:jar
Execution optimizations have been disabled for task ':paper:Paper-API:jar' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\classes\java\main'. Reason: Task ':paper:Paper-API:jar' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to
 https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\pom.properties'. Reason: Task ':paper:Paper-API:jar' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to ht
tps://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\resources\main'. Reason: Task ':paper:Paper-API:jar' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to ht
tps://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\tmp\jar\MANIFEST.MF'. Reason: Task ':paper:Paper-API:jar' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer
to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :paper:Paper-MojangAPI:compileJava
Execution optimizations have been disabled for task ':paper:Paper-MojangAPI:compileJava' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\classes\java\main'. Reason: Task ':paper:Paper-MojangAPI:compileJava' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. P
lease refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-MojangAPI\src\main\java\com\destroystokyo\paper\event\brigadier\AsyncPlayerSendCommandsEvent.java:30: warning: [dep-ann] deprecated item is not annotated with @Deprecated
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
       ^
D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-MojangAPI\src\main\java\com\destroystokyo\paper\event\brigadier\CommandRegisteredEvent.java:24: warning: [dep-ann] deprecated item is not annotated with @Deprecated
public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
       ^
2 warnings

> Task :paper:Paper-Server:compileJava
Execution optimizations have been disabled for task ':paper:Paper-Server:compileJava' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\.gradle\caches\paperweight\taskCache\minecraft.jar'. Reason: Task ':paper:Paper-Server:compileJava' uses this output of task ':paper:copyResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are
 executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\classes\java\main'. Reason: Task ':paper:Paper-Server:compileJava' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Plea
se refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\src\main\java'. Reason: Task ':paper:Paper-Server:compileJava' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please r
efer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Note: Processing Log4j annotations
Note: Annotations processed
Note: Processing Log4j annotations
Note: No elements to process
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :paper:Paper-Server:processResources
Execution optimizations have been disabled for task ':paper:Paper-Server:processResources' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\src\main\resources'. Reason: Task ':paper:Paper-Server:processResources' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed
. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :paper:Paper-Server:shadowJar
Execution optimizations have been disabled for task ':paper:Paper-Server:shadowJar' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\.gradle\caches\paperweight\taskCache\minecraft.jar'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:copyResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are e
xecuted. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-API\build\libs\Paper-API-1.17-R0.1-SNAPSHOT.jar'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:applyApiPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks
are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\build\classes\java\main'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\build\publications\maven\pom-default.xml'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tas
ks are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\build\resources\main'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Ple
ase refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\build\tmp\shadowJar\MANIFEST.MF'. Reason: Task ':paper:Paper-Server:shadowJar' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are ex
ecuted. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :paper:generateReobfMappings
Execution optimizations have been disabled for task ':paper:generateReobfMappings' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'D:\IntellijProjects\ForkTest\.gradle\caches\paperweight\upstreams\paper\Paper-Server\build\libs\Paper-Server-1.17-R0.1-SNAPSHOT-mojang-mapped.jar'. Reason: Task ':paper:generateReobfMappings' uses this output of task ':paper:applyServerPatches' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on
 what order the tasks are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

1.1.7 causes exception for forks of forks

Reproduction:

  1. Clone https://github.com/clrxbl/byof/
  2. Set the version of paperweight to 1.1.8
  3. Update tuinityRef to 05711635d69b64ee17dbbe9171887d1d45e54a4f
  4. Run applyPatches

Result:

> Task :getTuinityUpstreamData FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':tuinity:applyServerPatches'.
> Failed to query the value of task ':tuinity:applyServerPatches' property 'sourceMcDevJar'.
   > fromJson(json, typeToken<T>()) must not be null

Stacktrace:

Caused by: java.lang.IllegalStateException: fromJson(json, typeToken<T>()) must not be null
        at io.papermc.paperweight.util.UpstreamDataKt.readUpstreamData(UpstreamData.kt:56)
        at io.papermc.paperweight.patcher.PaperweightPatcher$readUpstreamData$1$1$1.call(PaperweightPatcher.kt:148)
        at io.papermc.paperweight.patcher.PaperweightPatcher$readUpstreamData$1$1$1.call(PaperweightPatcher.kt:148)
        at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:66)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.FlatMapProvider.calculateOwnValue(FlatMapProvider.java:50)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.FlatMapProvider.calculateOwnValue(FlatMapProvider.java:50)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:64)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:64)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.MappingProvider.calculateOwnValue(MappingProvider.java:55)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
        at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:128)
        at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:25)
        at org.gradle.api.internal.provider.AbstractProperty.doCalculateValue(AbstractProperty.java:133)
        ... 189 more

Obscure error when trying to compile paper with java 8

java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Program%20Files/AdoptOpenJDK/jdk-8.0.292.10-hotspot/jre/lib/rt.jar
at paper.libs.dev.denwav.hypo.model.SystemClassProviderRootJdk8.(SystemClassProviderRootJdk8.java:63)

I suggest either adding a better exception message or fixing the bug.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateMappings'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:186)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Program%20Files/AdoptOpenJDK/jdk-8.0.292.10-hotspot/jre/lib/rt.jar
	at paper.libs.dev.denwav.hypo.model.SystemClassProviderRootJdk8.<init>(SystemClassProviderRootJdk8.java:63)
	at paper.libs.dev.denwav.hypo.model.SystemClassProviderRoot.newInstance(SystemClassProviderRoot.java:63)
	at paper.libs.dev.denwav.hypo.model.ClassProviderRoot.ofJdk(ClassProviderRoot.java:105)
	at io.papermc.paperweight.tasks.GenerateMappings.run(GenerateMappings.kt:109)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:506)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:74)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:74)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:491)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:474)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:106)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:271)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:249)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:83)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:47)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:50)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:85)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:42)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:91)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:51)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:72)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:46)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:284)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:185)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

reobfJar failed at patchReobfMappings

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 <[email protected]>
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"))
 }

Newly added overriding methods with covariant return types are not remapped during reobf

When a method override another with a subclass return type, the output of reobfJar is incorrect.

Example (Spigot names):
There is a #getChunkAt(int, int) method in the World class that returns a Chunk, which overrides a method in the IBlockAccess interface (returns an IChunkAccess). In the remapped .jar, the World#getChunkAt method refers to the interface method, and a new method is added in the World class, #getChunk(int, int), the non-remapped method.

Testing code: https://paste.gg/p/syldium/fe11735592144369b594e5cae3f60a4c

Add tasks to edit individual patches

The original paper tool had editing commands which simplified the cherry picking and patch creation after editing.

Would be nice to have such a feature in the new tool chain too (and maybe even a bit better working as the old one re-build all patches instead of only the edited folders and also didn't allow for editing both in parallel)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.