#build-tooling-help

1 messages · Page 22 of 1

smoky violet
#

(probably faster than troubleshooting yourself)

west furnace
#

Ok so I started using WSL to try and build paper and applying patches is working fine but when I try to build the actual server jar I keep getting this error

Execution failed for task ':paper-server:compileJava'.
> Compilation failed; see the compiler output below.
  /mnt/e/Paper/paper-server/src/minecraft/java/io/papermc/paper/FeatureHooks.java:215: error: unreported exception IOException; must be caught or declared to be thrown
          world.entityManager.close(save);
brisk belfry
#

have the project on wsl as well

bronze ember
#

(as in, not in that mnt folder but your home folder)

strong merlin
#

I'm having a problem with publishing to my private repo
getting Broken pipe error

    extensions.configure<PublishingExtension> {
        repositories {
            maven("<repourl>/repository/dev-private/") {
                name = "example"
                credentials(PasswordCredentials::class)
            }
        }
    }

and in gradle home directory I have gradle.properties with
exampleUsername=<username>
examplePassword=<password>
and gradle doesn't seem to pick this up
either I think I have wrong url to upload or idk

turbid moon
#

Please do not put your maven repository login data into your code. Use environment variables

strong merlin
#

I'm putting them in ~/.gradle/gradle.properties

#

not in project root folder

static urchin
west furnace
#

I decided to follow whats in CONTRIBUTING.md and rebased the git and tried again to get the same error

static urchin
#

Why are you rebasing?

#

What are you doing

lament scarab
#

if using WSL still, make sure that you're not crossing FS boundaries

#

i.e. do the operation in your WSL home folder and not the hosts /mnt folders

west furnace
#

So will I need to run sudo umount

lament scarab
#

No

#

you need to stay in the home folder

#

not go into /mnt

west furnace
#

So I need to open it in E:\ and not mnt right

paper kestrel
#

If you are running it in wsl, e:\ doesn't exist

bronze ember
#

No, you want your home dir

#

/home

paper kestrel
#

Or it does, but it's as /mnt/e (iirc), not /home

bronze ember
#

Git clone paper somewhere there

lament scarab
#

don't do stuff on the E drive

#

do not do stuff inside of /mnt/*

#

Doing so means that you're running the tooling over a janky networked filesystem, and that breaks a lot of tooling which generally expects file behavior to be consistent

west furnace
bronze ember
#

A new clone is safest

paper kestrel
#

Yeah, do a new clone to avoid coping gits platform specific line ending handling

paper kestrel
lament scarab
#

it's planfs, not raw NTFS

west furnace
#

Ok im gonna clone into /home/Paper and try and rebuild

#

Ive been switching to the ver/1.21.4 branch to build, is that part of the issue?

bronze ember
#

Shouldn't be

west furnace
#

Ok

#

I just cloned into /home/Paper and created a new branch off of ver/1.21.4

paper kestrel
west furnace
# west furnace I just cloned into /home/Paper and created a new branch off of ver/1.21.4

Ok I tried doing applyPatches in the new directory and got this error

> Task :paper-server:macheDecompileJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper-server:macheDecompileJar'.
> io.papermc.paperweight.PaperweightException: Execution of 'org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler' failed with exit code 137. Log file: /home/Paper/paper-server/build/tmp/macheDecompileJar/decompileJar.jar.log Classpath: /root/.gradle/caches/modules-2/files-2.1/org.vineflower/vineflower/1.11.0-20241204.173358-53/d6b196ae341a9a8143aa563a57d825a204a4a162/vineflower-1.11.0-20241204.173358-53.jar

It got through setupMacheResources importPaperLibraryFiles setupMacheResources and applyResourcePatches but then it stopped here

#

I made sure to do sudo chmod +x gradlew so gradle could write in /home/ too

lament scarab
#

137 probably means that you ran out of memory

fading vapor
#

Is there any reason you're running this in WSL?

west furnace
fading vapor
#

How are you certain its a windows issue

west furnace
fading vapor
#

Patching and building is really slow, what can I do?
This only applies if you're running Windows.

#

WSL isnt the solution to your problem

west furnace
#

Ok so building the regular server jar is fine but when I edit a patch and try and do /.gradlew fixupSourcePatches it tells me my branch is ahead of the main branch and tells me to use git push

#

When attempting to use git push it errors cuz I cant push to PaperMC/Paper.git so im guessing I have to fork it first or smth

west furnace
amber sequoia
#

What is oldPaper in latest userdev changelog?
could it be... it's possible to use userdev for older versions now?

static urchin
#

No

distant mango
#

older then 1.17 or something? no

#

pretty sure that's papermc/paper-archive repo

west furnace
# west furnace How can I switch branches when doing this

This is the error msg that im getting rn

> Task :paper-server:fixupSourcePatches FAILED
On branch main
Your branch is ahead of 'upstream/main' by 32 commits.
  (use "git push" to publish your local commits)

I tried setting the 1.21.4 patched branch to the main branch and got the same error, does fixupSourcePatches take branch arguments

#

Btw I forked the repo before doing all of this. I tried running git push and it tells me everything is up to date after I did the commit

fervent swan
#

is it possible to use the hangar-publish-plugin with maven? or with intellj if that matters

lament scarab
#

that's a gradle plugin

#

idk if there is a maven plugin available, there might be a cli client you could maybe invoke using an ant run task or whatever

fervent swan
#

oh ok

lament scarab
#

(There is an awesome hangar repo, which, I'm sure if somebody had something they'd post on there)

lament scarab
fervent swan
#

ty

fervent swan
glass sable
#

you run it with the appropriate environment variables/system properties set for where you want to release the jar to

fervent swan
#

the program

glass sable
#

they seem to only releaes a docker file and a github action

fervent swan
#

so maybie how i can build that they dont tell how

glass sable
#

it's a maven project so just mvn package I would assume

fervent swan
#

ok gonna try

glass sable
#

not sure why they don't release a jar directly lol

fervent swan
#

i have build it gonna test it

#

and ty

soft python
#

Hi guys, what should I do with this error?

lucid mulch
#
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenLocal()
        maven("https://repo.papermc.io/repository/maven-public/")
    }
}
shrewd crestBOT
#

(6802b7561df977252a68f762) // @brazen pond (@ruba_34539 / 1158066518911889438) has been banned by @glass warren (188417437295706113)
Reason: Steam scam

tired wharf
frail pelican
#

Is there a way to relocate all dependencies and their dependencies with Gradle Shadow?

distant mango
#

ya

pallid chasm
#

Hey! What did I do wrong? Using build.gradle, gradle 8.10.2 and java 21

plugins {
    id 'java'
    id 'com.gradleup.shadow' version '8.3.0'
    id 'io.papermc.paperweight.userdev' version '2.0.0-beta.16'
}

group = 'pl.maxcom1'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    mavenLocal()
}

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

The error: https://pastes.dev/SyPzJ7rspH

static urchin
#

You need gradle 8.12

pallid chasm
#

Ah, that helped. Thanks for the quick reply!

frail pelican
# distant mango https://gradleup.com/shadow/configuration/relocation/

Now I have the issue that it relocates my API (PlayerLevels-API), which should not be relocated.

[...]

dependencies {
    implementation(project(":PlayerLevels-API"))
    compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
    // Here are the dependencies to relocate...
}

tasks.shadowJar {
    isEnableRelocation = true
    relocationPrefix = "net.jandie1505.playerlevels.dependencies"
}
frail pelican
#

Or are there any other ways to use libraries without having dependency conflicts with paper and other plugins?

tired wharf
#

Can someone help me please? I need to build paper to modify it for my own need but I get this error whenever i try ./gradlew applyPatches

soft python
#

How do I change this inscription? In which class should I change it?

rapid fractal
stiff totem
# soft python How do I change this inscription? In which class should I change it?

server branding is specified in fork-server/build.gradle.kts.patch (that's the paperweight-example path, yours might be different), for example: ```diff
@@ -212,8 +_,8 @@
"Specification-Title" to "Paper",
"Specification-Version" to project.version,
"Specification-Vendor" to "Paper Team",

  •        "Brand-Id" to "papermc:paper",
    
  •        "Brand-Name" to "Paper",
    
  •        "Brand-Id" to "josie:paper",
    
  •        "Brand-Name" to "JosiePaper",
           "Build-Number" to (build ?: ""),
           "Build-Time" to buildTime.toString(),
           "Git-Branch" to gitBranch,
    
I don't recommend changing this to something that looks vanilla, because it's a slap in the face to redstone players trying to get their contraptions working on a server they think is unmodified. The only reason I change it is specifically because I want to inform redstone users that we have our own patched mechanics that diverge from Paper. Also keep in mind that plugin code may be looking at that value and break if it's an unknown value -- they should probably be looking at `Specification-Title` instead, but sometimes they aren't
bronze ember
stiff totem
#

oh sorry, didn't read that message

lament scarab
#

I mean, if it's for an actual fork that's fine, it's just tiring providing support for people who are purely trying to take attribution

#

ofc, there comes an expectation that you're competent enough to look around for where basic things are and how they work

#

Like, hey, this thing is sent to the client in a specific packet, so, go see how that packet is created

stiff totem
#

I mean I figure it probably helps with support too, since trying to support people who have modified their jar is a can of worms, and having it shown in logs immediately indicates it's not official

#

but yea, changing it to vanilla just to remove attribution is a dick move. I try to credit Paper on my server's wiki and such since hiding that we use such an awesome project makes no sense

stiff totem
# tired wharf Can someone help me please? I need to build paper to modify it for my own need b...

is this the original source? or what modifications have you made? this might be related: ```
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch

lament scarab
#

do a fresh clone directly onto the C drive and run the thing, check the FULL build log output

#

that generally screams that something broke somewhere or you somehow set the project up improperly

stiff totem
floral whale
#

Is it possible to use the runServer task in a directory outside the project?

static urchin
#

from the runTask plugin?

floral whale
#

To use the same server setup across multiple projects / plugins

#

Yeah

#

Or well, this one xyz.jpenilla.run-paper

static urchin
#

Yes

#

I think you might not be able to

#

Which, tbf, sensible

floral whale
#

Ah damn, would be nice. I always use the task for debugging.

Where is the built plugin jar for the run task even located? Since it's not in the server plugins dir

static urchin
#

it is attached to the server via startup flag

#

Well the property technically is modifiable xD

#

at least in my test project so, yknow

#

obviously tho, not really the point of that plugin

floral whale
#

Gotcha. I wonder if there's some other smart way to have a common server for multiple projects

static urchin
#

Just symlink the output jar?

floral whale
#

Havn't heard of symlink before, might be worth looking into. The main thing is that I need it to work with IntelliJs debugger though, as I rely heavily on it when testing / fixing bugs

static urchin
#

you can start a normal server in debug mode too 😅

floral whale
#

How would I set the break-points or whatever though?

static urchin
#

just the same?

#

create a new IJ run config "remote jvm debug"

#

it tells you what to add to your startup script

floral whale
#

But if I for example want to stop the code at a specific line in a method, how would I do that without having the src in same project?

static urchin
#

you would?

#

I am confused

#

or do you mean having multiple projects open

lament scarab
#

I mean, you'd need the other thing in your project

floral whale
#

Well yeah across different projects, as it would be a mess otherwise

lament scarab
#

you'd then open that library class and add a breakpoint in there

static urchin
#

doesn't IJ have workspaces or something now

lament scarab
#

There is no way to magically do it unless it's a dependency

static urchin
#

huh?

#

it does not need to be a dependency

lament scarab
#

maybe not

static urchin
#

IJ just needs to know the src file

lament scarab
#

but, it needs to be available

static urchin
#

the debugger can place them whereever

lament scarab
#

Unless you wanna screw around with the debugger tryna add them manually

static urchin
#

just make an IJ workspace I think

floral whale
#

I just looked up workspaces in IJ, might work yeah

#

I always end up spending so much time on just setting up a good testing environment instead of actually solving the bugs or whatever lol

#

It seems like the workspace just allows opening multiple projects in one window pretty much no?

static urchin
#

Yes

#

but that ought to be enough for the debugger

#

(it might, never tested that)

floral whale
#

I'll give it a shot

#

It works! I just ran runServer in one of the project in the workspace and made a breakpoint in another project within same workspace, which was stopped by the debugger

static urchin
tired wharf
main mica
tired wharf
#
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: applyPatches

> Configure project :paper-server
paperweight-core v2.0.0-beta.14 (running on 'Windows 11')

> Task :paper-server:setupMacheResources
Copy initial sources...

> Task :paper-server:importPaperLibraryFiles
Importing 13 classes from library sources...

> Task :paper-server:setupMacheResources
Setup git repo...

> Task :paper-server:setupMacheSources
Copy initial sources...
Setup git repo...
Applying mache patches...

> Task :paper-server:applyResourcePatches
Applied 6 patches

> Task :paper-server:setupMacheSources
Applied 74 mache patches
Applying access transformers...

> Task :paper-server:applySourcePatches
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java.patch
[WARN] Missing patch target for net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch

> Task :paper-server:applySourcePatches FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper-server:applySourcePatches'.
> java.lang.Exception: Failed to apply 0/2961 hunks

* 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 5m 11s
17 actionable tasks: 17 executed
Configuration cache entry stored.```
#

It did not work.

brave widgetBOT
tired wharf
#

I did it in the C drive

quaint raven
tired wharf
#

paperweight?

#

I am trying to build paper though

quaint raven
#

Then make sure to use the latest commit

tired wharf
#

I am using ver/1.21.4 branch with the latest commit and everything works fine untill applySourcePatches runs

#

I don't know why...

#

git clone -b ver/1.21.4 https://github.com/PaperMC/Paper.git

#

I ran this command

quaint raven
#

Then try to update paperweight in the build.gradle.kts

tired wharf
#

hm... How do I do that? :)

#

id("io.papermc.paperweight.core") version "2.0.0-beta.14" apply false

quaint raven
#

If that's an issue I don't think you should an old version of paper

tired wharf
#

I am using 1.21.4 version

brave widgetBOT
tired wharf
#

this is the build.gradle.kts

#

from the branch i cloned

young pilot
#

Task :lib:eclipseClasspath
Could not resolve: io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT

BUILD SUCCESSFUL in 3s
3 actionable tasks: 3 executed

https://sourceb.in/1vM8XK6HSa

#

This error keep repeating

#

any solution?

#

Wait, i just needed to update java version

#

i got it

south reef
lament scarab
#

you have "target" inside of your global gitignore file

floral whale
#

I currently use this task to run a testing server, but the console in IntelliJ does not react to inputs. Does anyone know why?

tasks.register<Exec>("runServer") {
    group = "minecraft-server"
    description = "Starts the Minecraft server from the specified jar."

    workingDir = file("server")
    commandLine("java", "-Xmx2G", "-jar", "folia-1.21.4-1.jar", "nogui")
}
#

I can't use the run-paper gradle plugin for this case

lament scarab
#

because you don't have stdin/out

floral whale
#

Didn't know that was a thing, thanks. Is it just this?

    standardInput = System.`in`
    standardOutput = System.out
lament scarab
#

something like yhat, yea

floral whale
#

Aight, tyty

#

How can I make stopping the intellij task stop the server? Or just kill it

fading vapor
#

can't you just write stop?

floral whale
#

Yes, but sometimes I just need to stop it fast, so I use the intellij stop button, as it just kills the server

fathom summit
#

My project reports when I run Gradle applyPatches
Execution failed for task ':Gale:paper:applyServerPatches'.

java.util.zip.ZipException: zip END header not found
Having tried re-running as well as deleting the .gradle file still doesn't solve the problem what do I need to do

#

Tried running offline and still didn't work

lament scarab
#

corrupted jar file or something somewhere, would need to work out what or where it's from and delete it

floral whale
#

Does anyone know why I can't load sourceSets from this project?

tasks.register<Exec>("runServer") {
    group = "minecraft-server"
    description = "Starts the Minecraft server from the specified jar."

    standardInput = System.`in`
    standardOutput = System.out

    dependsOn(project(":DebugAggregatorNew")) // (I also tried without)

    val classpath = project(":DebugAggregatorNew").sourceSets["main"].runtimeClasspath.asPath

    workingDir = file("server")
    commandLine("java", "-Xmx2G", "-cp", classpath, "-jar", "folia-1.21.4-1.jar", "nogui")
}
#

Error: Caused by: org.gradle.api.UnknownDomainObjectException: Extension with name 'sourceSets' does not exist. Currently registered extension names: [ext, versionCatalogs]

#

I do apply the Java gradle plugin in the build.gradle.kts, so I don't understand why it doesn't work

fathom summit
lament scarab
#

No, you'd need to read the logs and see if anything shows up in there

tired wharf
#

But what does it have to do with it?

lament scarab
fading vapor
#

do I need to run reobfJar if I don't use spigot mappings?

lament scarab
#

If you don’t support legacy versions or spigot, then no

fading vapor
#

so what do I run then, I'm going to switch to a plugin loader to avoid shading dependancies and therefore shadowJar won't be required

lament scarab
#

Just build then

fading vapor
#

ic, thank you, this will reduce build times greatly

#

❤️

tired wharf
# lament scarab you have "target" inside of your global gitignore file
build/

# Eclipse stuff
.classpath
.project
.settings/

# VSCode stuff
.vscode/

# netbeans
nbproject/
nbactions.xml

# vim
.*.sw[a-p]

# various other potential build files
bin/
dist/
manifest.mf

# Mac filesystem dust
.DS_Store/
.DS_Store

# intellij
*.iml
*.ipr
*.iws
.idea/
out/

# JetBrains Fleet
.fleet/

# Linux temp files
*~

# other stuff
run/
logs/

!gradle/wrapper/gradle-wrapper.jar

test-plugin.settings.gradle.kts
paper-api-generator.settings.gradle.kts

# Don't track patched vanilla submodules
paper-server/src/minecraft/

this is the .gitignore

#
build/
.idea/
*.iml
*.ipr
*.iws
.vscode/
.DS_Store
Thumbs.db
*.log
*.env
local.properties
out/
.idea/workspace.xml
.idea/usage.statistics.xml
.idea/dictionaries/
.idea/sonarlint/
.idea/shelf/
!.idea/misc.xml
!.idea/modules.xml```
#

This is the global

#

and it still does not work

brave widgetBOT
woeful gate
#

Is there a way of not using org.bukkit package from vaultapi dependency? (gradle). Becase it conflicts with paper api

bronze ember
#

Google "exclude transitive dependency Gradle" or ask copilot, lol

woeful gate
#

thanks

grim mauve
#

What's the task that generates the build.gradle.kts.patch file? For some reason I can't get it to create the patch file

#

I could make a patch file manually (by using diff, which is what I did to update my fork from 1.21.4 to 1.21.5) but I'm pretty sure there's a more straightforward way to create the file

smoky violet
#

read ./gradlew tasks

grim mauve
#

fml it is rebuildPaperSingleFilePatches

smoky violet
#

if paper is your upstream yeah

grim mauve
#

I tried using rebuildPaperFilePatches (which is what I thought would generate the build.gradle.kts.patch) and it didn't work, and none of the other *File* tasks did generate it, but I didn't notice that SingleFile task SCgetoutofmyhead

#

thanks pray_cat

#

(rebuildPaperPatches also regenerates the single file patches, weird that I was almost certain that I did use that task before, but maybe I mistakenly used one of the other rebuild*Patches task, or maybe I ran it and it threw an error because the paper-api and/or the paper-server folders didn't exist/weren't generated properly due to build errors)

smoky violet
#

I would generally advise using the most specific task for what you’re trying to do

frail pelican
#

What is the right way to load sounds from a string (config file) since all methods in Sound for doing that are deprecated?

lament scarab
#

use the registry

tired wharf
smoky violet
#

is there some popular tutorial where it tells people to put random junk in their global gitignore?

#

because personally if I put something in my global gitignore I would remember it when an error looks related

tired wharf
#

Nope... I did it myself... New to .gitignore :(

#

Ill try to delete the whole global and try it

#

I learn coding at home so...

floral whale
#

I'm currently using a workspace structure in IntelliJ and all the projects in it can build succesfully, but the imports from gradle are not loaded by IJ, anyone got an idea why or how to fix it? I've tried invalidating caches and restarting, doesn't fix it

bronze willow
#

reload gradle?

floral whale
#

Doesn't work

proud maple
#

is your IJ up to date

floral whale
#

Yeah, pretty sure this actually happened after updating to latest

#

As it was working in version 24.3 or whatever

#

So might just be an IJ bug

#

Or well it was also working in latest version yesterday (also updated IJ yesterday), but today it doesn't, I assume it's because the caches got invalidated when I opened it again though, and therefore it cannot load it correctly

raven barn
floral whale
#

I can compile the code without issues

raven barn
#

what helps pretty much every time when everything else doesnt work is disabling inspections and reenabling them

#

right click the inspection symbol in the top right and set to none and then back to what you had it at before

floral whale
#

Hmm doesn't seem to solve it for me, I've tried closing the project and starting it multiple times, also disabling and re-enabling the inspection

bronze willow
#

re install intellij

raven barn
#

close the project delete the idea folder and create a new project from source

floral whale
#

For the workspace or the projects in the workspace?

raven barn
#

for the project

#

sometimes intellij also doesnt like 2 similar dependencies of different versions
i see that problem often with people who have... lets say paper 1.21.4 in one module and 1.21.5 in another module
intellij kinda picks on random there i think

#

maybe you have a pretty outdated transient paper or spigot dependency provided by a library

floral whale
#

Hmm yeah I do have some implementations of older versions for NMS support, that might be the issue then

floral whale
#

Seems like this was causing it

idea {
    module {
        sourceDirs.addAll(srcPaths)
    }
}

I use it for debugging to path correctly to breakpoints

frail pelican
#

How to fix this:

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16.
     Required by:
         root 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.10' but:
          - Variant 'javadocElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.10')
          - Variant 'shadowRuntimeElements' 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.10'
          - Variant 'sourcesElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.10')

Build file:

plugins {
    id("java")
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.16"
    id("com.gradleup.shadow") version "8.3.5"
}

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

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

dependencies {
    paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
}
dusk quail
#

update gradle

#

requires atleast 8.12

tired wharf
#

OK... I tried cleaning the gradle cache and it worked... It also had the .gitignore_global problem. Thanks!!!!

fallen edge
rare crypt
#

Hey, does anyone have any idea what could be causing this paperweight error?

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':class-generator'.
> Failed to notify project evaluation listener.
   > Expected configuration ':class-generator:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
   > Expected configuration ':class-generator:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

* 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 35s
echo kilnBOT
rare crypt
smoky violet
#

I'm curious what Gradle version you upgraded from and to, since that error is typically due to outdated paperweight, not Gradle

winter glacier
#

can I only use paperweight without the paper api? I dont want the paperDevBundle, I just want nms, nothing more

bronze ember
#

No

#

If you don't want to use paper, don't use paperweight

winter glacier
#

I just want to modify a bit of the paper-api for my own purposes. Can I build the paperweight plugin etc myself then?

proud maple
#

you can publish your own dev bundle for your fork

winter glacier
proud maple
#

can't find the task for it, someone else will probably know

winter glacier
#

anyone knows this?

main mica
#

you just run the publishing task with -PpublishDevBundle

#

or set that gradle property otherwise

twin mantle
lament scarab
#

See the log file

twin mantle
twin mantle
lament scarab
#

No idea, probs want to check your AV software

lucid mulch
#

you can also try disabling all running gradle daemons

open latch
#

Fast way restart the PC, the other way ToyBox for Windows i think was a thing for check process related to files, not sure if windows has any of them

lucid mulch
#

for me that error appears typically when i run a gradle build stop it and run another and a file is locked

#

try running with --stop

#

i think that was the prop

limpid heart
twin mantle
#

as shadow jar it compiles normally. But using reobfjar doesn't work

limpid heart
#

unrelated but you're using quite an old version of shadow

#

but as mentioned earlier, try restarting your PC

twin mantle
twin mantle
lucid mulch
#

id guess so since it cant find an nms class

lament scarab
#

mojmap jars only run on a mojmap'd server

#

you'd want to reobf for those outdated versions

twin mantle
#

I just wanted to use NMS on paper, but I have no idea what is causing this problem

lament scarab
#

Because you're running on a legacy version that existed before we switched to using mojang mappings by default

#

meaning that every internal class has a different name

#

you would need to use a reobf'd jar for that

tranquil plaza
#

Is there any form of hotreloading during plugin development?

dusk quail
frail pelican
#

Is there a way to globally import paper using the paperweight-userdev plugin for all gradle modules in multi module gradle project?

fading vapor
#

Gradle reccomends convention plugins

#

You "could" use subprojects in the root build file, but it's frowned upon in the gradle docs

frail pelican
#

I have one root build file, and 2 modules

#

both modules need paper

fading vapor
#

@glad mirage firstly remove the compileOnly dependancy for paper, because you already have the dev bundle specified.

#

how are you updating the wrapper?

glad mirage
#

Caused by: java.lang.RuntimeException: io.papermc.paperweight.PaperweightException: Unable to resolve a dev bundle, which is required for paperweight to function.

#

it just seems to not recognise my dev bundle

#

ok i fixed it, i just needed to revert the build.gradle back to default, update gradle, then change it back and compile

frail pelican
#

So I now made this with this convention plugin and it does not find the plugin:

File structure

mclib
├── build.gradle.kts
├── gradle
│   ├── libs.versions.toml
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── LICENSE
├── mclib-core
│   ├── build.gradle.kts
│   └── src
│       └── main
│           └── java
│               └── net
│                   └── chaossquad
│                       └── mclib
│                           └── my code
├── paperweight-conventions
│   ├── build.gradle.kts
│   └── src
│       └── main
│           ├── kotlin
│           │   └── net
│           │       └── chaossquad
│           │           └── conventions
│           │               └── PaperPlugin.kt
│           └── resources
│               └── META-INF
│                   └── gradle-plugins
│                       └── net.chaossquad.conventions.paper-plugin.properties
├── README.md
└── settings.gradle.kts

Files are attached.

Maybe someone can help me.

fading vapor
#

rename paperweight-conventions to buildSrc

#

also you've used the old way to make them, the fastest way is to make a Kotlin Script file that looks identical to an ordinary build file

fading vapor
paper wing
#

Can someone gives me the EcoSkills plugin? I learning English and don’t know it enough.

lament scarab
#

We don't provide support for random software on the internet

#

you would need to compile it yourself or get support from the dev

paper wing
#

No. I mean “give me the file which has EcoSkills, please”. And I really bad understand some pieces in English speech

lament scarab
#

No

paper wing
#

Okay, I tryed.

glass venture
#

Hello, when I try to include paperweight for my Minecraft 1.21.4 plugin, gradle says this

Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16.

I followed all the instructions on the website, I added the pluginManagement into settings.gradle.kts like this

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

My build.gradle.kts:

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

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

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

dependencies {
    // compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
    compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.11")
    paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
}

tasks.compileJava {
    options.release = 21
}

How do I fix it?

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.

fading vapor
#

what does ./gradlew --version return?

#

Also, this issue could be caused by network problems

glass venture
# fading vapor what does `./gradlew --version` return?
------------------------------------------------------------
Gradle 8.10
------------------------------------------------------------

Build time:    2024-08-14 11:07:45 UTC
Revision:      fef2edbed8af1022cefaf44d4c0514c5f89d7b78

Kotlin:        1.9.24
Groovy:        3.0.22
Ant:           Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM:  21.0.7 (Arch Linux 21.0.7+6)
Daemon JVM:    /usr/lib/jvm/java-21-openjdk (no JDK specified, using current Java home)
OS:            Linux 6.14.4-arch1-1 amd64
fading vapor
#

update your gradle

bronze ember
glass venture
#

how do I upgrade the gradle wrapper?

fading vapor
#

./gradlew wrapper --gradle-version latest

bronze ember
#

mate thats literally linked in the embed

fading vapor
#

TBH that link isn't really helpful as it is linked to gradle instalation not updating

#

this is a better reference

bronze ember
#

master of embeds, @rapid fractal , pls fix

fading vapor
#

yup

glass venture
#

It now works, thanks!

fading vapor
#

epic gamer moment

rapid fractal
bronze ember
#

Thanks 🙂

mental talon
#

Hi, how do I do compileOnlyApi(paperweight.paperDevBundle(...))? (this is illegal in gradle but I guess this is what I want to do. I want to do this in my "root" project - the project that other projects depend on)

#

I have a big gradle project consisting of many subprojects. The whole project depends on a single version of NMS, not multiple ones. There are more than one projects which depend on NMS (of the same version). What I currently do is adding paperweight plugin to every project that needs NMS, but this results in a problem that duplicate NMS classes/fields/methods present when I ctrl left click to see the usage of a NMS class/method/field.

fading vapor
#

I know enough of paperweight that it SHOULD share the deobfuscated server jar, you cant do compile only because it already does that. I think paperweight should have a clean task? Maybe run those and rebuild the project

crude kernel
#

Having paperweight applied to multiple projects with the same dev bundle doesn't cause IJ to show classes multiple times

fading vapor
#

I dont think thats IJ, because Ctrl + Left click isnt go to definition

crude kernel
#

It is

fading vapor
#

Not on my instance

crude kernel
#

You can ctrl click any symbol and it'll jump to its definition in IJ

static urchin
#

✨ keymaps ✨

bronze ember
#

keymaps, like time zones, dont actually exist

fading vapor
#

Have you ran the clean or clear task?

mental talon
#

it's not a problem until I updated paperweight from 1.x to 2.x

mental talon
#

i have ran the two clean tasks

crude kernel
#

I'm not getting this in my projects where I have PW applied in 3 subprojects, it only shows the files once

fading vapor
#

Maybe invalidate caches in IJ?

static urchin
#

@mental talon see paperweight's addServerDependencyTo property (in the userdev extension)

mental talon
#

invalidating caches in IJ seems not working 😢 I'll try addServerDependencyTo property then

mental talon
#

I tried the addServerDependencyTo property and it seems that there are some new problems:

#

i removed all the paperweight stuff fromwakame-plugin and made it load its NMS dependencies from the line compileOnly(project(":wakame-mixin")).
Specifically, wakame-plugin depends on wakame-mixin which has paperweight plugin configured with the addServerDependencyTo property being:

paperweight {
    addServerDependencyTo.add(project.configurations.compileOnlyApi)
}
#

The solution comes to me is add every missing dependency, which the NMS depends on, to wakame-plugin and other similar project, but ig that's even more mess than duplicate classes 😂

#

oh wait, I think I got it. It's probably the repository settings. My current paper repo setup looks like this:

    maven("https://repo.papermc.io/repository/maven-public/") {
        content {
            includeGroup("com.velocitypowered") // Velocity
            includeGroup("io.papermc.paper") // Paper
            includeGroup("com.mojang") // DFU, brigadier, ...
            includeGroup("net.md-5")
        }
    }
mental talon
#

Problem solved. For the second problem, I fix it by changing the paper repo settings to not filter out the content. And this is my current paperweight extension config (it's in the root project which other projects, which need NMS too, depend on). thank you all!

mellow venture
#

okay it turns out that

  1. nexus grouping snapshot versions into folders is entirely cosmetic and only present in the web UI
  2. reposilite actually was able to resolve it just fine. the issue was that I have a separate reposilite repository called proxy which is used to store all the proxy artifacts, and then the releases repository proxies stuff to proxy. and in the configuration for proxy I had set it to allow artifacts with .zip extensions, but I had not configured this in the settings for releases (oopsies)
shrewd crestBOT
misty current
#

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

#

I keep getting this error and dont know how to fix it

static urchin
#

Generally means you are not up to date on something

misty current
#

im following the tutorial

#

oh ok

#

the latest version i could get working was 1.5.0

static urchin
#

😅

misty current
#

the snapshot versions would not work even with the repo added to plugindepends

static urchin
#

You need gradle 8.12

#

and then yea, whatever the latest 2.0.0 beta is

misty current
#

oh, idea automatically puts 8.10

#

alright ill try both

fading vapor
#

update your wrapper

misty current
#

also 2.0.0-beta.16 isnt on the maven repo, but 2.0.0-SNAPSHOT is. Should I ignore that fact and continue with beta.16?

echo kilnBOT
fading vapor
#

wait wrong embed

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.

misty current
#

updating gradle seemed to fix everything thanks. Ill remember gradle must be absolutely up to date not even a couple versions behind 👍

fading vapor
#

I mean

#

thats good practice, I just update it when stuff stops working

misty current
#

i use the latest version idea gives me as I usually assume thats a good version

#

but that was only 8.10 so

#

live and learn i guess

fading vapor
#

nah IJ sucks at setting versions

#

JavaFX preset is ancient

#

uses dependancy versions from 10+ years ago

misty current
#

i use kotlin so its a different preset i think

#

nonetheless, its working now thanks!

coarse ginkgo
#

does the -server subproject have incremental compilation disabled?

#

I don't see anything with the word 'incremental' in the build scripts but adding a single sout(...) results in an over a minute long compilation

static urchin
#

Gradles incremental compilation is just pretty eh

#

meh

#

And -server holds all of Minecraft server source

#

E.g. if you add the sysout to nms.Level, basically everything that references level in a semi public context or any of those transitive dependencies requires a rebuild

coarse ginkgo
#

doesn't incremental compilation look for changes in signatures and references to those signatures when determiniting what dependencies to recompile?

#

I mean, changing some method's body without changing its signature shouldn't change the ABI?

bronze ember
#

yet

static urchin
#

There is an open grade issue linked somewhere

#

My attempt died at inheritance

coarse ginkgo
#

does it just check if the generated .class files for changed sources are different?

static urchin
#

There is no .class file

#

You are pre compilation

novel knoll
#

IR clueless

static urchin
coarse ginkgo
sly knoll
wary shell
#

Paperweight is for using internals in plugins. Forking Paper is entirely separate. What's your goal?

sly knoll
#

I thought paperweight is the build tools for paper itself?

#

well it depends on the module

#

but paperweight-userdev should be for the plugins, no?

#

if you have a look at the link i sent, its an example on how to make a fork of paper

#

however it doesnt have any docs, saying what to do after youve did all the necessary changes

main mica
#

there aren't really any docs for that stuff

#

the paper contributing.md guide covers some steps though. the tooling works mostly the same for forks. Also, read the gradle task descriptions, they are helpful

wary shell
sly knoll
#

not anything about making a fork

wary shell
#

A fork is just contributions that you don't make PRs for.

sly knoll
#

Yes, its not just that though, Paperweights system allows you to upstream so any patch files you create will not conflict when you update paper

#

i can create the fork easily yes, but i wouldnt be able to stay up to date with paper once ive made my changes without learning paperweights upstream system

main mica
#

its just changing the upstream ref in gradle.properties and then fixing any conflicts that may arise in your patches

sly knoll
#

okay thank you, i just came here to find out if there are any commands to run once all the gradle files are changed

lucid mulch
#

and basically that is the only command i think

#

u have to run

#

but i think that falls under patching so

sly knoll
#

Thanks a bunch man

#

I see he has documented a lot

autumn mauve
#

how to declare the paper dev bundle on gradle groovy?
because paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT") is not recognized and it complains that there is no dev bundle

static urchin
#

share your whole build script

echo kilnBOT
autumn mauve
static urchin
#

If you are using Gradle with the Groovy DSL, you should instead access the fields via static methods like getMOJANG_PRODUCTION().

autumn mauve
#

that indeed fixed it. I missed that in the docs. Thanks

agile mountain
#

heya, last night my IntelliJ stopped recognizing adventure, and I don't know why. a guy said he was having similar issues, and that updating to 1.21.5 fixed it, but i tried it and it's still the same.

it's probably some IntelliJ shenanigans because when I run the jar task or make a server with it, everything works fine, it's just that the editor doesn't recognize the package and tells me i have a billion errors.

interestingly enough, it does recognize one package within net.kyori, which is "examination". i dunno what that is though, as i've never used it

does anyone have any ideas on how i could go about fixing this? showing my build.gradle for reference

static urchin
#

You invalidated caches already?

proud maple
#

is the paper api itself being recognized, up to date intellij & java version?

agile mountain
static urchin
#

This

agile mountain
#

oop

#

alrighty

#

(and i think i'm up to date on both intellij and java)

agile mountain
static urchin
#

for the future, that is general "ah IJ might be fucked" button xD

agile mountain
#

gotcha, will take note c:

hasty sigil
#

Anyone know what this means when attempting to setup the latest dev build paperweight

A problem occurred configuring root project 'ItemSystem'.
> Could not resolve all artifacts 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.8' but:
          - Variant 'javadocElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
          - Variant 'shadowRuntimeElements' 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.8'
          - Variant 'sourcesElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')

* Try:
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.8/userguide/variant_model.html#sub:variant-no-match.
> Review the variant matching algorithm at https://docs.gradle.org/8.8/userguide/variant_attributes.html#sec:abm_algorithm.
> 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.


dusk quail
#

update gradle

echo kilnBOT
dusk quail
#

wrong command

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.

hasty sigil
#

I thought intellij would auto set up the latest

#

like the cli does

dusk quail
#

follow the guide on the first step to update it

bronze ember
#

(the CLI also doesn't auto use latest, it will use whatever defined in the wrapper config)

rare mountain
#

how do I change the output location of the build task?

bronze ember
#

What do you actually wanna do?

#

And have you looked at the run task Gradle plugin to start a test paper server with your plugin?

rare mountain
#

get the build to spit the file directly into my server's plugin folder

rare mountain
bronze ember
#

Fair, create a separate copy task then I guess

#

Google or copilot should be able to help with that

rare mountain
#

also trying to make a batch task to run my start script but

rare mountain
bronze ember
#

If you make your copy task depend on your output of the build task you don't need any batching

static urchin
#

might wanna look at run-task/run-paper if you just wanna spin up a server with your plugin

bronze ember
#

Read up lynx, smh

static urchin
#

Huh?

#

What am I missing

rare mountain
#

yay got the copy task working

rare mountain
static urchin
#

They want to a) copy yo plugins and b) Run start.sh

rare mountain
#

is it some sort of permission problem?

static urchin
#

run-paper would solve both of that? I'm confused

static urchin
#

Ah

rare mountain
#

Ill just use a text script

#

less headache

static urchin
#

Didn't scroll up far enough

rare mountain
#

how do I make this not be stupid

#

and fuck up my command

#

if I close and re open the multi line editor that happens rha

bronze ember
#

Don't crop the screenshot so much, nobody can see what's going on, lol

rare mountain
#

its just this

#

when I collapse it and re open it gets fucked up

rare mountain
#

do I need to elevate permissions or something

#

I

#

may be stupid

#

nevermind

#

forgor to set the working directory

bronze ember
#

Idk, never used that, using that always seems wrong, everything just be done with one Gradle invocation

rare mountain
#

Im just using a compound task for this

#

a how do I make it pop out a cmd window

#

I kinda hate the integrated console ngl

smoky violet
#

@lucid mulch please do not use those PRs as reference in this channel, my comment and the closed status are not because it's something that should be followed

lucid mulch
smoky violet
#

it's counter-productive to the goal of this channel

#

telling someone surface level stuff like 'run this command to do this' without actually explaining anything is going to leave people confused and lead to them asking more xy questions in this channel

#

which wastes everyone's time

sterile hill
#

i need help setting up a fork of AdvancedSlimePaper, i was pretty good at creating patches with the old system and managing all that, but im completely lost after the hard-fork stuff

#

is there a link to documentation somewhere?

#

i have the papermc contributing page up but thats not really for creating a fork

main mica
#

there isn't really much documentation available. The example fork is updated: https://github.com/PaperMC/paperweight-examples and you can also look at existing forks of Paper like Purpur for how they did it. I also highly recommend reading the gradlew tasks descriptions for what each task does

sterile hill
#

btw how did u send that message with no embed

main mica
#

if you put the link inside < > it doesn't embed

sterile hill
#

would i be using fork-of-fork though

#

since advancedslimepaper is a fork of paper

main mica
#

yes

smoky violet
#

the 1.21.5 PR looks semi correct, haven't had time to look closely yet

sterile hill
#

is fork the fork of the fork or is forky the fork of the fork

#

lemme check purpur real quick

smoky violet
#

go by the branch names

#

or in the case of PRs the targeted branch

sterile hill
#

do i need to change paperMavenPublicUrl

#

to whatever is forking paper

verbal holly
#

Hello,is there a valid commit hash for folia 1.19.4
I can’t compile the project for that version without the commit hash but there is no valid one on your website

static urchin
#

this isn't the right channel

verbal holly
static urchin
verbal holly
static urchin
#

Yes

verbal holly
#

I need the reference number thing

static urchin
#

folia literally doesn't have downloadable jars

#

you need to build them yourself

verbal holly
#

I know

static urchin
#

commit hashes are a thing on github 💀

verbal holly
#

But if I want to compile for 1.19.4 I need the ref commit hash

static urchin
#

which is why I linked you the github?

verbal holly
#

I already have looked on there

#

Doesn’t say anything about commit hashes

#

Is it even possible to compile folia for. 1.19.4

static urchin
dusk quail
static urchin
dusk quail
#

idk if i had enough arrows

static urchin
#

yea probably not

verbal holly
#

Respect

#

Let me have a look one sec

verbal holly
#

Lemme show you what I need

dusk quail
#

look at step 2

#

it has the commit has right there where you can copy it

#

and it will copy you the long hash, not the 7 char one

verbal holly
#

Also this is what it should look like

#

group=dev.folia
version=1.19.4-R0.1-SNAPSHOT
mcVersion=1.19.4

paperRef=5a1d354b8cf7c5b406f8f4c2a122d206bc8764c9
paperweight.disableShallowClone=true

org.gradle.caching=true
org.gradle.parallel=true
org.gradle.vfs.watch=false

org.gradle.jvmargs=-Xmx2G

dusk quail
#

i have a feeling you just downloaded the repo and didnt change branch

verbal holly
#

Probably since I have no idea what branch is

dusk quail
#

are you sure you actually need folia for what your doing

verbal holly
#

I saw it has a lot better performance

#

I’m not a coder but I’m learning how to code

dusk quail
#

there is probably a 99% chance folia will not benefit you at all

verbal holly
#

I do want to make a smp which will have maybe 50 players at most

verbal holly
#

But isn’t folia still overall better than normal paper

dusk quail
#

in a lot of cases no, it has much higher base requirements and a lot of plugins dont/wont support it

verbal holly
#

Okay

#

Is there a way to get even more performance from paper server by optimising it without actually taking anything from the game aspect

echo kilnBOT
verbal holly
#

Thank you

#

I’ll check it out

whole glen
#

not exactly build tooling, but how could I make a good ci/cd workflow for a collection of plugins? I want to have for example a "player-leveling-api" plugin and a "player-viewer" plugin, the player-leveling api would need a maven dependency as the player-viewer plugin will depend on it and its relevant methods
I want to work out how I should auto publish these things, so each version when idk tagged or something (not used to proper git usage) gets released as a jar and a maven package for just the api. How should I do this? Should I use github or something else? thanks :)

crude kernel
#

github actions is enough

whole glen
#

cool thanks, what would you suggest to do in terms of releasing each version as a dep and a jar? would I just have the actions trigger when a tag is created?

lament scarab
#

Yes

#

iirc you can check the event that caused the workflow to trigger and various other things, generally, google it

opal hatch
#

Hello,
I hope im in the right channel here for this question.

Im updating a fork of papermc and i need to update a build.gradle.kts file.
I have made the necessary changes in the build.gradle.kts file.
Is there a task in paperweight patcher v2 to create the patchfile of this?

#

Thank you! It worked mcheart

smoky violet
#

spoon feeding like this doesn't actually help people

smoky violet
woven light
#

i guess this is where i'd ask this, (didnt think dev support was correct for this), but why do i get errors when generating javadocs for my plugin? (im using 1.21.5 paperweight btw)
https://pastes.dev/vcL2JeGLLo

distant mango
#

what java version

woven light
#

21

#

21.0.2 to be exact

distant mango
#

try updating it

#

iirc there was some bug in an older version of 21?

woven light
#

hmm alr gimme a sec

#

thank you, that fixed it!

subtle jewel
lucid mulch
#

Can you share the logs?

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.

fading vapor
#

what Gradle version?

open latch
#

latest a stable available?

distant mango
#

what

subtle jewel
#

ahhhhh crap

#

just figured it out

#

IntelliJ Gradle sync being fantastic and providing all but the logs I need

#

Dependency resolution is looking for a library compatible with JVM runtime version 8, but 'io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT:20250509.154041-78' is only compatible with JVM runtime version 21 or newer.

OMEGALUL ^ when attempting to build

#

Used gradle init to convert a maven project and it decided to revert target JVM ver to 1.8 NOOOOO

gritty pebble
#

(hoping this is the right channel) Is there a monorepo template for a paper plugin?

smoky violet
#

can you be more specific

gritty pebble
#

I was thinking about figuring out how to set up a monorepo so I can have all the plugins I end up making for a server in a single repo. That way theyre not completely sprawled out everywhere but also not completely mixed in together.

I tried figuring out how to convert to one but while I got close (I think I understand the file structure), I couldnt figure which build.gradle.kts should have what. So I was hoping there was something I could use as a jumping off point.

#

I have a slight feeling that was not what you meant by more specific

smoky violet
#

do these plugins use nms

#

@gritty pebble

gritty pebble
smoky violet
#

there is nothing special really about multi-project builds with regards to paper-api

#

best to reads the docs if you haven't already, even with an example

gritty pebble
#

Oki

gritty pebble
pine blaze
#

Task :jetpacks:paperweightUserdevSetup FAILED

FAILURE: Build failed with an exception. same error, Does anyone know what is wrong with this error? I get this error when compiling the addon.

wary shell
#

and without any logs we can't help you

echo kilnBOT
brave widgetBOT
crude kernel
#

a gradle log

#

not whatever that is

pine blaze
crude kernel
#

I have no idea what I'm looking at

#

and that does not include any gradle error so

pine blaze
#

C:\Users\User\.gradle\caches\paperweight-userdev\v2\work\applyDevBundlePatches_b2ae41fbc00d3a350657c7f9d96507e0546eb31bb2df76ae6d1c07dc2f669421\output.log

#

I send error in this directory

crude kernel
#

we need the gradle error

pine blaze
crude kernel
#

the error from the gradle command

#

the console error

pine blaze
brave widgetBOT
pine blaze
#

This?

#

I'm not at home right now so I'm looking through old conversations.

#

Are u here?@crude kernel

static urchin
#

@pine blaze the error generally implies you are running paperweight with the wrong java version

#

do you have the build.gradle.kts somewhere

pine blaze
#

I understand, so what should be the java version? For versions 1.21.4 etc.?

static urchin
#

1.21.4 requires java 21

pine blaze
#

But i dont know

#

I was compiling an addon for a plugin. Would it be a problem if I gave a name?

static urchin
#

are you configuring the java version via a gradle toolchain?

#

the more info the better 😅

pine blaze
static urchin
#

Do you have a link to said addon?

pine blaze
#

Nova better than ia

static urchin
#

e.g. its github

pine blaze
static urchin
pine blaze
static urchin
#

mhm, okay it does not specify out the java version

pine blaze
#

This is the addon I'm trying to compile

static urchin
#

can you compile with the --info flag and paste the output

echo kilnBOT
static urchin
#

just so we can make sure it is picking your java 21 install

pine blaze
brave widgetBOT
brave widgetBOT
pine blaze
#

I'm not at home right now so I have these logs from yesterday

static urchin
#

Then write here again when you are home 👍

pine blaze
static urchin
#

As stated, I suspect it to be using a wrong java version. If you cannot provide more details because you are not home, there is nothing I can do

pine blaze
static urchin
pine blaze
static urchin
#

that is with the --info flag?

pine blaze
#

oooo sorry

static urchin
#

also

#

please paste to a paste service

echo kilnBOT
pine blaze
#

ok

static urchin
#

hmm

#

can you run gradlew --version

pine blaze
#

okey

#

is here

static urchin
#

upsidedown_cry Yea I guess it is using the right java version

pine blaze
#

🙂

static urchin
#

Are you like just building it or do you have any local changes

pine blaze
#

How so? I don't understand 😦

static urchin
#

like, did you modify the repo at all?

pine blaze
#

im using this prompt: gradlew addonjar --warning-mode all or gradlew addonjar

pine blaze
static urchin
#

Yea that is the build command, I mean did you e.g. change any version string or something in the build files

#

okay

#

lemme look through the repo again then

pine blaze
#

I didn't make any changes anywhere, it compiled directly

#

I'm bothering you too, please forgive me

#

I hope the errors will go away

static urchin
#

give me a bit, I'll try to build locally. Just need to setup my VM, has been a bit

pine blaze
#

Thank you so much for your help. This is an addon that will save my life.

whole vessel
#

i tried doing the thing so i can change the patch files but i get that error

slim mauve
#

I think that means it ran out of memory?

gentle viper
lament scarab
#

Think that somebody posted a bunch of stuff in the discord announcement somewhere

lucid mulch
#

nah from what i remember it wasn't ever done

#

and all we got was the example repo update (without docs)

#

only pr stuff was announced and documented

#

sadly

peak yew
#

hi, trying to update our forky to post-hard-fork, and i'm having a little trouble

so far i've:

that error makes sense, pufferfish-server doesn't exist; pufferfish-api & paper-api however do

did i maybe miss something in the setup process?

lucid mulch
#

you don't do it via commits and rebuildAllPatches

peak yew
#

so i should: applyAllPatches -> make changes -> git add/commit -> fixupMinecraftSourcePatches -> rebuildAllPatches ?

lucid mulch
#

no

peak yew
#

not sure i fully understand you then 😅

lucid mulch
#

the correct order would be: applyAllPatches -> make changes -> ./gradlew rebuild(upstream)SingleFilePatches as build.gradle.kts patches count as a separate thing, they don't count as minecraft nor any other sources

#

you don't need to commit anything since the tasks takes care of that, just change and rebuild

peak yew
#

that did it, and i got upstream-server back as well, thanks :)

grim moss
#

I need help with paperweight. Gradle can't find versions 2.0.0-beta.* at all, but with other versions paperweight.paperDevBundle gives an error: Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file. In the documentation it is also said about reflection, but I can't find a way to use it.

dusk quail
#

is your gradle updated and what exact version are you using

grim moss
#

------------------------------------------------------------
Gradle 8.13
------------------------------------------------------------

Build time:    2025-03-01 10:10:50 UTC
Revision:      <unknown>

Kotlin:        2.0.21
Groovy:        3.0.22
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  1.8.0_452 (Arch Linux 25.452-b09)
Daemon JVM:    /lib/jvm/java-21-openjdk (from org.gradle.java.home)
OS:            Linux 6.14.5-arch1-1 amd64```
dusk quail
#

if your using gradle through intellij to reload check the wrapper version aswell (./gradlew)

grim moss
#

------------------------------------------------------------
Gradle 8.8
------------------------------------------------------------

Build time:   2024-05-31 21:46:56 UTC
Revision:     4bd1b3d3fc3f31db5a26eecb416a165b8cc36082

Kotlin:       1.9.22
Groovy:       3.0.21
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          1.8.0_452 (Arch Linux 25.452-b09)
OS:           Linux 6.14.5-arch1-1 amd64```
#

I am thankful to you for trying to help me, but if you can't maybe tell me how to use reflection to access nms (if I understand it correctly)

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.

crude kernel
#

first link

grim moss
#

thank you, but did you mean first link in the title or in the body. I have updated gradle that the wrapper uses and nothing has changed: ```$ ./gradlew --version


Gradle 8.13

Build time: 2025-02-25 09:22:14 UTC
Revision: 073314332697ba45c16c0a0ce1891fa6794179ff

Kotlin: 2.0.21
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 1.8.0_452 (Arch Linux 25.452-b09)
Daemon JVM: /lib/jvm/java-21-openjdk (from org.gradle.java.home)
OS: Linux 6.14.5-arch1-1 amd64```

dusk quail
#

update paperweight to 2.0.0-beta.16 now

grim moss
#

well, a different error, I will try to resolve it, thank you

dusk quail
#

if its a gradle error send it here and we can help with that

grim moss
#

wow, yes, it is confusing

#
Error resolving plugin [id: 'org.jetbrains.kotlin.jvm', version: '2.1.0']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with a different version (2.1.20).``` but I have ```kotlin("jvm") version "2.1.20"```
dusk quail
#

if your in a module/define it in another module remove the version

grim moss
#

sorry, I don't know what that means

dusk quail
#

how many build.gradle.kts's do you have inside of your project

#

they may be inside other folders

grim moss
#
./build.gradle.kts
./app/build.gradle.kts```
#

do I remove the file in the app directory?

dusk quail
#

inside ./build.gradle.kts set the kotlin version to 2.1.20 and remove the version in ./app/build.gradle.kts

grim moss
#

this line in ./app/build.gradle.kts ? testing { suites { // Configure the built-in test suite val test by getting(JvmTestSuite::class) { // Use Kotlin Test test framework --> useKotlinTest("2.1.20") } } }

dusk quail
#

the plugin definition, should be at the top

#

ex in the paste you sent its like 2

grim moss
grim moss
#

As I see this problem is probably specific to my machine, I will have to try using a container. I am still thankful for your attempts to help me. But because I have not succeeded in fixing the problem could you give me some resources to read about reflection? It is is mentioned in the papermc docs but I still can't figure out how to use it

grim moss
#

I have managed to resolve the issue by changing ./gradle/libs.versions.toml

iron slate
#

is there a simple way to convert old patches/server/<>.patch patches to the new v2 fork methodology?

iron slate
#

or any form of documentation?

lament scarab
#

Basically, no; a lot of the formatting changed anyways, plus the new layout, etc

#

There might have been some advice posted somewhere, forget where

tiny aspen
#

with paperweight userdev is the "reobf" parameter still needed when importing a module?

dusk quail
#

On modern versions no, if it's older or you want to support spigot you would still need it

tiny aspen
#

nice thanks!

gilded crow
#

how can I make a plugin

static kernel
#
> Failed to notify project evaluation listener.
   > Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains no files.
   > 'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'
#
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd

------------------------------------------------------------
Gradle 8.13
------------------------------------------------------------

Build time:    2025-02-25 09:22:14 UTC
Revision:      073314332697ba45c16c0a0ce1891fa6794179ff

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.4 (JetBrains s.r.o. 21.0.4+1-nixos)
Daemon JVM:    /nix/store/z0r8drwvlakmf9s7h84igf48jm95bbcg-jetbrains-jdk-jcef-21.0.4-b598.4/lib/openjdk (no JDK specified, using current Java home)
OS:            Linux 6.14.4-cachyos amd64
#

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

#

afaik this is all up to date

static kernel
#

apparently i needed to drop intellij caches

#

💔

#

spent like 3 hours pulling my hair out

obtuse mural
#

How do I shade in the not obfuscated jar from a module using paperweight?
ex implementation(project(":plugin", "reobfJar")) is what I used previously (before paper switched to mojang mapping), but now, even if I change it back to implementation(project(":plugin")), remove any dependsOn on reobfJar, and add in the mojang mappings line, my final jar is still shading in the plugin-reobf.jar rather than the plugin.jar

How can I tell gradle to use the plugin.jar?? (I tried to replace the reobfJar in the implementation to like build, jar, etc but they all give an error)

lament scarab
#

That would generally imply that you did something like renamed jar outputs in your build config

#

The default configuration won’t be relocated

iron slate
#

trying to add a mojmap paperclip publication to fork-server build.kts, but it keeps running the custom generate maven pom code for the dev bundle making it an invalid pom, anyway to filter that out for only dev bundle?

#

the POM it generates is

#

ahh got it, just needed to add if (this.name == "generatePomFileForDevBundlePublication") to the pom configure part

obtuse mural
# lament scarab That would generally imply that you did something like renamed jar outputs in yo...

wdym by this? I don't think I have anything like that? But I'm not really sure what you mean
and also, is the reobfJar task supposed to run at all? since if it doesn't run (although for some reason a part of my code is resulting in it running - which I'm looking into), then obviously nothing would get obfuscated and it'd have mojang mappings
but then the paperweight plugin would be useless... right?

lament scarab
#

The reobfJar task won’t run unless something makes it run

#

Paperweight is still also there to setup the user dev environment even if you no longer need it to reobfuscate the output

lament scarab
#

And I mean doing stuff that changes the file names of tasks, that commonly causes issues because people override and replace other files which creates issues

obtuse mural
terse bobcat
#
A problem occurred configuring root project 'origins-rebirth'.
> Failed to notify project evaluation listener.
   > Failed to create service 'paperweight-userdev:setupService:070baa257446feaa2bbbc3d899984e25a51156c41980c17a527472280ed7fb72'.
      > Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
         > The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.
> There is 1 more failure with an identical cause.```
randomly started getting this today. my build.gradle.kts:
echo kilnBOT
terse bobcat
#

nvm just updated to beta.17

chrome ridge
#

PS C:\Users\tomboy\IdeaProjects\bromine> gradle build
<=------------> 7% EXECUTING [36s]
:compileJava > Resolve dependencies of :compileClasspath > maven-metadata.xml

stuck and error

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT.
     Required by:
         root project : > io.papermc.paper:dev-bundle:1.21.5-R0.1-SNAPSHOT:20250520.004800-87
> Could not resolve io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT.
> Unable to load Maven meta-data from https://repo.papermc.io/repository/maven-public/io/papermc/paper/paper-api/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml.
> Could not GET 'https://repo.papermc.io/repository/maven-public/io/papermc/paper/paper-api/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml'.
> Read timed out

paperweight userdev beta 17

lament stirrup
chrome ridge
lament stirrup
#

what

knotty iris
#

Fixing "Paperweight data version" Build Error (What Worked for Me)

I ran into this error while trying to build my Paper plugin:

> Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
> The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.

After a lot of messing around, here’s what finally worked for me (there’s probably a better way, but this is what got me unstuck):

1. Update Paperweight in build.gradle.kts

Change your plugins section to use the latest beta:

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

2. Manually Bump the Gradle Wrapper

The new Paperweight needs at least Gradle 8.14, but I couldn’t upgrade Gradle from the terminal because the build kept failing because it couldn't build that version of Paperweight. So it I was stuck in a constant loop 🤦‍♂️

So, I edited the wrapper manually:

# Open the terminal in IntelliJ (bottom left)
nano gradle/wrapper/gradle-wrapper.properties

Find and change this line:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip```
**to**

```yml
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip```

Press `Ctrl+X` to exit, and save when prompted.


## 3. Restart IntelliJ

I had to fully restart IntelliJ before the build would actually pick up the changes. You may not have to though.


## 4. Build Again

After all that, I was finally able to build my plugin.


### Hope this helps someone else!

Again, there might be a better or more “correct” way, but this is what worked for me!
distant mango
lament stirrup
distant mango
#

which is what their message also says

knotty iris
#

I wish it worked for me. But I had to fight with it

lament stirrup
distant mango
#

yes..

glacial gyro
#

💔 🥀 🥀

north cloud
kindred geyser
#

Are there still issues with paper repos? I'm trying to build a plugin I just built yesterday and it's giving me The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.

novel knoll
#

update paperweight

#

beta 17

kindred geyser
#

thanks, I'll try

#

I was searching in paper-dev, sorry for the duplicate

shrewd crestBOT
undone bridge
#

who have maven

distant mango
#

what

foggy heart
#

I have a gradle project with plugin and tests modules
Both are paper plugins, and tests shades plugin inside

I also have run-paper applied to tests
For some reason after updating the userdev to beta 17, trying to run tests:runServer runs a server with plugin's plugin instead of tests' one. Any clues?

foggy heart
#

Seems like it correctly runs tests plugin, but uses the plugin's paper-plugin.yml instead of the tests' one 🤔
I've bumped the shade plugin from beta4 to beta13 alongside userdev, reverting that fixes my issue

Weird thing is, upon manual build (tests:build) the artifacts contain the correct data, not sure why run-server doesn't
(for context, I also use net.minecrell.plugin-yml.paper for yml generation, which makes it harder to debug)

woven light
#

why am i getting this error (it was working completely fine, suddenly this happened):

> Failed to notify project evaluation listener.
> Failed to create service 'paperweight-userdev:setupService:5a4c01a4ad8a9c227c7529e6298abcab6aa63f603153ced7e5704b4a285239c3'.
> Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
> The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.
> There is 1 more failure with an identical cause.
echo kilnBOT
woven light
#

didnt know there was a new version of paperweight, thanks

agile seal
#

Has anyone worked with FoliaLib? Why does the error occur?

main mica
#

its not shaded

agile seal
#

What is this?

main mica
#

just as with any other dependency, you either need to shade it into your plugin or provide it at runtime some other way (library loader)

glass sable
#

(and "shading" refers to copying the content of a dependency's jar into your built jar)

agile seal
#

it's already laid out

main mica
#

I would try it without that minimize

lament scarab
#

I mean, the fact that it's not been relocated means that you're probavly using the wrong jar

agile seal
#

thanks

safe tendon
#
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17.
     Required by:
         project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.17
> No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17 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.8' but:
          - Variant 'javadocElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
          - Variant 'shadowRuntimeElements' 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.14' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.8'
          - Variant 'sourcesElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')

* Try:
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.8/userguide/variant_model.html#sub:variant-no-match.
> Review the variant matching algorithm at https://docs.gradle.org/8.8/userguide/variant_attributes.html#sec:abm_algorithm.
> 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.  ```
echo kilnBOT
safe tendon
bronze ember
#

you didnt do the first two steps

#

or well, the first

safe tendon
#

gradle --version


Gradle 8.14

Kotlin: 2.0.21
Groovy: 3.0.24
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 23.0.2 (Homebrew 23.0.2)
Daemon JVM: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home (no JDK specified, using current Java home)
OS: Mac OS X 15.4.1 aarch64

#

my gradle is latest version

bronze ember
#

that log is showing 8.8

#

do ./gradlew --version to see

lament scarab
#

system gradle is good for running gradle init, outside of that, do not touch it

bronze ember
#

gradle is a bit stupid, every project ships its own install, the wrapper, which you need to update

safe tendon
#

lol ok thank you i have to update it own it's work!

drowsy raptor
#

TIL that it takes 3 forks of Paper to cause createMojmapPaperclipJar to end up with OOM no matter how much memory you give gradle. At least beginning with paperweight 2.x beta 17 and gradle 8.14

bronze ember
#

What exactly OOMs?

#

We fork the jvm in some cases, so that ignores the Gradle settings

#

@drowsy raptor

drowsy raptor
bronze ember
drowsy raptor
#

Ended up fixing it by adding this to the server's build.gradle.kts

tasks.withType<JavaCompile>().configureEach {
    options.isFork = true
    options.forkOptions.memoryMaximumSize = "4g"
}
``` Guess it was the only way to force it to use what I had already set in `gradle.properties`
tranquil raven
#

Hi i'm trying to build a public plugin with userdev : https://github.com/BG-Software-LLC/SuperiorSkyblock2.git
I get this error
The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.

GitHub

Optimized, feature packed Skyblock core. Contribute to BG-Software-LLC/SuperiorSkyblock2 development by creating an account on GitHub.

#

wdym by bump your userdev? @shut sun

echo kilnBOT
lament scarab
#

update it

tranquil raven
#

Inside the sources ?

#

Or you mean inside my .m2 maven?

distant mango
#

no

tranquil raven
#

Should i remove old one or does it do it automatically?

novel knoll
#

update the userdev version in your build script

#

beta 17

tranquil raven
#

Is there any way to rollback my userdev install to match my repo install?

#

I tried checking out the right tag and publishing but didn't work

novel knoll
#

what

#

just change the version of the userdev plugin in the gradle build script

shut sun
#

dont overcomplicate things haha

#

just open up your build script and make the number bigger

cyan fox
#

hello

#

I want to bring folia down, but I don't know what to choose. Can you help me?

#

And what's the difference anyway?

brisk belfry
#

Generally, you should know how to do it. If you don’t know how to do it you are probably not the right target audience for folia.

brave folio
#

foliaDevBundle 1.21.5 not available?

bronze ember
#

Folia 1.21.5 isn't available, lol

proud maple
#

the 1.21.5 branch was pushed 2 days ago

worn ether
#

Good evening, I'm creating an extension for the Typewriter plugin.
The extension allows you to paste schematics from FastAsyncWorldEdit using packets (via the player#sendMultiBlockChange method).

I'd like to improve the extension by enabling schematics to be pasted using blockstates and tilesentities, which is not currently the case as the method used only supports blockdata.
To do this, I'm going to use the paperweight plugin
However, I haven't the faintest idea how to do this, so if anyone can help me out, thank you in advance!

echo kilnBOT
frail pelican
#

Is there any way to get a version string like this 1.21.1-R0.1-SNAPSHOT from gradle during build process?

#

It needs to be the exact same as Bukkit.getBukkitVersion() or Bukkit.getMinecraftVersion() returns

frail pelican
#

so that the plugin can check if the correct version is used

#

I just want to give the user a warning that nms stuff might not work when using a different version, and I don't want to update that value manually anymore

idle wave
#

Heeeeey everyone, here with another userdev problem. Looks like the same problem everyone else is having except I can't find a solution that actually works. What I'm understanding from the Gradle update page is that I should run ./gradlew wrapper --gradle-version latest to update the wrapper but that fails with the exact same error as no arguments. Nothing says what to do if that command fails. If that's not how you update then I can't find the actual way.
https://pastes.dev/4V5ZRouRcZ

dusk quail
#

Use an explicit version, currently 8.14.1

idle wave
#

Was the .1 at the end necessary for it to work? Cause I did also try it explicitly but not with the .1

#

Ok... so, I found a way to get it working. In [Project Root]/gradle/wrapper/gradle-wrapper.properties I changed the 8.8 in distributionUrl to 8.14. Then I used the Gradle Sync button and it worked. I did get a couple "resource configuration warning"s but I'm not sure if those are going to be an issue or not yet.

opal hatch
#

Hello everyone, I have a strange problem.

I have a fork and a fork of this fork (forky).

When I build the fork on Windows, all patches are applied.
If I build the fork on Linux, all patches are applied.

When I build the forky on Windows, all patches are applied.
Now I have noticed that the patches from the forky are not present when it is built via the CI/CD.
So I built it again locally on a Linux machine and the patches of the forky were not there (fork patches are present).

Can anyone explain the problem?
I'm a bit limited in information due to an NDA, but I'll try to answer questions as best I can.
Patcher 2.0.0-beta.16
mc version 1.21.5
The problem was also present with (But it was not noticed):
Patcher 2.0.0-beta.14
mc version 1.21.4

#

All builds run without errors.
And from the logs it also looks as if the Forky patches are being applied.
CI/CD:

Task :Forky:Forky-Server:applyPaperMinecraftResourcePatches
Applied 6 patches

quaint raven
#

Why do you use applyPaperMinecraftResoucePatches on a subproject and not applyPatches on the root project?

opal hatch
#

I use applyAllPatches and this is the only log, which show any applied patches.

opal hatch
#

Basically, I wouldn't think it's a command error since it runs on windows (and the fork also runs on the same commands)
Commands:
./gradlew clean applyAllPatches
./gradlew --parallel createMojmapPaperclipJar

The we deploy bundler jar.
Our patche are locatated under:
Forky-Server/minecraft-patches/features/
and
Forky-Server/paper-patches/features/

Each folder container 3 patches.

opal hatch
#

I have changed the CI/CD from linux to windows. It works now.
Nevertheless, it's a bit stupid because the CI/CD now takes about 3 times as long as before.

I would like to open a bug report for this. Could someone tell me where I should do this?
Just open an issue at https://github.com/PaperMC/paperweight ?

distant mango
#

it will always take longer on Windows

lament scarab
#

if you can't provide some reproduction on the latest versions of paperweight, there is little we can do to help

opal hatch
#

I got the permission to publish the needed files to recreate the problem (but confidential things like internal URLs are replaced by dummies).
I specifically thought of the CI/CD scripts and build.gradle.kts files.

clear fog
#

Can someone help me with den FoliaDevBundler for 1.21.5?
I am somehow not able to use the paperweight for it ...

> Failed to notify project evaluation listener.
   > Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
      > Could not find dev.folia:dev-bundle:1.21.5-R0.1-SNAPSHOT.
        Searched in the following locations:
          - file:/C:/Users/nikla/.m2/repository/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml
          - file:/C:/Users/nikla/.m2/repository/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/dev-bundle-1.21.5-R0.1-SNAPSHOT.pom
          - https://repo.maven.apache.org/maven2/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml
          - https://repo.maven.apache.org/maven2/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/dev-bundle-1.21.5-R0.1-SNAPSHOT.pom
          - https://repo.dmulloy2.net/repository/public/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml
          - https://repo.dmulloy2.net/repository/public/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/dev-bundle-1.21.5-R0.1-SNAPSHOT.pom
          - https://repo.papermc.io/repository/maven-public/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/maven-metadata.xml
          - https://repo.papermc.io/repository/maven-public/dev/folia/dev-bundle/1.21.5-R0.1-SNAPSHOT/dev-bundle-1.21.5-R0.1-SNAPSHOT.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
lucid mulch
#

use 1.21.4 or paper 1.21.5 if you need 1.21.5 badly for now

clear fog
#

no then its alright, i was just concerned that i am the issue again xD

lucid mulch
#

is there any reason the vfs watch is disabled in gradle? for paperweight

#

does it cause some issues or cuz windows

#

hmm the only issue with windows ive found is ReFS drives

#

but they are also only used in windows server and if you use them expliclitly

#

it might be good to enable it by default

lucid mulch
#

does the new paperweight beta not work with git file patches?

#

i remember it working when updating my fork to 1.21.5

#

it rebuilds paper-server file patches just fine

#

but it fails with minecraft source and paper minecraft resource patches it seems

#

idk even know why it tries to rebuild paper minecraft resource patches

#

now that i look its apply patches that failed when i ran rebuild..

#

can someone help me lol

#

am i doing this wrong i mightve forgotten how to do it

main mica
#

that error isn't saying much.
But you probably just have conflicts somewhere

broken wolf
#

Can someone guide me into the right direction on how to add paperweight.userdev? Currently getting this error

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17.
     Required by:
         project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.17
      > No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17 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.8' but:
          - Variant 'javadocElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
          - Variant 'shadowRuntimeElements' 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.14' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.8'
          - Variant 'sourcesElements' 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 elements (required them packaged as a jar)
                  - Doesn't say anything about its target Java version (required compatibility with Java 21)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
main mica
#

update gradle

#

you are on 8.8, userdev requires 8.12 at least iirc. latest is 8.14

broken wolf
#

So downgrade to 8.14?

lament scarab
#

upgrade to 8.14

echo kilnBOT
broken wolf
#

oh ok, I assumed 8.8 was higher because well 8.8 > 8.1 lol

lament scarab
#

[a].[b]

lucid mulch
#

on applying paper resource files xD

#

by git file patches i mean enabling the option in the -server build grafle

lament scarab
#

I mean, it's a corrupt patch, guess is to make sure you didn't modify a patch file manually

lucid mulch
#

to generste normal git patches instead of file

lucid mulch
#

i didnt even touch it

#

its a paper patch

broken wolf
#

Thank you SnifferSniff and electroniccat

lucid mulch
#

maybe i tried doing that weong

#

what woukd be the correct way to turn the file oatches into nnirnal git

lament scarab
#

I mean, is the folder in a sane state?

#

Like, git screamed that it couldn't reach a patch file for some reason, you're gonna have to work out why

#

Welcome to the joys of server development

lucid mulch
#

i can send the link to the repo

#

im curious why it worked before and now it doesnt

#

maybe something with wsl

#

ill try to debug it more later when i get home

lament scarab
#

I can't really aid with debugging issues with building random repos

lucid mulch
#

well its my repo

broken wolf
lament scarab
#

I mean, you are a random person to me; I did decided to be nice and clone it locally and applyAllPatches works fine here

lucid mulch
#

thats whats causing the problems for me

#

appreciate u cloning tho

lament scarab
#

compare to the paperweight repo I guess, it works fine here and that is basically the 'supported' setup

lucid mulch
#

I figured it out

#

turns out you have to exclude executing the apply patches from rebuild patches

#

because it applies them for whatever reason

#

./gradlew rebuildAllServerPatches -x pufferfish-server:applyPaperMinecraftResourcePatches -x pufferfish-server:applyPaperMinecraftSourcePatches so like this

#

should it be this way?..

main mica
#

that usually shouldn't be needed

lucid mulch
#

turns out it is needed when converting file patches to git patches for whatever reason

#

seems like a bug

#

especially since when excluding those apply tasks it converts them properly

#

I created an issue for this on the paperweight repo

vapid helm
#

paper userdev plugin:

./gradlew shadowJar

A problem occurred configuring project ':v1_21_R4'.
> Failed to create service 'paperweight-userdev:setupService:c9361bfd8dd46599b760852d5d161e6d6288e9f860f731b8285231f2b1f20cf9'.
   > Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
      > The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.

build.gradle of submodule v1_21_R4:

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

dependencies {
    compileOnly project(':Core')

    paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
}```

What doe this error mean? It used to work before, haven't touched the build.gradle. Thanks.
fading vapor
vapid helm
#

@fading vapor setting it to beta 17 doesnt help

#

it used to work before with beta 16

echo kilnBOT
vapid helm
#

beta 17 gives me another error

autumn inlet
#

I'm trying to patch the build.gradle.kts in my Paper fork, how exactly do I do that? Because no matter what I do, I can't get it to modify the existing patch file

static urchin
#

read the gradlew tasks output

static urchin
vapid helm
#

yeah updating gradle + userdev did the trick. However, it used to work before.. weird

autumn inlet
#

ty!

safe ginkgo
#

Hi, sorry i dont really know where to ask this but i always get this error

Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17.

build.gradle.kts

    `java-library`
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
}

settings.gradle.kts

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

lucid mulch
echo kilnBOT
safe ginkgo
smoky violet
lucid mulch
peak dirge
#

hi, i am having mild issues with userdev, and i keep getting this error when i try to sync the build.gradle.kts:

Execution failed for task ':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 10s
1 actionable task: 1 executed

afaik, i did everything thats on the website and i am running gradle 8.14.1 and im using paperweight userdev 2.0.0-beta.17.
i also have maven("https://repo.papermc.io/repository/maven-public/") in my repositories and paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT") in my dependencies, as well as the pluginManagement thing in my settings.gradle.kts, but it seems like no matter what i do, im keep getting this specific error and idrk what to do anymore ;-;

lucid mulch
#

its typical for this issue to occur with java > 21 or early builds of java 21

#

update your jdk to either newer version of 21 or a higher jdk version altogether

peak dirge
vapid helm
#

what are the minimal hardware requirements for the user dev plugin? It frequently fails to build on my tiny vps :(

glass warren
#

If it's failing that likely isn't a hardware thing. It should just take longer on slower hardware.

vapid helm
#

it lags my server and then just dies

#

I've created a swap partition, maybe this solves the problem.. It seems to be hungry for ram

glass warren
#

Someone else would know better than me.

smoky violet
#

decompile needs 4 gigs of memory on it's own

vapid helm
#

4 gigs? okay that explains it then

smoky violet
#

I wouldn't try it on a PC with less than 8 gigs (which most chromebooks from the last 3 years should have)

vapid helm
#

i have a jenkins where i build all my jars, its a small vps

smoky violet
#

for CI use it shouldn't be decompiling at all

#

should take like 5 seconds and require practically no extra memory on top of base gradle

#

make sure the CI env var is true

vapid helm
#

how do i make it not do decompile stuff?

#

ahh