#build-tooling-help

1 messages · Page 20 of 1

crude kernel
#

well yeah

#

that's a PW task

#

wait me stupid

#

do you have the plugin applied

peak dove
#

i think so

crude kernel
#

probably want dependsOn(tasks.reobfJar)

#

not sure if it makes any difference tho

#

since task providers are usually what you want here

peak dove
#

yeah thats what i just did it apprently worked xD

#

can i still use shadoJar tho ?

crude kernel
#

sure

#

iirc you had to set reobf as input tho

#
tasks.shadowJar {
    from(tasks.reobfJar)
}
peak dove
#

okay

crude kernel
#

then depend on shadow instead of reobf

peak dove
#

would resemble something like that

   dependsOn(shadowJar)
}

tasks.assemble {
 dependsOn(tasks.reobfJar)
}
tasks.shadowJar {
 from(tasks.reobfJar)
}```
crude kernel
#

remove that depend on reobf for assemble

peak dove
#

Okay

crude kernel
#

since shadow already runs it

peak dove
#

Yeah xD

#

Bro so iot doesnt recognise shadowJar xD

crude kernel
#

it's tasks.shadowJar

peak dove
#

tasks.build {
dependsOn(tasks.shadowJar)
}
still

crude kernel
#

show the error

#

and make sure you actually have shadow applied

peak dove
#

Unresolved reference: shadowJar

crude kernel
#

sounds like you don't have shadow applied

#

add id("com.gradleup.shadow") version "9.0.0-beta6" to your plugins block (lemme check if tehre's a newer version actually)

#

9.0.0-beta9 is latest

peak dove
#

okaaay

#

seems to work for now

crude kernel
#

👍

peak dove
#

Now i juste have to un comment everything ive commented i'm cooked

smoky violet
#

that should probably cause gradle to crash with a stack overflow or some sort of circularity error

crude kernel
#

haven't had problems with that

smoky violet
#

.... well it's totally wrong and should blow up

peak dove
#

Hey so i'm back with one last problem, it wont create the file but other than that its fine

plugins {
   id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
   id("com.gradleup.shadow") version "9.0.0-beta6"
}

group "fr.lvegroup"
version "0.4.1"


repositories {
    mavenCentral();
    mavenLocal();
    maven("https://repo.codemc.org/repository/maven-public/");
    maven("https://repo.papermc.io/repo/repository/maven-public/")
    maven("https://mvn.lumine.io/repository/maven-public/")
    maven("https://maven.enginehub.org/repo/")
    gradlePluginPortal();
    maven("https://repo.papermc.io/repository/maven-public/");
}

dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT");

    implementation("com.github.ben-manes.caffeine:caffeine:3.1.8");

    compileOnly ("io.lumine:Mythic-Dist:5.6.1");
    compileOnly ("com.sk89q.worldguard:worldguard-bukkit:7.0.13");
    implementation ("org.jetbrains:annotations:23.0.0");

    compileOnly ("dev.jorel:commandapi-bukkit-core:9.5.3");
    compileOnly ("dev.jorel:commandapi-annotations:9.5.3");
    annotationProcessor ("dev.jorel:commandapi-annotations:9.5.3");

    compileOnly ("org.projectlombok:lombok:1.18.34");
    annotationProcessor ("org.projectlombok:lombok:1.18.34");
    testCompileOnly ("org.projectlombok:lombok:1.18.34");
    testAnnotationProcessor ("org.projectlombok:lombok:1.18.34");
}

tasks.build {
   dependsOn(tasks.shadowJar)
    dependsOn(tasks.reobfJar)
}

tasks.shadowJar {
    archiveClassifier.set("")
    destinationDirectory.set(file("${projectDir}/build/libs"))
}

lament scarab
#

We don't support reobfJars

#

Well, I guess, maybe they still work?

#

outside of that, messing with directory outputs is often asking for issues

static urchin
#

Yea, generally don't mess around with output dirs. If you want to move jars around, do that with a CopyTask

peak dove
#

Okay so remove reobjar and destianationDirectory and i'm goodd ?

sleek siren
#

@crude kernel we appreciate you helping others here, but it seems occasionally things like this pop up with somewhat obviously broken solutions - when told they're broken and you don't know exactly what it does, you shouldn't try to keep pushing them/wait for someone else to answer. since this is a bit topic specific, there's a temporary channel mute

peak dove
#

Nope still doesnt work even after removing
dependsOn(tasks.reobfJar)
and
tasks.shadowJar {
archiveClassifier.set("")
destinationDirectory.set(file("${projectDir}/build/libs"))
}
It just make 1 task and thats it when building

lament scarab
#

well, what task are you running?

#

what is the output?

peak dove
#

I'm jsut trying to compile my plugin in a .jar file, the output is this


Welcome to Gradle 8.13.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see more detail about a task, run gradle help --task <task>

To see a list of command-line options, run gradle --help

For more detail on using Gradle, see https://docs.gradle.org/8.13/userguide/command_line_interface.html

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 390ms
1 actionable task: 1 executed
20:32:25: Execution finished.
lament scarab
#

You need to tell it to do something

#

otherwise it does nothing

#

run the build task

peak dove
#

Bruh

#

I'm a dipshit my bad xD

#

Thanks !

glass warren
icy cobalt
#

oops sorry

#

Thanks

onyx wagon
#

I'm trying to convert a project's nms modules from using my own remapping plugin to use paperweight userdev instead, currently trying to get the 1.17.1 module migrated, but I'm getting this error which suggests it's trying to use java 17 (this project is jdk21). I've tried setting the toolchain language version to 17 for this module but get the same error. Does anyone know if it's possible to fix this? Worst case I'll just drop the 1.17.1 and 1.18.2 modules or keep them using my existing system.
Using Gradle 8.13 and userdev 2.0.0-beta.14

Execution failed for task ':NMS:v1_17_R1:paperweightUserdevSetup'.
> Error while evaluating property 'launcher' of task ':NMS:v1_17_R1:paperweightUserdevSetup'.
   > Failed to query the value of task ':NMS:v1_17_R1:paperweightUserdevSetup' property 'launcher'.
      > Failed to query the value of extension 'paperweight' property 'javaLauncher'.
         > Cannot find a Java installation on your machine (Windows 11 10.0 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific}. Toolchain download repositories have not been configured.
#

I suppose the issue could just literally be that it can't find an actual jdk17 installation on my machine, there is one though so not sure where it's looking since I don't think I can have multiple on the path at once

smoky violet
smoky violet
open latch
#

Hi im try to build a lib for use in Paper for publish... not sure why when make publish for generate stagged files the final name are like app-0.0.1-20250301.221311-1.jar when its supposed to be app-0.0.1-SNAPSHOT.jar i use shadow plugin then not sure if i missing something...

brave widgetBOT
smoky violet
#

-SNAPSHOT is turned into that format on publishing

open latch
#

"normal" versions works but the format of snapshot in that just breaks the validation... how? :/

smoky violet
#

maven central is not for snapshots

smoky violet
#

if it's their new system then glhf

#

I have avoided migrating so far as there was still no good gradle plugin for it last I checked

open latch
humble badge
#

java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action) (literally only it)
Getting this error when trying to connect userdev plugin version 2.0.0-beta.14 to the project, everything worked and works fine with old 1.5.9.
Repo in settings.gradle.kts is connected, so what can prevent the plugin from working or what can possibly be wrong?
Gradle version 8.13

fixed by setting plugin version to 2.0.0-beta.8

echo kilnBOT
stark oak
#

bruh aint nobody check this channel

bronze ember
#

You didn't even wait 10 minutes

#

Patience is a virtue

bronze ember
#

Try actually reading the error

#

Hey, no spoon feeding, I was teaching a lesson here lynx! Runs

static urchin
#

honestly that error is so shit

#

its a fine usage of a spoon

bronze ember
#

Oh I am aware

#

It still contains the solution if read carefully

stark oak
#

Not exactly sure where to configure that

#

I mean, where does org.gradle.plugin.api-version go

static urchin
#

your gradle wrapper needs updating

#

^

#

run that

stark oak
#

Without paperweight

#

?

static urchin
#

Yea

stark oak
#

I've never used gradle before, I feel like my build.gradle.kts is so scuffed

#

what do you guys think

static urchin
#

Good enough ™️

#

outside of like

#

the plugin management block not being needed and a random maven repo to company/com

#

I doubt you need the libs folder either

static urchin
#

id("com.github.johnrengelman.shadow") version "8.1.1" has been superceeded by gradleup/shadow

stark oak
#

pasted that in

static urchin
stark oak
#

how do I include gradleup/shadow

static urchin
#

its a fork of the old shadow

#

So you just replace the id with com.gradleup.shadow

#

and version with 8.3.6

#

das latest

stark oak
#

Makes sense

open latch
# open latch Hi im try to build a lib for use in Paper for publish... not sure why when make ...

fixed or patched xd... maven central its just weird... for normal release need the publish API, for snapshot i can just use the credentials in the publish repositories setting the url to https://central.sonatype.com/repository/maven-snapshots/ like

repositories {
        maven {
            if (isRelease) {
                url = layout.buildDirectory.dir('staging-deploy/release')
            } else {
                credentials {
                    username mavenCentralUsername
                    password mavenCentralPassword
                }
                url = 'https://central.sonatype.com/repository/maven-snapshots/'
            }
        }
    }
neon ocean
#
> Task :v1_21_R3:paperweightUserdevSetup
Executing vanillaServerDownloads...
Finished vanillaServerDownloads in 7.491s
Executing extractFromBundler...
Finished extractFromBundler in 427ms
Executing remapMinecraft...
Finished remapMinecraft in 9.974s
Executing setupMacheSources...
Finished setupMacheSources in 21.635s
Executing applyPaperclipPatch...
Finished applyPaperclipPatch in 2.057s
Executing applyDevBundlePatches...

> Task :v1_21_R3:paperweightUserdevSetup FAILED
5 actionable tasks: 1 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':v1_21_R3:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches

anyone know how can i solve this problem?

proud maple
#

paste your gradle build file

polar edge
#

Maybe someone has a way to download latest paper/velocity builds?

#
        fun getLatestBuild(project: String, version: String): String? {
            val url = "https://api.papermc.io/v2/projects/$project/versions/$version/builds"
            val json = URI.create(url).toURL().readText()
            val parsedJson = JsonParser.parseString(json).asJsonObject
            val buildsArray = parsedJson.getAsJsonArray("builds")

            print(buildsArray)

            return null
        }```
Can't seem to make JsonParser work
neon ocean
bright agate
polar edge
#

The link works as expected, nothing wrong with it

#

Error on Jsonparser

bright agate
#

try removing "builds" from the url, and see what happens

polar edge
#

Well, that's a much easier thing to work with

bright agate
#

so just to verify... that worked?

polar edge
#

No, just easier to work with it

bright agate
#

sounds like a yes to me 😉

polar edge
#

But no

#

Worked by changing the Json parser:

        fun getLatestBuild(project: String, version: String): Int? {
            val url = "https://api.papermc.io/v2/projects/$project/versions/$version"
            val text = URI.create(url).toURL().readText()
            val json = groovy.json.JsonSlurper().parseText(text) as Map<*, *>
            val buildsArray = json["builds"] as List<Int>

            val lastElement = buildsArray.lastOrNull()

            return lastElement
        }```
open latch
#

dump question for gradle... i wanna make a task for "join" another tasks like (publish, sign, deploy) based in the version of project.. my issue is if i dont delete the "stage" files creaded in publish i get a error then i try call first clean and later the "final task" but not sure why.. just skip the publish and try sign and deploy where fails because dont exists files to deploy...
the strange is if use "0.0.1-SNAPSHOT" works fine if just use "0.0.1" fails..

my main issue is i wanna a task for publish in SNAPSHOT i publish to snapshot maven repo if is not a snapshot then make a publish to stage file and later with another plugin just upload that..

brave widgetBOT
sage veldt
#

any idea why im getting this error when updating my plugins paperweight version? I'm rusty rn so i might just be missing something simple ```A problem occurred configuring root project 'PaperPlugin'.

Could not resolve all files for configuration ':classpath'.
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14.
Required by:
project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.14
No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but:
- Variant 'javadocElements' capability io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library ...and so on```

raven barn
#

make sure you are using java 21

sage veldt
#

sdk is set to 21 ; (

#

im updating from 1.21.1 to 1.21.4

raven barn
#

in your build file as well?

sage veldt
#

its changed in my build.gradle as well as my plugin.yml, i forget if i need to anywhere else

raven barn
#

so you have something similar to this

sage veldt
#

this is what i got

raven barn
#

i have genuinely no idea what i am looking at

sage veldt
#

me neither

#

i just have it

#

worked with 1.21.1 tho

#

i can try copying what you sent

raven barn
#

looks like you only set your java version if your java version is less than your java version?

sage veldt
#

idk

#

i forget where i even got that code from

raven barn
#

i would recommend learning at least some basics about gradle
also i think you are better off using kotlin dsl instead of groovie
there are more and better resources for kotlin in my opinion

sage veldt
#

tis fair

#

still weird that going from 1.7.7 to 2.0.0-beta.14 breaks it

raven barn
#

not really

#

you are required to use jdk 21 and it doesnt look like your current way of setting the jdk is working

sage veldt
#

changing it to the other way of doing it didnt work either

raven barn
#

did you reload gradle

sage veldt
#

yes

raven barn
#

show your gradle build file

sage veldt
#
    id 'java'
  //id("io.papermc.paperweight.userdev") version "1.7.7"
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.13"
    id 'com.github.johnrengelman.shadow' version '8.1.1'
}

group = 'com.quackertin'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        name = "papermc-repo"
        maven("https://repo.papermc.io/repository/maven-public/")
    }
    gradlePluginPortal()
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
    maven { url "https://repo.dmulloy2.net/repository/public/" }
}

dependencies {
    implementation 'org.mongodb:mongodb-driver-sync:5.0.0'
    compileOnly 'com.comphenix.protocol:ProtocolLib:5.1.0'
   paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
  // paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
}

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

tasks.compileJava {
    options.release.set(21)
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}

tasks.assemble {
    dependsOn(reobfJar)
}
reobfJar{
    outputJar = layout.buildDirectory.file("C:/Users/myname/Desktop/Paper Server/plugins/PaperPluginObf-${project.version}.jar")
}``` reverting back to the old methods now breaks it too ; (
#

also i set it to beta.13 just to test it was originally at beta.14

raven barn
#

thats groovy right?
file name is build.gradle and NOT build.gradle.kts

sage veldt
#

yes its groovy

#

file name build.gradle

raven barn
#

it probably tells you that your file contains errors right

sage veldt
#

this is the full error

proud maple
#

update gradle

#

it says there the dependency requires 8.12 but you are using 8.5

sage veldt
#

👍

#

but .5 is bigger than .12 🥺

#

jk jk

#

if i ever figure out how to update gradle

dusk quail
#

remove paperweight, and run ```
./gradlew wrapper --gradle-version 8.13
./gradlew wrapper

sage veldt
#

Task './gradlew' not found in root project 'PaperPlugin'. 🥹

#

im too stupid im sorry

limpid heart
#

What exactly did you type?

raven barn
#

just set the version manually in the gradle/wrapper/gradle-wrapper.properties

#

and run the task "Tasks -> build setup -> wrapper" in your gradle sidebar

sage veldt
sage veldt
#

it works!

#

thank you everyone for the help

coral gull
smoky violet
#

it's on the gradle docs

rain vessel
#

when is the new paperweight build being pushed?

#

need this fix for my fork

#

and have needed it for like... a month lmao

bronze ember
#

Every commit is pushed to the snapshot repo

#

But yeah I guess we can create a proper release, idk if @smoky violet has anything else in the pipeline

rain vessel
bronze ember
#

2.0.0-SNAPSHOT

#

That's on the paper repo iirc

rain vessel
#

amazing, ty

grizzled river
lament scarab
#

make sure you're using java 21

#

otherwise, see the log file that it tells you to

grizzled river
#

The only fails i see are the ones attached below. Should I share the whole thing?

lament scarab
#

I mean, the thing is useless to me, you're the one who needs to debug

#

I can't see your disk

#

make sure that gradle actually ran with 21 and that your toolchain is set to use 21

grizzled river
#

explicitly declaring it with toolchain fixed it. Thanks for the help!

java {
    toolchain.languageVersion = JavaLanguageVersion.of(21)
}
smoky violet
bronze ember
smoky violet
#

my answer already assumed that

lament scarab
#

This channel is for support with build tooling, i.e. gradle

lunar breach
#

Hey, Im having a problem with running my plugin outside of my dev env. Theres gotta be a issue of me implement the implementation("io.socket:socket.io-client:2.1.1") wrong or shadowing it. Have you guys got any ideas? Thanks in advance 🙂

brave widgetBOT
brave widgetBOT
lament scarab
#

make sure that you actually run shadowJar

lunar breach
dusk quail
#

shadowjar is a seperate task, run it the same way you would run build, if you use the intellij window its under shadow instead of build though

#

it will still compile your plugin/library

lunar breach
#

A perfect, probaly as NAME-all.jar or as the default jar?

dusk quail
#

yeah by default shadow sets the classifier to -all

lunar breach
#

Thanks perfect

neon ocean
worldly sorrel
lament scarab
#

Yeet the user dev caches I guess

#

You have some corrupted file somewhere

worldly sorrel
#

fixed, thanks

neon ocean
static urchin
#

Run with --stacktrace and paste the output to a

echo kilnBOT
static urchin
#

Presumably wrong java version, you can check ~/gradle/caches/paperweight-userdev/v2/work/applyDevBundlePatches_9d83108518535533bcaa38f5f2f5686cfb5c2e778490a69e67f890afedec6fc4/output.log

neon ocean
#

what java version i need i am using java21

static urchin
#

hmm, 21 should be fine. Check your log then ^

brave widgetBOT
static urchin
#

Okay, eh, share your build.gradle.kts I guess

neon ocean
static urchin
#

And the one of the R3 module pls

neon ocean
neon ocean
static urchin
#

oh if it's public, that'd be great yea

#

tho I am currently preparing food 😅

neon ocean
last forum
#

I updated my gradle version. Anyone know how to fix?

static urchin
#

you need 2.0.0-beta14 or something

#

id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"

last forum
#

ok

#

I just installed 8.13

#

I installed 8.8, why does it say this still

static urchin
#

your gradle is using 8.8

last forum
#

isn't that what I need?

static urchin
#

no, you need gradle 8.12 or higher

last forum
#

8.13 didn't work too

last forum
static urchin
#

IJ might be configured to use its own bundled 8.8 gradle version

last forum
#

intellij is making me freak out

#

do I really need to restart everything again

static urchin
#

your wrapper is 8.8 then I presume

#

update it (but first remove paeprweight completely, it won't be able to update given how broken it is rn)

last forum
#

Ok

last forum
#

thanks G

lusty canyon
#

Hi I am unable to build paper. I am pretty sure there is not problem in my code, since build in Paper github passes just fine

C:\Users\dawon\git\Paper\paper-server\src\main\java\io\papermc\paper\util\Holderable.java:39: error: illegal start of expression
            case JsonObjectWrapper(final JsonObject element) -> {
                                   ^
C:\Users\dawon\git\Paper\paper-server\src\main\java\io\papermc\paper\util\Holderable.java:39: error: ';' expected
            case JsonObjectWrapper(final JsonObject element) -> {
                                                           ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:98: error: illegal start of expression
            case io.papermc.paper.inventory.recipe.ItemOrExact.Item(final Holder<Item> item) ->
                                                                    ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:98: error: ';' expected
            case io.papermc.paper.inventory.recipe.ItemOrExact.Item(final Holder<Item> item) ->
                                                                                           ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:99: error: not a statement
                !this.isExact() && this.values.contains(item);
                                ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:100: error: illegal start of expression
            case io.papermc.paper.inventory.recipe.ItemOrExact.Exact(final ItemStack exact) ->
                                                                     ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:100: error: ';' expected
            case io.papermc.paper.inventory.recipe.ItemOrExact.Exact(final ItemStack exact) ->
                                                                                          ^
C:\Users\dawon\git\Paper\paper-server\src\minecraft\java\net\minecraft\world\item\crafting\Ingredient.java:101: error: not a statement
                this.isExact() && this.itemStacks.contains(exact);
                               ^

I am getting above errors, which I am guessing source from incorrect language level. But from what I checked in all settings I could find, I have set 21 jdk. ./gradlew -v outputs java 21 as well. I have no clue how to get it built. I am using Eclipse Adoptium JDK.

Any ideas what am I doing wrong?

bronze ember
#

Is that a fresh clone?

lusty canyon
#

I have deleted pretty much everything in the folder and reverted it, so I guess it should be similar to fresh clone, but I could try cloning it from scratch

#

yeah, still the same issue with fresh clone.
I ran:

./gradlew applyPatches
./gradlew compileJava
brisk belfry
#

What’s the output of java —version

lusty canyon
#
$ java -version
openjdk version "21.0.2" 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode, sharing)
#
$ ./gradlew -v

------------------------------------------------------------
Gradle 8.12
------------------------------------------------------------

Build time:    2024-12-20 15:46:53 UTC
Revision:      a3cacb207fec727859be9354c1937da2e59004c1

Kotlin:        2.0.21
Groovy:        3.0.22
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  21.0.2 (Eclipse Adoptium 21.0.2+13-LTS)
Daemon JVM:    C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot (no JDK specified, using current Java home)
OS:            Windows 11 10.0 amd64
lament scarab
#

That’s a known issue in earlier versions of 21

lusty canyon
#

yes, that resolved the issue, I never suspected that same major version can have such issues. Thank you!

last forum
lament scarab
#

Your jar is being improperly packaged

#

for one, you shouldn't be shading mojang classes into your plugin jar

last forum
#

ok

bronze ember
lusty canyon
chilly grail
#

anyone know why maven isnt including class files for okhttp or kotlinx.serialisation in the output jar?

#
java.lang.NoClassDefFoundError: okhttp3/Interceptor```
slate salmon
#

What are you using to compile? I would expect mvn package to just work..
Also yeah, as said earlier by others, if you are doing Kotlin I’d also recommend switching to Gradle

chilly grail
#

yeah i might try gradle but it should work damn

#

thats annoying

fossil topaz
slate salmon
#

Try with the command.

chilly grail
#

alright

chilly grail
#

thank you

#

i just assumed intellij was calling maven when i pressed build?

brazen seal
#

Ok since I suck at setting up pom.xml can I get some help
For waterfall

mighty pewter
#

I am using Paperweight and would like to support multi-version for the plugin so that it works in both version 1.20.4 and 1.21.1. How can I achieve this with Paperweight? Is there a way to support this?

static urchin
#

papermc/paperweight-test-plugin has a multi module branch

mighty pewter
#

Thank you

mighty pewter
#

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 paperweightDevBundle extension function to do this easily.
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains no files.
How do I fix it?

main mica
#

Make sure your paperweight version is up-to-date and that you defined a dev bundle. most common cause of that error I've seen is trying to use old paperweight with the new dev bundles

mighty pewter
#

I've solved it! Thank you!

last ermine
#
    id 'io.papermc.paperweight.userdev' version '2.0.0-beta.14'
}

dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
    compileOnly project(':nms:api')
}

tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
    options.release.set(21)
}

java {
    sourceCompatibility = JavaVersion.VERSION_21
    targetCompatibility = JavaVersion.VERSION_21
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.getREOBF_PRODUCTION()```


Execution failed for task ':nms:v1_21_R3:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches

* 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 15s
13 actionable tasks: 1 executed, 12 up-to-date
lament scarab
#

you would need to see the full log, there is generally output above that.

lament scarab
#

what?

last ermine
# lament scarab what?

Task :nms:v1_21_R2:paperweightUserdevSetup UP-TO-DATE

Task :nms:v1_21_R3:paperweightUserdevSetup
Skipping vanillaServerDownloads (up-to-date)
Skipping extractFromBundler (up-to-date)
Skipping remapMinecraft (up-to-date)
Skipping setupMacheSources (up-to-date)
Skipping applyPaperclipPatch (up-to-date)
Executing applyDevBundlePatches...

Task :nms:v1_21_R3:paperweightUserdevSetup FAILED

[Incubating] Problems report is available at: file:///Users/emregumus/Documents/GitHub/ChunksLab-Gestures/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
13 actionable tasks: 1 executed, 12 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':nms:v1_21_R3:paperweightUserdevSetup'.

io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches

  • 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 31s

lament scarab
#

if that's all the info availab,e i cannot help you

#

it does tell you how to try to get more information in the case something went wrong, I'd imagining that once again, the info of the rror is in the part of the logs you've cut out; good luck

last ermine
#

Operation has non zero exit code: 1 also says this, there is no problem in 1.21.3, but when I make 1.21.4, it throws these errors

pliant carbon
pallid elbow
#

I'm getting /home/cryptite/dev/Slice/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreaking.java:6: error: CraftCreaking is not abstract and does not override abstract method isActive() in Creaking public class CraftCreaking extends CraftMonster implements org.bukkit.entity.Creaking { ^ /home/cryptite/dev/Slice/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java:33: error: CraftRegistry is not abstract and does not override abstract method size() in Registry public class CraftRegistry<B extends Keyed, M> implements Registry<B> { ^ /home/cryptite/dev/Slice/paper-server/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java:19: error: DelayedRegistry is not abstract and does not override abstract method size() in Registry public final class DelayedRegistry<T extends Keyed, R extends Registry<T>> implements Registry<T> { when trying to do ./gradlew publishDevBundlePublicationToMavenLocal -PpublishDevBundle, but meanwhile applyAllPatches works, and I have done a clean

#

what do? 😦

static urchin
#

Well, that looks like you somehow are getting a newer API fork than your server fork

pallid elbow
#

well i'll try updating again, i'm (this morning) not on latest-latest

#

same problem

#

doing just a normal build gives me this one: /home/cryptite/dev/Slice/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java:273: error: CraftServer is not abstract and does not override abstract method restart() in Server public final class CraftServer implements Server { ^

lament scarab
#

I mean, what lynx said

#

that method was added to papers API

#

it for some reason does not exist in your server code

#

either your using an outdated server base, or, you managed to patch it out or something

#

given the nature of other errors, probably the former

pallid elbow
#

I mean I can confirm this is in here

static urchin
#

The screenshot literally shows your patch yanking a restart method?

#

Yea I think somewhere you didn't applyAllPatches after your bumped your ref

pallid elbow
#

huh where tf did that even come from

static urchin
#

you probably rebuildPatches after bumping upstream ref

#

your patches are gonne be royaly fucked

pallid elbow
#

i have a bunch of pending git adds so i'll revert

#

yep there was a buncha random bs everywhere, deleted it all and i think we're good to go

bold lodge
#

I can't setup gradle... I'm finding so much trouble

rapid fractal
#

Please provide more details on what you are doing, what steps you are on, and the complete error messages if you need help.

bold lodge
#

I'm just trying to migrate a spigot based plugin that uses maven to gradle

#

So far I did the automatic copy with gradle init

#

And changed a few things to try and get it to work with paperweight-userdev as I use some NMS

#

This is the build file

dusk quail
#

update gradle to atleast 8.12

bold lodge
#

Gotchu, let me try

warm tiger
#

Okay I've tried everything I can think of for fixing this but I cannot get Paperweight to behave at all with Groovy DSL. I can't seem to find any notes in the test plugin that mention it either.

plugins {
  id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

dependencies {
  paperweight.paperDevBundle('1.21.4-R0.1-SNAPSHOT')
}

This throws a > Could not find method paperDevBundle() for arguments [1.21.4-R0.1-SNAPSHOT] on extension 'paperweight' of type io.papermc.paperweight.userdev.PaperweightUserExtension.

If I remove the paperweight.paperDevBundle, it throws Unable to resolve a dev bundle, which is required for paperweight to function. (which to me seems like it should just do nothing instead of forcing gradle to completely fail to reload).

My IntelliSense also doesn't seem to be picking up paperweight at all, there's no suggestions as I type. I got this working in another project just fine but for this one it's botched. Anyone have any thoughts on what is going on here?

lucid mulch
tiny coral
#

Trying to build my plugin against a custom paper build but it's throwing this error:

bronze ember
#

Carefully read the error, it tells you what's wrong

#

||update Gradle||

tiny coral
#

Found it ya, gotta upgrade.

#

I have to manually do it so that's what probably confused me.

bronze ember
#

The Gradle errors are kinda horrible, but they do contain the solution in all that mess, lol

tiny coral
#

Ya...

#

I'll keep this in mind for next time(s), thanks

bold lodge
#

I have a question about the build.kts

#
    reobfJar {
      // This is an example of how you might change the output location for reobfJar. It's recommended not to do this
      // for a variety of reasons, however it's asked frequently enough that an example of how to do it is included here.
      outputJar = layout.buildDirectory.file("libs/PaperweightTestPlugin-${project.version}.jar")
    }```

Do I need this?
lament scarab
#

I mean, read it?

#

it tells you exactly when you'll need it

#

if you're not covering either of those cases, then no

bold lodge
#

BUt I mean

#

the reobfJar is the one you have to use, right?

#

That's the point of it

#

I need to use a reobfJar for production

static urchin
#

not on 1.20.5 and later

bold lodge
#

Oh

static urchin
#

// Only relevant for 1.20.4 or below, or when you care about supporting Spigot on >=1.20.5:

bold lodge
#

Because it does it the server itself

static urchin
#

the server itself uses mojang mappings since 1.20.5

bold lodge
#

I would care to support it, yeah

#

What's the number of reasons why is it not recommended to do it this way tho

static urchin
#

changing the output jar kinda fucks around with caching

bold lodge
#

Oh, I see

static urchin
#

the dependency graph if you re-consume the task output becomes a bit fucked by it so yea

#

But I mean, depends on what you are doing

#

if you are running 1.21.4, it does not matter anyway given paper is hardforked you would/should have a spigot module for spigot NMS anyway

bold lodge
#

I'm doing just that transition from 1.21.3 spigot

#

To 1.21.4 paper

#

So I'm trying to set up the project, because I also moved from maven to gradle

#

First time using gradle

static urchin
#

Yea but in 1.21.4, paper hardforked from spigot so, if you do still wanna support spigot, you'd need a separate module for papernms and spigot nms

bold lodge
#

Oof

#

By module you mean, two different buids?

#

And thus, two different jars

#

Well, I'd rather stick to paper really

static urchin
#

Well, you can do it either way, some plugins have different jars, some plugins bundle both things into one jar and only load the relevant classes

bold lodge
#

I only used spigot for coding, I use paper always as server

static urchin
#

if you just need paper then you don't need reobf at all yea

bold lodge
#

Perfect, thanks man 🙂

#

I'll remove that then

static urchin
#

👍

jovial helm
#

Hello, is there a way to use spigot nms with paperweight ?

lament scarab
#

I mean, the entire point of paperweight is that it uses mojang mappings like the rest of the sane ecosystem supports

#

you can remap to spigot for runtime, but we do not support their stuff at dev time

jovial helm
#

okay thanks

polar edge
#

Can someone spoonfeed me gradle code for a new project?

#

From what I can see, paper doesn't load

lament scarab
#

You just add the repo and the dependency

static urchin
#

our docs have a thing you can just follow

polar edge
#

Doesn't really have a thing

#

It has a create new project

lament scarab
polar edge
#

Yea, exactly, create new project

lament scarab
#

that comes from java or java-library

#

The expectation is that you created a new gradle project using sane means

polar edge
#

And where does it come from?

lament scarab
#

what?

polar edge
#

I use a 3 year old plugin that was in maven. Now I want it in Gradle. I have never made anything new with gradle, I just need someone to give how settings and build looks like

lament scarab
#

gradle init .

#

There are also 20 dozen different projects out there using gradle that you can look at

polar edge
#

And that's what is missing from the docs

#

except that it failed

lament scarab
#

I'd guess maybe it doesn't need the dot

#

or maybe it was some different command

polar edge
#

Still an error

lament scarab
#

plugins {
java
}

#

deleting the pom file would of killed the auto migration detection stuff

polar edge
#

And autocompletions?

lament scarab
#

make sure that you reimported the project in IJ and have the correct java version set? etc

#

it generally just works unless you have stuff not in a source root for some reason

grim dock
brave widgetBOT
grim dock
#

I'm encountering a strange error in the projects I'm working on, and I haven't been able to determine the exact cause. When I try to use the Gradle plugin with paperDevBundle(), I get the error:

io.papermc.paperweight.PaperweightException: Exception executing

However, when I call it as foliaDevBundle(), I don't get this error. I haven't changed anything else, and the strange part is that my teammate working on the same project doesn't encounter this error, nor does the server where the project is built.

I'm using macOS, but I don't think it's related to that, because if it were, foliaDevBundle() wouldn't work either.

Could you help me figure this out?

lament scarab
#

delete the paperweight caches and try again

#

otherwise, there is no useful information there at all

strong merlin
#

I can't seem to figure out why I can't create minecraft feature patch it's just doesn't let me do anything with it
I'm trying

git commit -m "<message>"

under <myforkname>-server and rebuildminecraftfeaturepatches and I get nothing

light canopy
lament scarab
static trout
#

The Worldguard locate command overwrites the one from minecraft, does anyone know how I can fix this

glass sable
#

use minecraft:locate instead

woven light
#

im tryna get paperweight on my plugin, but for some reason intellij doesnt get the org.bukkit.* classes, only org.bukkit.craftbukkit (in remapped jar), and a few other were downloaded, i have no idea whats wrong

turbid moon
#

Also make sure your IDE is updated

cursive salmon
#

first time gradle user here in my gradle.settings

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven("https://repo.papermc.io/repository/maven-public/")
    }
}```
Why do I get the error 
`Could not find method maven() for arguments [https://repo.papermc.io/repository/maven-public/] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.`
woven light
woven light
#

optionally give it a name aswell by name("")

#

here is the build.gradle

#

(Invalidating caches didnt work)

smoky violet
#

the easiest thing to try is start over with the test plugin and then add your extra dependencies

woven light
#

hm.. ok

sick bough
bronze ember
# sick bough

Well, it's a unit test you broke with your changes most likely?

sick bough
#

well, I would think so too, but I haven't touched this file whatsoever. I suppose I'll try to "binary-search-revert" all the patches and look for the culprit

lament scarab
#

I mean, I'm not even sure all of the tests were running at some point

#

but, that was also pre hardfork, so, a lot of stuff has changed since then, and time is all screwery wewey

strong merlin
lament scarab
#

so, make sure that you've cd'd into the folder where that source tree exists

strong merlin
lament scarab
#

./paper-server/src/minecraft/java

strong merlin
#

ah ok thanks I was thinking that was too deep into the structure

sick bough
sick bough
#

anyways, I'll just update to 1.21.4

sick bough
#

There are little to no patches too.

smoky violet
#

you need to provide a little more information for anyone to help you, we can only make guesses at how your setup is broken without even the errors

#

in general when you ask a question online you should provide as much information as possible that you can imagine being relevant, people don't like to play 21 questions

sick bough
#

yeah, sorry, a few exceptions:

java.lang.NullPointerException: Cannot invoke "org.bukkit.NamespacedKey.getNamespace()" because "key" is null
    at org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(CraftNamespacedKey.java:28) ~[slimer-1.21.4.jar:1.21.4-DEV-fc41616]

...

Caused by: java.lang.IllegalArgumentException: Unknown-Version is not in valid version format. e.g. 1.8.8-R0.1
    at EssentialsX-2.21.0-dev+187-80bdc52.jar/com.earth2me.essentials.utils.VersionUtil$BukkitVersion.fromString(VersionUtil.java:202) ~[EssentialsX-2.21.0-dev+187-80bdc52.jar:?]

...

Caused by: java.lang.NumberFormatException: For input string: "Unknown"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]

well, judging by these seems like the "version" is missing somewhere

#

it's a fresh project, I most likely missed a place where I need to change something

silent osprey
#

Trying to import paperlib using maven and I get this any ideas?
net.md-5:bungeecord-parent:pom:1.21-R0.1-20250312.221935-73 failed to transfer from https://papermc.io/repo/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of papermc has elapsed or updates are forced. Original error: Could not transfer artifact net.md-5:bungeecord-parent:pom:1.21-R0.1-20250312.221935-73 from/to papermc (https://papermc.io/repo/repository/maven-public/): authorization failed for https://papermc.io/repo/repository/maven-public/net/md-5/bungeecord-parent/1.21-R0.1-SNAPSHOT/bungeecord-parent-1.21-R0.1-20250312.221935-73.pom, status: 403 Forbidden

rustic reef
#

might be related to using the old repo

echo kilnBOT
rustic reef
silent osprey
sick bough
#

seems like the issue is here.. not sure how to fix it

bronze ember
#

That's from your manifest

smoky violet
#

you also might need to patch src/main/java/org/bukkit/craftbukkit/util/Versioning.java

jovial jetty
bronze ember
#

(that includes not cutting of log files. We need it in full)

jovial jetty
#

nevermind, i resolved the issue, ty anyway

cursive salmon
#

where is this variable meant to come from

main mica
cursive salmon
main mica
#

could you paste your build file?

#

and make sure your gradle is up-to-date first. paperweight requires 8.12+

cursive salmon
#

ohh that must be the problem then it says my project is using 8.4

dusk quail
deft atlas
#

Does paperweight still support reobfuscatting to spigot since the paper hard fork or are you required to use spigot jars now to support both still?

dusk quail
#

The example plugin shows how to reobf for spigot again

sick bough
#

quick question, should I commit my patch files (locally) so they are not overridden?

#

I had a case where I was modifying a file at all and when re-applying patches all my changes of a different (which was not touched) file were gone.

quick thicket
#

heya

did somebody find the solution for git -c commit.gpgsign=false -c core.safecrlf=false reset --hard base without switching to wsl?

lament scarab
#

a solution?

quick thicket
#

it throws error 128

#

on windows

lament scarab
#

work out why

quick thicket
#

because filename too long

#

i watched above, one person had same issue

lament scarab
#

then use a shorter path name or enable long paths in your OS

quick thicket
#

i can't do it shorter

lament scarab
#

The nature of "or" is a complex and fickle word

quick thicket
#

ok..

quick thicket
lament scarab
#

You need to enable it in git

quick thicket
#

ok thx

quick thicket
#

How to produce patches for build.gradle.kts of server/api (for 2.0 paperweight)?

I'm changing file, typing git add . && git commit -m "Test"
then... no changes

what command should I use for rebuilding build.gradle.kts patches?

#

(in old paperweight I just git added, commited and run rebuildPatches)

lament scarab
#

it's basically the same, just where you commit might be different

quick thicket
#

but build.gradle.kts is in .gitignore at example

#

how I can commit it?

#

(removing it from gitignore is not solution I think)

lament scarab
#

the rebuild should hook the other rebuild tasks last I knew

#

otherwise, it's one of the single file tasks

quick thicket
#

ok, it works with ./gradlew rebuildForkPatches

rain vessel
#

i began updating my purupr fork today to 1.21.5, and i get this error:

Execution failed for task ':Canvas:canvas-server:downloadMcVersionManifest'.
> Error while evaluating property 'expectedHash' of task ':Canvas:canvas-server:downloadMcVersionManifest'.
   > Failed to query the value of task ':Canvas:canvas-server:downloadMcVersionManifest' property 'expectedHash'.
      > Collection contains no element matching the predicate.```
rain vessel
#

nevermind! forgot we were on snapshots

slim dawn
#

gradle.build file, anyone mind looking at it please ?

lament scarab
#

run with --refresh-dependencies ?

slim dawn
#

lemme try

#

it did not work

proud maple
#

bump vault to 1.7.1 and try again, and maybe take a look at your dependency graph

slim dawn
#

ok, lemme check that

proud maple
#

make sure your wrapper is up to date if you haven't already

slim dawn
#

yeah it is 8.13 already

#

it works now, thanks

#

it was vault that caused the problem

bright agate
#

im came into a bit of a pickle.
on my fork of Paper (for PRs), i update main, branched off, applied patches and got this error:

#

is there some way to foruce update this stuff? Maybe the current MC build is off?!?! im lost

lament scarab
#

look at the patches?

#

I mean, either there is something wrong with the patches or the mc base you're applying over

#

make sure that you're using java 21, though, I think we set that internally, idr

bright agate
#

i havent changed anything in those patches btw, thats why im confused why this is happening.

the mc base you're applying over
is there a way to reset this?

lament scarab
#

well, apply patches should deal with that

#

what I'm saying is sto look at them to make sure nothing has happened to them; did you somehow desync and now they've got modifications in them?

bright agate
#

welp, thats a new one

#

ok, i clicked "text" at the bottom there... appears to be the same as what is on the repo
Update: i deleted the repo from my computer, recloned, all is well in the world.

true urchin
#

I put paper weight plugin to use NMS.
But it throws error when I reload build.gradle.kts
Is there a way to solve it?

lament scarab
#

update gradle

true urchin
#

I already use 8.2. Which version is required?

lament scarab
#

8.12

true urchin
#

Okay thanks 🙂

jovial jetty
#

Hi! I'm currently having an issue where I can't compile a complete fat jar using ShadowJar + Paperweight across two different modules.

When I run the ShadowJar task in my module 4 and it completes, the resulting fat jar does not contain the reobfuscated classes but rather the mapped ones. For example, instead of ...EntityArmorStand, I get net.minecraft.world.entity.decoration.ArmorStand.
Also, using different java versions but the project is on java 17

main gradle file -> https://pastebin.com/SQJrZXLe
module 2 - using paperweight + 1.21.4 -> https://pastebin.com/Pw0638mu
module 3 - using paperweight + 1.17.1 -> https://pastebin.com/ff4zkSnp
module 4 - should have the complete fat jar -> https://pastebin.com/NJuQ5hPx

jovial jetty
#

Working, tysm. I didn't see that configuration option

static urchin
#

Yea it is a bit hidden 😅

bold lodge
#

Hello, Idk if any of you have had this problem, but since I switched to gradle to use paper, the IDE doesn't recognize the dynmap API and marks errors on every object from the API

brisk belfry
#

can you send your build.gradle in a paste?

bold lodge
#

From what I can see, it detects and is set on the Classpath for compilation, but idk why it's not detecting it while coding

#

Sure

#

It detects the packet org.dynmap, but doesn't go beyond that

brisk belfry
#

have you tried goint to the gradle tool window and reload the project?

bold lodge
#

I have, yeah, doesn't seem to change anything

brisk belfry
#

invalidate caches?

bold lodge
#

Let's try

brisk belfry
#

or repair IDE

bold lodge
#

Also tried IDE repair...

#

Idk what the problem is 😦

brisk belfry
#

hm

#

idk either. Maybe try unlinking the gradle project in the tool window and link it again via right clicking the build.gradle file after?

raven barn
#

look at the compile classpath in your gradle window

raven barn
#

oh...

brisk belfry
#

is that not the same?

raven barn
#

yeah its the same

#

is the dependency in the correct module?

bold lodge
#

I think it is...

#

Everything else works

#

Like the paperdev is working

#

Also LuckPerms API

#

So it's odd

#

Probably dynmap's problem?

raven barn
#

try to compile
if it fails because it is actually missing you know there is something wrong with your gradle build file
otherwise just ide

bold lodge
#

Lemme try

raven barn
#

it looks like dynmap 3.2.1 is latest

#

nvm they dont update their releases

bold lodge
#

It doesn't work

#

C:\Users\luism\IdeaProjects\Factions_reborn\src\main\java\me\luismaynard\factionsreborn\dynmap\DynmapBridge.java:11: error: cannot find symbol
import org.dynmap.DynmapCommonAPI;
^
symbol: class DynmapCommonAPI
location: package org.dynmap

#

I get that

brisk belfry
#

yeah i guess the gradle cache is doing some weird things

bold lodge
#

I did reset it... idk

raven barn
#

their api docs are basically non existent
its hard to say if you are even using the right packages

#

everything from their wiki under the section "For developers" is deprecated

bold lodge
#

It used to work... I mean, I've used it until I switched to Gradle

#

It feels a little bit dead yeah

#

It's sad to see

raven barn
#

why would you switch to maven?

#

also you provided a gradle build file

bold lodge
#

Oh it's my bad

#

I switched to gradle from maven

raven barn
#

ohh

bold lodge
#

I just solved the issue...

#

As you pointed out, that page was outdated

#

The actual reference is compileOnly("us.dynmap:DynmapCoreAPI:3.7-beta-6")

#

As described in the official wiki they point you to

sterile prism
#

does anyone know how to enable string dupers on paper with aternos

bold lodge
#

Thanks for the help guys!

lucid mulch
#

you can try looking under the unsupported-settings section in paper-world-defaults.yml

raven barn
bold lodge
#

That's really odd... but it seems to work like that

brisk belfry
#

dont ask me 😅

bold lodge
#

Now Im having trouble finding the jar file

raven barn
#

their repo is a mess 😄

bold lodge
#

Where the hell does gradle drop the jar

#

XD

raven barn
#

/build/libs

lucid mulch
#

build/libs

bold lodge
#

Thanks... I actually had a modified destination folder, I'm an ass XD

raven barn
bold lodge
#

Idk... I just copy pasted it from the wiki... xd

#

It says it here

raven barn
#

gotta find that resource first 😄
i was too lazy to read their 91 pages

brisk belfry
#

last page

#

or well, last entry in the toc

raven barn
#

still too much text

quaint raven
dim pelican
#

Is paperDevBundle gone in paperweight 2.0.0-beta.16?

smoky violet
#

no

dim pelican
#

thanks, sorry I know that prbly seems dumb but I'm having a rly hard time understanding why my gradle can't find it:

dim pelican
#

omg I got it working... idk y I think the final change was
apply(plugin = "io.papermc.paperweight.userdev") ->

plugins {
    id("io.papermc.paperweight.userdev")
}
#

still confused but I have a jar now so 🤷‍♀️

twilit torrent
#

im trying to get the patched decompiled code for the 1.21.1 paper server but i keep getting this error, know how to fix it?

org.gradle.internal.operations.BuildOperationInvocationException: /Users/zeondev/Desktop/PaperServer/1.21.1/Paper-archive/.gradle/caches/paperweight/taskCache/decompileJar.jar

and i heard about something like paperweight userdev or something because you shouldnt view the code in the simple and patched decompiled way

echo kilnBOT
twilit torrent
main mica
#

client?

echo kilnBOT
#

It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.

Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.

twilit torrent
# echo kiln

I don't know if gradle is updated, I don't have it installed, I just use the gradlew command in the directory.

I'm not using userdev yet but I want to know how I can look at the decompiled and patched code and alos run it.

Logs:

brave widgetBOT
static urchin
#

./gradlew applyPatches

twilit torrent
#

ill send the applypathces log

#

and also

#

shouldnt i view it in userdev?

static urchin
#

Eh, your decision

twilit torrent
#

In the code

static urchin
#

not really no.

twilit torrent
# static urchin ./gradlew applyPatches

Applying: Add PlayerNameEntityEvent
Applying: Add recipe to cook events
Applying: Add Block#isValidTool
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Patch failed at 0498 Add Block#isValidTool
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: Your local changes to the following files would be overwritten by merge:
src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
Please commit your changes or stash them before you merge.
Aborting
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch

*** Please review above details and finish the apply then
*** save the changes with ./gradlew rebuildPatches

Task :applyServerPatches FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':applyServerPatches'.

io.papermc.paperweight.PaperweightException: Failed to apply patches

  • 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 12s
38 actionable tasks: 4 executed, 34 up-to-date
➜ Paper-archive git:(ver/1.21.1)

i get this every time

#

im really stuck here and i do not know the solution

twilit torrent
#

can anyone help me here?

bronze ember
#

well, the error says everything already, you edited the file craftblock

#

reset your modifications and apply patches again

glass warren
#

Also 1.21.1 isn't really supported.

#

Doesn't make a lot of sense to be messing with 1.21.1

twilit torrent
#

and i can do it with the newest papermc git repo, but not with the 1.21.1 branch

#

so is there nothing i can do?

#

there has to be a solution just to build it once

lament scarab
#

use java 21

#

make sure that you're not running in a folder tained by cloud stuff, i.e. iCloud

modest steppe
#

What I did wrong?

lament scarab
#

use a shorter path or enable long paths in git

modest steppe
split yarrow
#

22:38:33: Executing 'fixupSourcePatches'…

Reusing configuration cache.

Task :paper-server:fixupSourcePatches FAILED
interactive rebase in progress; onto 22ffe7b
Last commands done (2 commands done):
pick 4da8017 paper File Patches
fixup 1249f69 fixup! paper File Patches
Next commands to do (31 remaining commands):
pick b194f03 Optimize Network Manager and add advanced packet support
pick 2cefa33 Allow Saving of Oversized Chunks
(use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch 'main' on '22ffe7b'.
(use "git commit --amend" to amend the current commit)
(use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean
1 actionable task: 1 executed
Configuration cache entry reused.

#

i did not change any files, its just a clean clone

bronze ember
#

if you didnt change any files, why are you running fixup?

split yarrow
#

when i change files

#

so i tried to make a new clone

bronze ember
#

go into that folder and run git status

split yarrow
#

its really weird.

bronze ember
#

so I guess it worked fine then

split yarrow
#

no

#

my only chage

#

clean clone

bronze ember
#

well, thats an entirely different error?

split yarrow
#

i mean if i run again

#

that old error comes 💀

#

it is looping

bronze ember
#

you also ran git status in the wrong folder

split yarrow
split yarrow
#

yeah

bronze ember
#

no

#

in the paper-server/src/minecraft/java folder

split yarrow
#
$ git status
interactive rebase in progress; onto 22ffe7b
Last commands done (2 commands done):
   pick 4da8017 paper File Patches
   fixup 1249f69 fixup! paper File Patches
Next commands to do (31 remaining commands):
   pick b194f03 Optimize Network Manager and add advanced packet support
   pick 2cefa33 Allow Saving of Oversized Chunks
  (use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch 'main' on '22ffe7b'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean
bronze ember
#

continue that

split yarrow
#

i haven't touched it tho

bronze ember
#

then abort it

#

and run appP

split yarrow
#

running

#

ok , now what to do

bronze ember
#

idk what you are trying to do in the first place

split yarrow
#

Ok it works now

bronze ember
#

but you should be in a clean state now

split yarrow
#

Yeah

#

thx

#

suddenly my fixupSourcePatches started erroring

agile mountain
#

heya, I'm using jpenilla's run-task and i wanna add plugin downloads directly, by using hangar

#

i know that the plugin i wanna add is on hangar

#

but where do i find the exact string i have to put in?

#

so, in this example, it's "squaremap"

static urchin
#

just the lowercase name I believe?

agile mountain
#

oki doki

main mica
#

Anyone happen to know if there is some way to get IntelliJ to recognise paperweight patch files as valid?
It fails with "Unknown chunk start syntax: line 2". I liked to use the "Apply patch" UI, and that refuses to work now as it doesn't consider the patch to be valid

bronze ember
#

It's because we use magic patch headers

#

It's really meh

smoky violet
#

rebuild it with the mindiff headers disabled first

main mica
#

I did apply them without IJ now, but how would I rebuild like that?

pastel forum
#

is there a github repo that has the server internals that are accessed through paperweight userdev

bright agate
#

paperweight builds them in your IDE, they dont exist anywhere on github
(well at least the Minecraft part. The Paper/Craftbukkit stuff is on the Paper repo)

split yarrow
#

we don't talk about them

bright agate
#

if we dont talk about them, why are you bringing it up?
Thats not going to help this user in this case.

split yarrow
#

but fine, i will not bring it up

pastel forum
#

is there any way i can get those classes locally?

split yarrow
#

and run gradlew applyPatches

bright agate
#

theyre in your IDE, under external libraries

pastel forum
pastel forum
#

why do i have double classes?

split yarrow
pastel forum
pastel forum
bright agate
#

ones a java file, ones a decompiled class

pastel forum
#

oh

bright agate
#

why it does that? I havent a clue 😂

pastel forum
#

anyway thanks

bright agate
#

You’re welcome

hollow stump
#
plugins {
    id("java")
    //id("io.papermc.paperweight.userdev") version "2.0.0-beta.16"
}

group = "me.flame.testsmp"
version = "1.0.0"

java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))

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

dependencies {
    //paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
}

I've also adjusted my settings.gradle.kts

For some reason if I uncomment the plugin, the java one stops working

and I get this error. (error.txt)

brave widgetBOT
light briar
static urchin
#

you need gradle 8.12

#

remove paperweight -> update gradle -> readd paperweight

light briar
glad mirage
#

What does this mean?

'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'

#

i updated gradle and tried to add paperweight but now i'm getting this

lament scarab
#

it means nothing useful

#

if you want people to help you with an error, people need to see the full error, not some random line from it

glad mirage
#

that is it, there is no more error

lament scarab
#

in the left part of that, click the task itself

glad mirage
#

oh i see

#
FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\wtfte\IdeaProjects\RemnantSMP\build.gradle' line: 21

* What went wrong:
A problem occurred evaluating root project 'RemnantSMP'.
> Could not get unknown property 'ReobfArtifactConfiguration' for root project 'RemnantSMP' of type org.gradle.api.Project.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'RemnantSMP'.
> Failed to notify project evaluation listener.
   > 'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'

* 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.
==============================================================================

CONFIGURE FAILED in 90ms
lament scarab
#

well, your build setup is apparently invalid

echo kilnBOT
glad mirage
#
plugins {
    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.16"
}

group = 'io.github.mrnameless666'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        name = "papermc-repo"
        url = "https://repo.papermc.io/repository/maven-public/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
}

paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION()

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

def targetJavaVersion = 21
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}
lament scarab
#

I mean, that's not the full value that it tells you to use

#

Also, if you're targeting 1.21.4, and paper mappings, you don't need that line as you don't need reobf

glad mirage
lament scarab
#

paper mappings, mojang mappings, same difference

#

if you're not targetting spigots mappings, you don't need that

#

or, well, actually, maybe there is some advantage to declaring that, idk

glad mirage
#

so what exactly do I need to remove, cause I copied this from a version of my plugin that was working before and for some reason it breaks

lament scarab
#

either way, grab the full line

#

I'm guessing that you didn't copy an import or something and so it's resolving that thing differently, that's why the full line exists

glad mirage
#

so like this? io.papermc.paperweight.userdev.ReobfArtifactConfiguration instead of ReobfArtifactConfiguration?

lament scarab
#

yes

smoky violet
spiral saddle
#

does anyone know the minecraft versions that paperweight-userdev supports

bright agate
#

1.17.1+

spiral saddle
#

Downgrading from 1.21.4-R0.1-SNAPSHOT to 1.21

A problem occurred configuring root project '~~~~~~~~'.
> Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
    Unable to resolve a dev bundle, which is required for paperweight to function.
> Could not find io.papermc.paper:dev-bundle:1.21.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/io/papermc/paper/dev-bundle/1.21/dev-bundle-1.21.pom
       - https://repo.papermc.io/repository/maven-public/io/papermc/paper/dev-bundle/1.21/dev-bundle-1.21.pom
       - https://oss.sonatype.org/content/groups/public/io/papermc/paper/dev-bundle/1.21/dev-bundle-1.21.pom
       - https://maven.maxhenkel.de/repository/public/io/papermc/paper/dev-bundle/1.21/dev-bundle-1.21.pom
     Required by:
         root project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
#

could not find 1.21

novel knoll
#

well, 1.21 is not a version

#

1.21-R0.1-SNAPSHOT would be

echo kilnBOT
#

It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.

Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.

spiral saddle
novel knoll
#

idk if we even released a 1.21 before 1.21.1?

spiral saddle
#

do you know where i can find a full list

#

of all the versions that are supported

spiral saddle
#

oh wow

#

very handy, thank you

#

maybe have it on paperweight docs too

bronze ember
#

that part of the docs always show latest

spiral saddle
#

just think maybe its a good idea to also show where ppl could use different versions

#

anyways that worked, thanks

static urchin
#

We generally don't have much interest in people using outdated versions of paper

#

You are on your own in that regard

spiral saddle
#

appreciated 🙌

flat wave
#

contrary to what is stated on the userdev docs my shaded jar output is not the obfuscated jar, and is still the mojang mappings as written in the IDE.

how do i fix this?

lament scarab
#

Can't comment on a build setup we can't see

flat wave
lament scarab
#

You don't have it set?

#

I'm not sure if the thing will see that you're using the reobfJar task if you've not configured userdev with the mapping output

flat wave
lament scarab
#

yes

flat wave
lament scarab
#

did it work?

flat wave
#

i'll resend the script

lament scarab
#

I mean, only real first guess would be to make sure that it's running what you expect it to run, i.e. that it's actually running reobf, and that you're grabbing the correct jar

#
    destinationDirectory.set(file("epic directory here"))
#

that is obviously not going to work

#

relocation occurs after shadow

flat wave
lament scarab
#

Because you're copying the shadowed jar

#

not the reobf'd jar

#

we relocate the shadow jar, because libraries, etc

#

you've moved the shadow jar, so, iirc, that will fail running the relocation step because of assumptions you're not messing with the setup, but, also, you put the unrelocated jar elsewhere

#

We recommend using a copy task to copy the plugin jar over, see the gradle docs, or the example repo for userdev had an example if you really wanna go that route

flat wave
#

what are you recommending? that i forget copying the jar to an alternative directory and manually copy the jar from libs/ to my plugins folder?

lament scarab
#

Nowhere did I say that

flat wave
lament scarab
#

Yes

#

Well, that's not the copy task, that's the carve around

flat wave
#

what potential issues may arise doing this?

lament scarab
#

it's non standard

#

your build config generally shouldn't be taninted by env specifics

#

that kinda ruins the entire portability aspect of these tools

flat wave
#

so just to clarify, reObf happens after the shadow task, correct?

lament scarab
#

yes

flat wave
# lament scarab Yes

i tried this:

outputJar.set(file("dir here/Plugin.jar"))

because i want it going straight into there. However the jar is nowhere to be found in the directory

#

the only thing ive changed is removed outputting anything in shadow task, and added the reObf task:

reobfJar {
    outputJar.set(file("dir here/Plugin.jar"))
}```
bronze ember
#

if you want to move your jar into your plugin dir, you should look at the run-task gradle plugin instead

flat wave
bronze ember
#

yes

flat wave
# bronze ember yes

can i move the jar into my plugins folder without starting run-paper? meaning i can still run my server through IntelliJ's native debugger

smoky violet
#

the debugger works with run paper

flat wave
smoky violet
#

then you can use a copy task that runs before your ij run

flat wave
smoky violet
#

see pins

#

then for getting intellij to run the task, not sure

#

I just use the gradle plugin for this

agile mountain
#

has anyone had this issue? the gradle tasks work but the IDE doesn't like it for whatever reason

static urchin
#

groovy dsl moment

raven barn
#

you are using kotlin syntax in groovy

#

its id 'xyz' version '1.2.3'

#

not "

rain pollen
#

Hi, I'm trying to fork AdvancedSlimePaper using the paperweight-examples/v2-fork-of-fork as the base.
My issue is that the access transformers of this project do not get applied because paperweight cannot find the file.
I think that the issue occurs because the project uses a custom rootDirectory for the paperweight project: rootDirectory = project.rootProject.layout.projectDirectory.dir("impl")
This directory is ignored when forking the project (CoreTasks.kt#L145)
Is there way to counter this issue or should I create a new issue in the paperweight repository?

smoky violet
#

you need to patch that line in the build script like with the older betas' whose syntax they are still using

#

bug them to remove it, the example is updated in that regard

#

oh I see what they're doing, it looks like outdated syntax but it's weird custom stuff

#

the advice to patch it on your end probably still applies then, but if that fails you need to ask them for anything further

#

paperweight-core/patcher is only designed to be used as shown in Paper and the examples, i.e. on the root project and a server subproject, for more custom setups you will be trailblazing

#

the advice to ask them to remove it also likely applies still, for example they could structure it how paper does with concurrentutil (with or without a monorepo)

#

and then use an included build for local development (or even just keep the same single-build setup but change the paperweight projects to be in their normal root/child positions)

#

any of those setups would be easier to reason about since they add to the existing structure rather than changing things

#

if they need help migrating to a more standard setup they can ask here, but I don't really have time to investigate custom stuff

agile mountain
#

interestingly enough, it's not complaining about bad syntax

smoky violet
#

the file you showed is groovy

#

some of the lines are also valid kotlin

light briar
#

Hi there. I'm making a library for my own use, which is built on the top of NMS. I have build logic for publishing the NMS implementation artifacts.
They worked well in Gradle 8.7 but no longer work now since I've moved the project towards Gradle 8.12.0 as I've told to do so because I added support for 1.21.4 and paperweight failed to work on such an old Gradle version. Yes we're failed on older 1.20.1 module but I've changed nothing against it...
Here is the build script for the failing module: https://pastes.dev/55OMSBGyWG

bronze ember
#

we need the log

#

but you also need to use java 21 I guess

light briar
#

already using Java 21

bronze ember
#

not in that paste

lament scarab
#

for 1.20.1 they'd want 17 iirc

light briar
light briar
lament scarab
#

Invalid publication 'v1_20_R1': multiple artifacts with the identical extension and classifier ('jar', 'null').

light briar
#

I've searched around this issue in this discord, google and somewhere else. I've noticed someone met this issue before but I've not seen the solution.

lament scarab
#

/ this line fixed the critical issue provided by paperweight-userdev
// we can't let Gradle found the remapped JAR without this line!
reobfJar.dependsOn jar

light briar
lament scarab
#

I mean, the things upset about the build outputs and there being multiple artifacts

#

having a line like that only seems to likely cause further issues

#

reobfJar will also already hook the jar task automatically, so, idk what you could be working around

light briar
#

IDK too, I've already forget where I added this line originally as this script was copied from my another project.

#

So I've removed that line but nothing got changed. still failing with the same error.

lament scarab
#

I'm guessing it's upset because components.java has more than 1 thing on it, and so you'd need to select it from that

#

or, publishing maybe has some way to specify the task or something

light briar
#

IDK if these guess was true as my logic worked on Gradle 8.7 before but now it doesn't anymore

#

but there seems that nothing changed on the maven publishing plugin doc for Gradle 8.12

lament scarab
#

it's upset because there are multiple artifacts and it has no idea what artifact to use

#

the solution would be to tell it what artifact to use

#

maybe you want the reobf target option setting as per the userdev docs, idk how that works

#

what happens if for the artifact, you remove the from, and only use the task inside of the output file

light briar
lament scarab
#

Well, you need to work out how to get the publication to select the correct thing

#

I'd guess it's the from, but, idk; I don't have the time to setup a test, and really don't wanna fight with what looks like groovy

light briar
#

really a weird issue as I've changed nothing against build logic but only Gradle version, IDK what Gradle guys did in these versions

lament scarab
#

The issue is likely going to be an artifact of paperweight having changed to showcase non-reobf'd jars

light briar
#

I had no idea on it xD, I couldn't even figure out what causing this

light briar
#

ah thanks to DeepSeek, I've figured it out. it says I'm missing a classifier for the artifact, so the updated script is just like:

publishing {
    publications {
        v1_20_R1(MavenPublication) {
            from components.java
            // BEFORE:
            // artifact reobfJar.outputJar
            // AFTER:
            artifact(reobfJar.outputJar) {
                classifier = 'reobf'
            }
        }
    }
    // ...
}
#

and ty electroniccat for discussing with me for such a looooong time xD

terse sorrel
#

as a followup: applyAllPatches fails due to unknown project or is it safe to ignore, do the edit and run patching?

static urchin
#

that does not sound safe to ignore

#

did you update the settings.gradle.kts include

static urchin
#

I mean...

#

lol

terse sorrel
#

basically when I edited the root build.gradle I ran applyAllPatches as part of "figure it out"

#

yeah i know

#

so the question is

#

do I just edit it

static urchin
#

Yes

terse sorrel
#

and run patch whatever task or just rerun applyAllPatches

static urchin
#

Tho, that thing shouldn't even be there, I am a bit confused

static urchin
#

ah, no that is fine there

#

I am just looking for your .patch files

#

idk where they are

terse sorrel
static urchin
#

Yea but your server neends a patch too

#

where did that one go

terse sorrel
#

well that was my original question, because I can download one from paperweight-example but I have a feeling I need to generate the patchfile myself because editing patches manually doesn't feel right

#

because if i edit the dependency and rerun applyAllPatches it reverses the edit

static urchin
#

I think the general workflow is to clone examples, checkout the fork-of-fork branch thing, applyAllPatches, rename everything, rebuild the patches

#

tho, tbf, I have not used this to fork a fork

terse sorrel
#

but I need fork of folia and not of paperweight example

static urchin
#

paperweight examples is an example fork of a fork

terse sorrel
#

nono

static urchin
#

you'd be a fork of a fork because you'd be a fork of folia which forks paper

terse sorrel
#

I mean, fork-of-fork example uses simple fork from the same repo as the upstream

#

paper -> simple fork -> fork-of-fork

#

last 2 are from the same repo

static urchin
#

What

#

no

#

fork-of-fork is a "fork" of the paperweight-examples simple fork

split yarrow
#

ok if we also incude spigot, and cb it will hurt our brain

static urchin
#

Well those thankfully don't exist anymore in this hierarchy

split yarrow
#

real

#

soft spoon

turbid moon
static urchin
terse sorrel
#

I already tried that

static urchin
#

then fix apply errors

#

maybe you cannot apply all patches instantly then if it expects things to be around that aren't yet

#

or, tbh, go look at other folia forks

#

and just copy what they do

terse sorrel
static urchin
#

As stated, I have not used this to fork folia so I cannot comment on that

terse sorrel
#

yeah I understand that, so that can be treated as a suggestion to the tooling system

static urchin
#

but our fork tooling is "best efforts on our end but, we are already doing you a giant favour to even code that up, figuring out specifics is on you"

#

So yea, I'd find other folia forks honestly

#

or purpur forks

#

I am sure there are some

#

(or wait here, maybe someone else knows the setup workflow more than I do xD)

terse sorrel
#

there's no error in rejection btw

static urchin
#

?

#

thats a rejected hunk, it didn't apply

terse sorrel
#

I understand which hunk

static urchin
#

it isn't a git patch

#

the .patch file there is a diff patch

terse sorrel
#

ima just download folia's folia-server build gradle

#

edit it

#

and generate patch manually

rain pollen
white arrow
# smoky violet paperweight-core/patcher is only designed to be used as shown in Paper and the e...

I know this is a day old but this was brought up in our discord as I am one of the maintainers. You can actually get Paperweight to work with this structure when forking AdvancedSlimePaper (as I did in my private fork of AdvancedSlimePaper), however I agree that its just unnecessary hassle.

This was not my design decision and I just kept it from the guy that started the hard fork process. We are currently evaluating to change it or provide a more clear hard fork example on our end. But I think we will just go with the recommended folder structure 🤝

vivid knot
#

I'm using paperweight paper dev bundle but it's not including org.bukkit stuff (like JavaPlugin). Am I doing something wrong?

dusk quail
#

any errors and show your build.gradle(.kts)

vivid knot
#

oh nevermind, it's fixed after restarting my ide

frail pelican
#

How can I get rid of this here:

/home/jan/IdeaProjects/CombatTest/src/main/java/net/jandie1505/combattest/ItemStorage.java:371: Error: Symbol not found
            meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier("generic.attack_damage", 0, AttributeModifier.Operation.ADD_NUMBER));
                                               ^
  Symbol: Variable GENERIC_ATTACK_DAMAGE
Location: Interface Attribute

I will replace the deprecated methods, but since I have a lot to update, I can't do it right now. But gradle does not let me build the project.

bright agate
#

if youre using a recent API version, use ATTACK_DAMAGE instead of GENERIC_ATTACK_DAMAGE

frail pelican
#

I have changed that now, but how can I make gradle build a project which is using Deprecated forRemoval methods. Because they're a lot and I can't update them at once

bright agate
#

it should still build them. They're just warnings

brisk belfry
#

on a project with multiple modules is there an easy way to define paperweight for all of them or do I need to do it separately for every module?

turbid moon
#

As in ```kt
subprojects {
plugins.apply("paperweight-userdev")

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

}

#

But you get what I mean

lucid mulch
#

i suppose that wouldn’t work since it sounds like he wants different dev bundles for each module

turbid moon
#

In that case leave on the dependencies part and only do the plugins.apply one lol

#

And then declare the dev bundle in each module separately

brisk belfry
#

no i want a single version for all modules.

#

ill try that out thank you

echo kilnBOT
#

It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.

Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.

bronze ember
#

@honest fog ^

honest fog
#

Okay will check it

#

Build file:

plugins {
    kotlin("jvm") version "1.9.23"
    id("xyz.jpenilla.run-paper") version "2.3.1"
    id("com.github.johnrengelman.shadow") version "7.1.2"
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.16"
}

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

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

dependencies {
    testImplementation(kotlin("test"))
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

tasks.test {
    useJUnitPlatform()
}
kotlin {
    jvmToolchain(21)
}

Error:

A problem occurred configuring root project 'MovieGate'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16.
     Required by:
         project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16
      > No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but:
          - Variant 'javadocElements' capability io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'shadowRuntimeElements' capability io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 declares a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies repackaged (shadow jar):
              - Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.5'
          - Variant 'sourcesElements' capability io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
bronze ember
#

Update Gradle

honest fog
#

its on 8.5

main mica
#

latest is 8.13

honest fog
#

Okay will update to it

rapid pier
#

how to fix this

lament scarab
#

work out what patch and why it's corrupt and fix it

rapid pier
lament scarab
#

Well, you apparently broke it

rapid pier
lament scarab
#

I don't know what you did

bronze ember
#

You can't edit the patch file

lament scarab
#

We don't provide support for hand editing patch files

rapid pier
lament scarab
#

You apply them using a tool like git and then fix them

#

if you're trying to mess with 1.21.5, I'd generally suggest that you don't, our feature patches don't apply yet, and we're waiting for moonrise to update, etc

rapid pier
lament scarab
#

Well, you wouldn't be modifying the xray patch in a properly supported fork anyways

#

you'd be using our patching tools and modifying it after the fact, see the paperweight-examples repo

bronze ember
#

Generally, this is an advanced topic, so don't expect hand holding

#

In fact, the anti x-ray patch is a good example of one of the things that are missing for 1.21.5 since even on the team not everybody is comfortable to touch that

rapid pier
# bronze ember And the contributing.md

thank you, but i need to fix io.papermc.paperweight.PaperweightException: Command finished with 1 exit code: git -c commit.gpgsign=false -c core.safecrlf=false commit --fixup file

#

and why its trying to commit something?

bronze ember
#

Look at the log files in the .Gradle folder in the server project

rapid pier
brave widgetBOT
bronze ember
#

Maybe a git status in the Minecraft/java folder helps you figure it out

rapid pier
bronze ember
#

Stop pinging me.

rapid pier
#

ok

lament scarab
#

tries to contribute something