#paperweight

1 messages ยท Page 1 of 1 (latest)

hollow mistBOT
#

We're using userdev for Minecraft 1.18.2 and have all of a sudden started getting build errors.

protonull@protonull-desktop:~/Project$ ./gradlew clean reobfJar
Downloading https://services.gradle.org/distributions/gradle-7.3.2-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%

Welcome to Gradle 7.3.2!

Here are the highlights of this release:
 - Easily declare new test suites in ...
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: plugin-remapping
hollow mistBOT
#

Using paperweight-userdev, I'm trying to exclude certain transitive dependencies from the paper dev bundle. However, the configuration made in the configurationAction does not seem to be applied.

As an example, I'd expect this configuration to exclude all transitive dependencies.

paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT") { isTransitive = false }

However, when running gradlew dependencies, all transitive dependencies are still present:

\--- io.papermc....
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

I am currently developing an API for spigot, which I want to publish on a Nexus Repository.
However Nexus complains about not finding the main jar file.
This makes sense because it publishes only the -dev.jar file.
In my publish configuration I set the java component to be published by using from(components["java"])
Is there any way to publish the unobfuscated version but without the -dev?

If I understood things wrong I apologize and hope for help :)
Have a great day ๐Ÿ˜ƒ

#

Appreciate your fast response ;)

I now understood that i shouldn't replace the non-dev version with the dev version but specify the classifier.
However i cannot publish the artifact at all, because the non-dev version doesn't get published which the Nexus repository needs.
As i understood it the dev-version is the unobfuscated version and the non-dev version is the reobf. version...
Why is the reobf. version not included in the java component? Can i include it somehow?

Thanks for yo...

hollow mistBOT
#

Currently i configured the reobfJar to run always after the jar task, which means if i build the project it creates the reobf. Jar. If i publish it, it creates the reobfuscated jar before signing and publishing. However the reobf. jar still doesn't end up in the remaining task chain. (At least i think so because it doesn't get published).

hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Due to some nested classes in NMS are package-private it should be possible that Class#forName and Class#getDeclaredField are supported by the reobfjar task.

Example:

Class.forName("net.minecraft.network.ConnectionProtocol$PacketSet").getDeclaredField("classToId")
should be reobfuscated to:
Class.forName("net.minecraft.network.EnumProtocol$a").getDeclaredField("b")

or:

Entity.class.getDeclaredField("tickCount")
should be reobfuscated to:
`Entity.class.getDeclaredFiel...

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.5.6
hollow mistBOT
#

I followed the instructions at https://docs.papermc.io/paper/dev/userdev, and got the following build.gradle.kts

plugins {
    kotlin("jvm") version "1.9.0"
    id("io.papermc.paperweight.userdev") version "1.5.5"
}

group = "net.yukijoou"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
    // compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
    paperweight....
hollow mistBOT
#

Expected behavior

Updating to v1.5.6 and running createMojmapPaperclipJar, createReobfPaperclipJar or createReobfBundlerJar successfully builds a runnable jar.

Observed/Actual behavior

Updating to v1.5.6 and running createMojmapPaperclipJar, createReobfPaperclipJar or createReobfBundlerJar will throw an Implicit dependency exception, making the build fail.

Steps/models to reproduce

  1. clone https://github.com/granny/paperweight-examples/tree/experime...
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: softspoon-v2
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

i will check it later XD

---Original---
From: @.>
Date: Sun, Sep 24, 2023 18:42 PM
To: @.
>;
Cc: @.@.>;
Subject: Re: [PaperMC/paperweight] paper fork: Can't run runDev task (Issue #211)

No issues for me. I'm assuming you're talking about your Leaves fork - I've gone ahead and cloned it, ran ./gradlew applyPatches, then ./gradlew runDev and it also worked fine. More info is needed.

โ€”
Reply to this email directly, view ...

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: dev-bundle-env
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: dev-bundle-env
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.5.7
hollow mistBOT
hollow mistBOT
#

When using paperweight since like yesterday, I get this issue:

:executing 'download minecraft manifest'
:executing 'download minecraft version manifest'
:executing 'download vanilla minecraft server jar'
:executing 'download mojang server mappings'
:executing 'extract libraries and server from downloaded jar'
:executing 'filter vanilla server jar'
:executing 'generate mappings'
:executing 'remap minecraft server jar'
:executing 'fix minecraft server jar'
:executing 'access tr...
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: r
#
[PaperMC/paperweight] branch deleted: r
hollow mistBOT
hollow mistBOT
#

The issue was with dev bundle generation creating invalid bundles, there's no need to update userdev (although it never hurts to run latest). You just need to use the new dev bundle (can force with --refresh-dependencies when using -SNAPSHOT bundles). Also, cleanCache should not be needed when updating paperweight or the dev bundle.

its still broken, im using 1.5.9-SNAPSHOT and fully cleared .gradle folder, target folder etc

Patching: net/minecraft/world/entity/monster/piglin/...

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Further having this issue.

plugins {
    id("io.papermc.paperweight.userdev") version "1.5.8"
}
dependencies {
    paperweight.paperDevBundle("1.20.2-R0.1-SNAPSHOT")
}
// patchedSourcesJar.log
Patching: net/minecraft/world/entity/monster/piglin/Piglin.java
 Hunk 0: EXACT: @@ -5,14 +5,6 @@
 Hunk 1: EXACT: @@ -54,13 +46,33 @@
 Hunk 2: EXACT: @@ -73,7 +85,11 @@
 Hunk 3: EXACT: @@ -92,6 +108,14 @@
 Hunk 4: FAILURE: @@ -100,6 +124,10 @@```
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: fix-explicitthisadder-instance
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.5.9
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: increase-hashing-buffer-size
hollow mistBOT
#
[PaperMC/paperweight] New branch created: filterjar-removecopy
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: filterjar-removecopy
hollow mistBOT
#
[PaperMC/paperweight] New branch created: shortcircuit-userdev-setup
hollow mistBOT
#
[PaperMC/paperweight] New branch created: faster-compare
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: faster-compare
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: dont-double-hash-bundle-zip
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: dont-double-hash-bundle-zip
hollow mistBOT
#
[PaperMC/paperweight] New branch created: update-gradle
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: update-gradle
#
[PaperMC/paperweight] New branch created: update-diffpatch
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: update-diffpatch
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: shortcircuit-userdev-setup
#
[PaperMC/paperweight] New tag created: v1.5.10
hollow mistBOT
#
[PaperMC/paperweight] New branch created: multi-version-catalog
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: multi-version-catalog
hollow mistBOT
#
[PaperMC/paperweight] New branch created: merged-properties
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: spotless-fix
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: spotless-fix
hollow mistBOT
#
[PaperMC/paperweight] New branch created: quiet-apply
#
[PaperMC/paperweight] branch deleted: quiet-apply
hollow mistBOT
#
[PaperMC/paperweight] New branch created: quiet-rebuild
#
[PaperMC/paperweight] branch deleted: quiet-rebuild
hollow mistBOT
#

I have 2 classes. One of them is located in jar A in module A of root project, other located in jar B in module B of root project. All of them has active paperweight plugin. Module A has dependency on module B by compileOnly (which don't includes it into fat jar).
Module A has AEntity class which extends BEntity in B module which extends PathfinderMob from NMS.

I have following code:

AEntity a = ...;
GoalSelector goalSelector = a.goalSelector;

By...

hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.5.11
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: remap-bundled-libraries
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: resolve-transitives
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Is there any option for reobfJar task like archiveClassifier in shadow plugin?
I want to change the dev suffix.

Or if is there any way to make shadowJar shade the reobfJar jar FROM ANOTHER MODULE because I wanna shade the reobf jar from another module (All under one same parent module)

#

The nature of your OR question is suspect that you're wanting to change the dev suffix for the wrong reason, we do not generlly recommend messing with the classifiers as it generally won't solve anything

if you want to consume the reobfuscated jar from another module, then you would specify the "reobf" configuration in the project() declaration

#

The nature of your OR question is suspect that you're wanting to change the dev suffix for the wrong reason, we do not generlly recommend messing with the classifiers as it generally won't solve anything

if you want to consume the reobfuscated jar from another module, then you would specify the "reobf" configuration in the project() declaration

done, thanks

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Suspect this is related - when running applyPatches:

open(".gradle/caches/paperweight/mc-dev-sources/data/minecraft/advancements/recipes/building_blocks/polished_blackstone_brick_slab_from_polished_blackstone_bricks_stonecutting.json"): Filename too long

Tried enabling long paths in registry for Win AND core.longpaths for GIT? That fixed our similar issues, but BOTH settings have to be applied.

hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: shared-caches-default
hollow mistBOT
hollow mistBOT
#

As expected Gradle 8.7-rc-2 shows the same behavior as I described here.

If you need more specific reproduction steps:

  1. Clone Paper master
  2. Update the Gradle wrapper to 8.7-rc-2
  3. Run the applyPatches task
  4. build -x test
  5. Make any change to one class that doesn't require recompilation of any other classes. For example in Commands.java comment out the registration of a command.
  6. `build -x test --in...
hollow mistBOT
#
[PaperMC/paperweight] New branch created: check-for-nested-path
hollow mistBOT
hollow mistBOT
#

I can reproduce this behavior in a normal gradle repository too. The compiler seems to recompile everything that depends on a class which makes sense. However, gradle also does this when only changing something in a method body (a single int or a string in a hardcoded println).

If I haven't missed something, then changing anything within the Commands.java or any other class that somehow connects to a ton of other classes (either directly or indirectly), you end up with gradle needlessly ...

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: resolve-transitives
#
[PaperMC/paperweight] New tag created: v1.5.12
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: incremental-filter
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: incremental-filter
#
[PaperMC/paperweight] New tag created: v1.5.13
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: feat/vineflower
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.5.14
#
[PaperMC/paperweight] New tag created: v1.5.15
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.6.0
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: fix/mcdev-import-data-files
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.6.1
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.6.2
hollow mistBOT
hollow mistBOT
#

As a fork maintainer I want to use code generation myself to provide API which keys are based on generation from nms classes.

Due to the change here https://github.com/PaperMC/paperweight/commit/c6d776d6f4e2f616f790281d2ef735d5030cab6e#diff-db7b98835ceaf75182242f6aca97b05be8942d5dc4ab0606892ddc3d89f9e684R45 the generation task requires the task extractFromBundler to be present. In the current paperweight version this task is only registered in the paperweight spigot decompiling tasks.

...

hollow mistBOT
#

Using this groovy config:

plugins {
    id "io.papermc.paperweight.userdev" version "1.6.2"
}

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION

dependencies {
    implementation project(':abstraction')

    paperweight.paperDevBundle("1.20.5-R0.1-SNAPSHOT")
}

Gives the error

* What went wrong:
A problem occurred evaluating project ':paper'.
> No such property: MOJANG_PRODUCTION for cla...
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.6.3
#

:rocket: Features

  • userdev: add pluginRemapper configuration to more easily upgrade tiny-remapper for reobfJar without disturbing the dev bundle pipeline - 0b9e073

Commits

  • f391c0c: 1.6.3-SNAPSHOT (Jason Penilla)
  • e54e9fc: Only exclude transitives for our tiny-remapper dep (Jason Penilla)
  • 3711175: make ReobfArtifactConfiguration fields @JvmStatic (Jason Penilla)
  • 381e557: Don't warn about mcdev data files that aren't being modified (Jake Potrebic) (#241)
  • b47a75a: Apply a specific rule to exclude JUnit (Octavia Togami) (#205)
  • Version 1.6.3 - a325636
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.7.0
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.7.1
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
> Task :paper:patchCraftBukkit FAILED
> Task :getPaperUpstreamData FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper:patchCraftBukkit'.
> io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false add src

* Try:
> 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.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':paper:patchCraftBukkit'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:128)
        at org.gradle.api.int...
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: paperclip-manifest
hollow mistBOT
hollow mistBOT
#

Imagine a scenario:
You coded a class using NMS. You found that the code is consistent in mojang mappings from 1.19 to 1.20.2 (or more versions). But you are compiling the plugin to Spigot mappings.
For this, you need to create multiple modules and copy the java source file, and only specify the different minecraft version in build.gradle file, like what most plugins are doing now.

This would be a mess as you need to maintain it in different projects. With a simple change, you need to keep them in sync. This is cumbersome.
I'm thinking of if the plugin can generate classes in different minecraft versions automaticlly in a single project, this would help a lot in maintaining. This seems to work, applying a different mapping and adding a version ordinal to the end of the class name. Plugin can access them using reflect.

hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: invalidate-previous-steps-on-failure
#
[PaperMC/paperweight] branch deleted: invalidate-previous-steps-on-failure
#
[PaperMC/paperweight] New tag created: v1.7.2
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Version: 1.7.2 Paperweight Patcher

Just a basic paperweight fork project is missing specific classes when compiled using non-reobfuscated compiled jar servers.

I've tested this with a test plugin that checks for a certain class, in this case org.bukkit.craftbukkit.block.data.CraftBlockData.

try {
    Class.forName("org.bukkit.craftbukkit.block.data.CraftBlockData");
    getLogger().info("Class found");
} catch (ClassNotFoundException e) {
    getLogger().severe("Class not found");
}

However, using non-reobfs, it works fine and a ClassNotFoundException doesn't occur.

Some things I've tried:

  • made sure that the build, settings is basically a replica of the paperweight-test-examples and updated to most recent upstream depenencies
  • added some paper build things that aren't in the test-examples
reobfPackagesToFix.addAll(
    "com.aikar.timings",
    "com.destroystokyo.paper",
    "com.mojang",
    "io.papermc.paper",
...
hollow mistBOT
#

I've added the kotlin(jvm) gradle plugin through api and server patches in my fork of Paper. This worked fine for every version I included so far, but did break now that I've bumped Kotlin to version 2.0.20 (from 2.0.0). This is the error message when I execute ./gradlew generateDevelopmentBundle:

> Configure project :
paperweight-patcher v1.7.2 (running on 'Linux')

> Configure project :paper
paperweight-core v1.7.1 (running on 'Linux')

> Task :applyApiPatches
Creating cardboard-api from patch source...
Applying patches to cardboard-api...
7 patches applied cleanly to cardboard-api

> Task :applyPaperApiGeneratorPatches
Creating generated from patch source...
Applying patches to generated...
No patches found

> Task :applyServerPatches
Creating cardboard-server from patch source...
Importing 1 classes from vanilla...
Importing 0 data files from vanilla...
Importing 0 classes from library sources...
Applying patches to cardboard-server...
12 patches ...
hollow mistBOT
#

I want to use Papewit to write a server similar to Pepper, but I get an error - 'Rub Hasnott Byan Enablid Forttosk'

Gradle buildscript.
`
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
id("io.papermc.paperweight.core") version "1.7.1"
}

val paperMavenUrl = "https://repo.papermc.io/repository/maven-public/"

allprojects {
apply(plugin = "java")

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

repositories {
    run {
        mavenCentral()
        mavenLocal()
        google()
    }

    run {
        maven("https://maven.aliyun.com/repository/public/") {
            name = "aliyun"
        }

        maven("https://mirrors.cloud.tencent.com/nexus/repository/maven-public/") {
            name = "tencent"
        }
    }
}

}

...

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: guard-against-invalid-remapjar-configurations
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: guard-against-invalid-remapjar-configurations
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.7.3
hollow mistBOT
#
[PaperMC/paperweight] New branch created: mainCapabilityAttribute
hollow mistBOT
#

If I named any interface as VersionWrapper (Maybe the same error occurs in classes too, I haven't tried it.)
or
In the abstract classes I created with any name in the main package

[14:07:03] [Server thread/INFO]: [ShopPlugin] Enabling ShopPlugin v1.0.0
[14:07:03] [Server thread/WARN]: [ShopPlugin] success
[14:07:03] [Server thread/ERROR]: Error occurred while enabling ShopPlugin v1.0.0 (Is it up to date?)
java.lang.NoClassDefFoundError: dev/pledix/shopplugin/Pricing
	at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027) ~[?:?]
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:889) ~[?:?]
	at io.papermc.reflectionrewriter.runtime.DefineClassReflectionProxyImpl.defineClass(DefineClassReflectionProxyImpl.java:55) ~[reflection-rewriter-runtime-0.0.1.jar:?]
	at io.papermc.paper.pluginremap.reflect.PaperReflection.defineClass(PaperReflection.java:172) ~[folia-1.20.6.jar:1.20.6-DEV-d79...
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: mainCapabilityAttribute
#
[PaperMC/paperweight] New tag created: v1.7.4
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

b3467d9 Guard against invalid remapJar configs (#256) - jpenilla
4b9a233 Specify myers diff algorithm explicitly (#252) - okx-code
4e08a00 release: Version 1.7.3 - jpenilla
91fac74 1.7.4-SNAPSHOT - jpenilla
addb21d Add mainCapabilityAttribute to disambiguate pro... - jpenilla
5f8df32 Always make mc-dev-sources when applying patche... - lynxplay
5bcee63 release: Version 1.7.4 - jpenilla
6408556 1.7.5-SNAPSHOT - jpenilla
b33579b Merge remote-tracking branch 'upstream/main' in... - Machine-Maker

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

The setup of the paperweight-userdev plugin fails with the following exception in multi-module projects, where one module uses the kotlinx.serialization plugin and another one doesn't. This does not happen when all modules use the plugin, as far as I can see kotlinx.serialization causes some sort of "class path isolation" between the different modules at build time.

Caused by: java.lang.ClassCastException: class io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject cannot be cast to class io.papermc.paperweight.userdev.internal.setup.UserdevSetup (io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @61ecac73; io.papermc.paperweight.userdev.internal.setup.UserdevSetup is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLCla...
hollow mistBOT
hollow mistBOT
#
Command: /Users/dev/Library/Java/JavaVirtualMachines/temurin-17.0.13/Contents/Home/bin/java -Xmx1G -classpath /Users/ipecter/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.2/551cd73d063740ad4f1b54a5e33ece5e00b08fef/tiny-remapper-0.8.2-fat.jar net.fabricmc.tinyremapper.Main /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-dev-all.jar /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-unspecified.jar /Users/ipecter/.gradle/caches/paperweight-userdev/128db0cb1959ad40513457d8f14ffc91832522bc7ab073f6a72849ab672f7142/module/io.papermc.paper/dev-bundle/1.18.2-R0.1-SNAPSHOT/paperweight/setupCache/extractDevBundle.dir/data/mojang+yarn-spigot-reobf.tiny mojang+yarn spigot /Users/ipecter/.gradle/caches/paperweight-userdev/128db0cb1959ad40513457d8f14ffc91832522bc7ab073f6a72849ab672f7142/module/io.papermc.paper/dev-bundle/1.18.2-R0.1-SNAPSHOT/paperweight/setupCache/applyMojangMappedPaperclipPatch.jar --threads=1
Exception in thread "main" java.util.concurrent.CompletionExcep...
hollow mistBOT
#

When using Gradle's new configuration cache feature, the build fails if paperweight-userdev cannot rely on cache and has to produce a bundled jar locally with the following error message:

Configuration cache problems found in this build.
1 problem was found storing the configuration cache.
- Class `io.papermc.paperweight.util.Jar_runnerKt`: external process started '/usr/lib/jvm/java-21-amazon-corretto/bin/java -Dpaperclip.patchonly=true -classpath [...]/module/[...]/dev-bundle/1.20.4-R0.1-SNAPSHOT/paperweight/setupCache/extractDevBundle.dir/data/paperclip-mojang+yarn.jar io.papermc.paperclip.Main'
  See https://docs.gradle.org/8.10.2/userguide/configuration_cache.html#config_cache:requirements:external_processes
> Starting an external process '/usr/lib/jvm/java-21-amazon-corretto/bin/java -Dpaperclip.patchonly=true -classpath /usr/lib/jvm/java-21-amazon-corretto/bin/java -Dpaperclip.patchonly=true -classpath [...]/module/[...]/dev-bundle/1.20.4-R0.1-SNAPSHOT/paperweight/setupCa...
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: additional-manifest-entries
#
[PaperMC/paperweight] New tag created: v1.7.5
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.7.6
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v1.7.7
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: v1
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.1
#

Commits

  • a246f18: 1.7.8-SNAPSHOT (Jason Penilla)
  • 8091dbf: fix formatting (Jason Penilla)
  • 0f2bab7: paperweight v2 (MiniDigger | Martin)
  • 673ce7b: tests (MiniDigger | Martin)
  • 8620635: Fixes (Jason Penilla)
  • 392668c: run spotless (Jason Penilla)
  • edacf05: Fix slf4j issue (Jason Penilla)
  • 9d336e1: Remove redundant repository injection (Jason Penilla)
  • 2a33517: add paper repo to functional test project (Jason Penilla)
  • 9a0c0f2: align some file locations with conventions (Jason Penilla)
  • b4750b2: Start bringing back reobf mappings gen & packaging (Jason Penilla)
  • 64589ec: Use spigot recompiles if present (Jason Penilla)
  • 80d00b0: cleanup relocations (MiniDigger | Martin)
  • 27246cd: spotless (MiniDigger | Martin)
  • e890332: dont break nbt files (MiniDigger | Martin)
  • ad77945: fix compile (MiniDigger | Martin)
  • 331988f: make sure comment is actually accurate (MiniDigger | Martin)
  • 23970f9: Fix decompile not using java toolchain (Jason Penilla)
  • e03710c: Don't shade r...
hollow mistBOT
#
[PaperMC/paperweight] New branch created: patcher-v2
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: restamp-inheritance
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.2
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.3
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.4
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - e8d6a78

Commits

  • 5cadc93: Remove mache version printout (Jason Penilla)
  • 31838b3: Generate dev bundle patches using diffpatch (Jason Penilla)
  • check if mache is empty instead of using a DirectoryProperty as a boolean marker - 66a73c9
  • 4934411: Import library files in separate task from SetupVanilla (Jason Penilla)
  • Version 2.0.0-beta.4 - e6e7c19
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: use-jst-for-ats
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: use-jst-for-ats
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.5
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - 12770f0

Commits

  • 1b9d002: Use JST for ATs (Jason Penilla) (#269)
  • 218c191: fix bad import (Jason Penilla) (#269)
  • d190920: enable inheritance (Jason Penilla) (#269)
  • 35faf2f: remove shared source set (Jason Penilla) (#269)
  • 7b6c26e: Fix 'full vanilla project' functional test (Jason Penilla) (#269)
  • 7166817: Fix 'test simple test project' functional test (Jason Penilla) (#269)
  • Version 2.0.0-beta.5 - 5c3d6a3
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.6
hollow mistBOT
hollow mistBOT
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - d79dbc9

Commits

  • 5096af5: Make CreateBundlerJar compatible with the configuration cache (Jason Penilla)
  • 88b79ad: run spotless (Jason Penilla)
  • b603072: Adjust annotations for CreateBundlerJar (Jason Penilla)
  • 8634a50: Update JST for hidden prefix addition (Jason Penilla)
  • 8d53451: Define default tiny-remapper version in paperweight (Jason Penilla)
  • 05a1012: Move reobfPackagesToFix to root core extension (Jason Penilla)
  • 85acf19: fix fixup file patches task (MiniDigger | Martin)
  • Version 2.0.0-beta.6 - 55ec8e5
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.7
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Heya - SetupPaperScript - L137 has a small issue Current code: val paperFolder = Path("~").resolve(".paper") puts the script into the gradle daemon directory val paperFolder = Path(System.getenv("HOME")).resolve(".paper") would work instead though :))

This is unrelated to this PR, you should open a separate issue or PR

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

bd8834e Initial commit for patcher v2 - jpenilla
b7549c9 Use compile classpath for restamp on fork setup - jpenilla
499fb96 Set branch name when checking out repo for feat... - jpenilla
941a102 Fix warning from param name - jpenilla
921e06a Split repo patch set type from directory, add c... - jpenilla
55eb148 small dsl adjustments - jpenilla
b5a95e5 split single file/directory patching registration - jpenilla
a86088c Fix missing feature patch dir breaking build - jpenilla
f9879f0 Split fork library imports into separate task - jpenilla

#
[PaperMC/paperweight] branch deleted: patcher-v2
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.8
#

:wrench: Bug Fixes

  • fixup file patches must use proper upstream (#265) - 0b6fe6e

:broom: Chores

  • back to 2.0.0-SNAPSHOT - 3108ba6

Commits

  • bd8834e: Initial commit for patcher v2 (Jason Penilla) (#265)
  • b7549c9: Use compile classpath for restamp on fork setup (Jason Penilla) (#265)
  • 499fb96: Set branch name when checking out repo for feature patches (Jason Penilla) (#265)
  • 941a102: Fix warning from param name (Jason Penilla) (#265)
  • 921e06a: Split repo patch set type from directory, add convenience helpers (Jason Penilla) (#265)
  • 55eb148: small dsl adjustments (Jason Penilla) (#265)
  • b5a95e5: split single fil...
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

Starting with io.papermc.paper:dev-bundle:1.21.4-R0.1-20241222.223054-19 the paperweight userdev plugin errors with:

Expected configuration ':paper:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

Steps to reproduce:

Having paperweight.paperDevBundle with 1.21.4 fails.
Same happens when directly using paperweightDevelopmentBundle for 1.21.4-R0.1-20241215.095037-18 or later.

// These will fail
dependencies {
   //paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.4-R0.1-20241215.095037-18")
}

Everything older or equal 1.21.4-R0.1-20241222.223054-19 works fine.

dependencies {
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.4-R0.1-20241222.223054-19")
}

<details>
<summary>Full stack trace</summary>

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring proje...
hollow mistBOT
hollow mistBOT
#

The following error occurs when trying to build a multi-module project that uses paperweight-userdev v2.0.0-beta.8:

A problem was found with the configuration of task ':moduleB:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: 'C:\Users\user\.gradle\caches\paperweight-userdev\613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2\module\io.papermc.paper\dev-bundle\1.21.4-R0.1-SNAPSHOT\paperweight\setupCache\patchedSources.jar'.
    
    Reason: Task ':moduleB:compileJava' uses this output of task ':moduleA:paperweightUserdevSetup' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':moduleA:paperweightUserdevSetup' as an input of ':moduleB:compileJava'.
      2. Declare an explicit dependency on ':moduleA:paperweightUserdevSetup' from ':moduleB:compileJava' using Task#depends...
hollow mistBOT
#
[PaperMC/paperweight] New branch created: userdev-pipeline-rewrite
#

Uses a graph for ordering steps instead of manual ordering, improved input/output hashing and up-to-date checking.

Except for the final outputs which are keyed to the dev bundle, steps are independent of the dev bundle and can be reused between bundles that have the same inputs for the step. For example when using a Paper and Folia 1.21.4 dev bundle in two projects, decompile will only run once as only the final apply dev bundle patches step differs.

Final outputs are copied into a project local location to avoid projects sharing a bundle from having a task with a shared output location.

hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

dc9fb32 Rewrite userdev setup pipeline - jpenilla
17432a7 Apply Java plugin automatically when using userdev - jpenilla
1addb8f Add shared parent for fs output types - jpenilla
121a2d8 Use concurrent map for open file locks and retr... - jpenilla
452a7f0 Remove unused import - jpenilla
b0cfc77 Time setup and file copy separately - jpenilla
6752204 Adjust cache cleaning log message - jpenilla
672ae24 Remove check for cache cleaning in afterEvaluat... - jpenilla
1a614e7 Add back cache cleaning check but fail the buil... - jpenilla

#
[PaperMC/paperweight] branch deleted: userdev-pipeline-rewrite
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.9
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - f6e2593

Commits

  • c1c16b7: adjust bundler version artifact id configuration, use openZipSafe for reading zips in bundler/paperclip tasks (Jason Penilla)
  • 8f0e992: Clean up paperclip, dev bundle, general task configuration (Jason Penilla)
  • fa56235: Disable caching by default on more tasks (Jason Penilla)
  • dc9fb32: Rewrite userdev setup pipeline (Jason Penilla) (#276)
  • 17432a7: Apply Java plugin automatically when using userdev (Jason Penilla) (#276)
  • 1addb8f: Add shared parent for fs output types (Jason Penilla) (#276)
  • 121a2d8: Use concurrent map for open file locks and retry when creating the lock file fails (Jason Penilla) (#276)
  • 452a7f0: Remove unused import (Jason Penilla) ([#276](https://github.com/PaperMC/paperweight/...
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.10
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.11
hollow mistBOT
#
plugins {
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.11"
}

repositories {
    maven {
        uri("https://repo.papermc.io/repository/maven-public/")
    }
}

dependencies {
    // Other Dependencies
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

tasks.assemble {
    dependsOn(tasks.reobfJar)
}

Error:

A problem occurred configuring project ':nms:v1_21_R1'.
> Failed to notify project evaluation listener.
   > paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the dependencies.paperweight extension to do this easily.
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.12
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - 15f4f8a

Commits

  • d7e1ddf: Revert "Clean up paperclip, dev bundle, general task configuration" (Jason Penilla)
  • d52911e: Clean up Paperclip task configuration (Jason Penilla)
  • f21a136: Clean up dev bundle generation task configuration (Jason Penilla)
  • ef8e7d4: Dev bundle <=v5: only count AT file as input for AT action, not entire dev bundle (Jason Penilla)
  • 01f4198: Move general configuration from CoreTasks to PaperweightCore (Jason Penilla)
  • Version 2.0.0-beta.12 - 7625f3a
hollow mistBOT
#
[PaperMC/paperweight] New branch created: bugfix/rebuild-resource-patches
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: order-forks-before-registering-tasks
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: order-forks-before-registering-tasks
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.13
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - dbbf7cb

Commits

  • 143785c: Don't capture project when configuring Minecraft source dirs (Jason Penilla)
  • df5b8e9: Order forks before creating patch tasks, this should help give more useful error messages for invalid configurations (Jason Penilla) (#279)
  • 25bc6bd: Require Gradle 8.12 and use Problems API to report dev bundle resolution failure (Jason Penilla)
  • Version 2.0.0-beta.13 - 8568097
hollow mistBOT
#

LOG:

[DEBUG] Patching: paper-server/build.gradle.kts
[WARN]  Hunk 0: FAILURE: @@ -21,8 +21,19 @@
[WARN]  Hunk 1: FAILURE: @@ -105,7 +116,20 @@
[WARN]  Hunk 2: FAILURE: @@ -123,7 +147,8 @@

i am not able to patch paper-server. please help.
build.gradle.kts.patch
build.gradle.kts.patch.rej:

++++ REJECTED HUNK: 1
@@ -21,8 +21,19 @@
     // macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
     // gitFilePatches = true
+    val fork = forks.register("ApproximasterSmartServer2004") {
+        upstream.patchDir("paperServer") {
+            upstreamPath = "paper-server"
+            excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
+            patchesDir = rootDirectory.dir("Smart-Server/paper-patches")
+            outputDir = rootDirectory.dir("paper-server")
+        }
+    }
+
+    activeFork = fork
+
     paper {
-        reobfMappingsPatc...
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#

UserDev version 1.7.7 first searched the local maven repository for devBundle. Beta-13 always looks for devBundle online, even if I create a new fork locally in the "xx.xxx.paper" group, it still tries to download it from online repositories.

Of course I added mavenLocal() to the repositories.

As I say, this works perfectly fine in the older version.

This is useful when you add something to the paper and then immediately test it on the plugin, you don't have to put it anywhere on the web.

hollow mistBOT
#

The dev bundle is resolved through standard Gradle APIs (see

paperweight/paperweight-userdev/src/main/kotlin/io/papermc/paperweight/userdev/PaperweightUser.kt

Line 355 in 044758e

val devBundleZip = bundleConfig.map { it.singleFile }.convertToPath()
), there is nothing actionable here on the paperweight side.
@jpenilla

This is handled by paperweight! I found it by looking at source code..
It was caused by default configuration, adding
paperweight.injectPaperRepository = false
to build.gradle.kts solved this issue.

setting this value to false caused gradle to look into the local repository - as intended.
When this value is set to true, even when working in offline mode it causes same problem..

this should be bet...

hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] branch deleted: bugfix/rebuild-resource-patches
hollow mistBOT
#
[PaperMC/paperweight] New tag created: v2.0.0-beta.14
#

:broom: Chores

  • back to 2.0.0-SNAPSHOT - d972533

Commits

  • c38eef6: Configure UserdevSetupTask base inputs later (Jason Penilla)
  • 5d5a791: Validate ForkConfig rootDirectory/PaperExtension paperServerDir values do not overlap (Jason Penilla)
  • 044758e: Fix defaultJavaLauncher fallback logic when JavaPluginExtension is not present (Jason Penilla)
  • 101b47c: Automatically move Paper/fork rootDirectory to <upstreamsDir>/<forkName|paper> for non-active configs (Jason Penilla)
  • ecbdd0a: Adjust fork roots during configuration instead of using delicate convention fallbacks (Jason Penilla)
  • ef179dd: Don't try to use BuildLayout from Project scope (Jason Penilla)
  • c4a6601: Respect git patches when rebuilding resource patch (Bjarne Koll) (#278)
  • Version 2.0.0-beta.14 - 45ecbc9
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: updating-history
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
#
[PaperMC/paperweight] New branch created: update-productive
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT
hollow mistBOT