#build-tooling-help

1 messages · Page 23 of 1

vapid helm
#

now it worked, ty

round needle
#

Trying to update my paperweight version and I keep getting this error in gradle
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

Can send my full build.gradle if needed

echo kilnBOT
naive cedar
#

is there a guide anywhere on how to migrate a fork buildscript to the new 2.0 version?

lucid mulch
#

well you have the example repo

#

use that

#

@naive cedar

naive cedar
#

uhh

#

what does this repo have to do with my question

lucid mulch
#

so you can migrate

#

look at the commit history if you need to there its shown how the build script changed

naive cedar
lucid mulch
#

OH A FORK i read as plugin lmao

#

then look at paperweight examples

#

repo

#

on github

#

same thing

naive cedar
#

i did check it out, yeah, problem is that i'm trying to fork folia ("fork of a fork") rather than base paper

#

this was relatively easy in the older version, here it seems to be quite a bit more involved and honestly i've made it this far off of educated guesses

lucid mulch
#

look at it

naive cedar
#

missed that, thanks

gentle viper
#

So are forks on their own when it comes to migrating to the new patch structure etc? Does anyone have any advice, i’m terrible at this

mellow venture
#

hey, when using paperweight we like to pin it to a specific version rather than using -SNAPSHOT which can change over time

however, this has been causing issues for us because the paper repos don't seem to retain snapshots indefinitely, so eventually that means that old commits (or even the latat commit if it hasn't been updated recently) can't be built, which is a serious issue for us

is there any way the retention could be changed for the papermc repos to keep snapshots indefinitely?

smoky violet
#

not sure what channel that belongs in but it's not this one

mellow venture
#

it's related to build tooling so I went with here bc I wasn't sure where else
#paper-dev would be my next choice, but it feels even less relevant?

smoky violet
#

no it's not related to build tooling

#

it's related to a service hosted by papermc

gentle viper
lucid mulch
#

and when you get past that its a lot easier than before

#

i can give you some advice

#

that you can try splitting your patches one by one into two patches one that changes vanilla code, second craftbukkit etc and put the vanilla modifying one in the minecraft-patches/features dir and the other sources to the analogical paper-patches/features

#

and enable rejects optionally in the build.gradle.kts

#

theres a chance you wont have to reapply everything manually like this

#

later you can squish all those “feature” patches into file patches if you so wish

#

you add something like this

        patchFile {
            path = "paper-server/build.gradle.kts"
            outputFile = file("fork-server/build.gradle.kts")
            patchFile = file("fork-server/build.gradle.kts.patch")
            rejectsFile = file("fork-server/rejects")
        }
#

to every source set

#

the rejectsFile property

#

this is an example how to add it

#

other than what ive said theres no easier way to migrate nor official docs

#

the rejects are named (patch).rej and they contain hunks that failed to apply so you can apply those manually

#

@gentle viper

#

got kinda lengthy here lol

#

and you can refer to paper’s contributing guide too it also has some useful info you can easily adapt to forks with a bit of knowledge

gentle viper
#

thanks i'll give it a look

gentle viper
#

does https://github.com/PaperMC/paperweight-examples/tree/v2-fork need updating? i find that applying patches will fail on server and api build.gradle.kts

lucid mulch
#

you still use the exact same code as in those patches in your fork

#

with replacing fork in this code to your fork's name

#

ofc

#

look at the 1.21.5 pr

#

it should work

naive cedar
#

how do i alter resources? i made a commit in forky-server/src/minecraft/resources but rebuildAllServerPatches doesn't seem to generate anything

#

is there another task i'm not seeing

bronze ember
#

you need to modify the file patches commit

naive cedar
#

uhm, can you elaborate?

#

probably just another quirk of v2 i don't know anything about

naive cedar
#

ooh i got it

#

okay, sure

#

not a huge fan of this but whatever

#

what's wrong with normal git patches?

#

like what prompted the change

bronze ember
#

we like file patches more for our needs

#

especially since it allows us to work on stuff concurrently while updating

naive cedar
#

meh

#

should be optional i'd say

#

it makes sense for you, but in a private fork with 1 or 2 guys doing everything feature patches are more organized

bronze ember
#

You can do that still, just not for resources

naive cedar
#

would be nice to have for those

#

on an unrelated note

#

am i mistaken in assuming that any code that i put under forky-server/src/main/ will be built into the jar and should be reachable from the NMS code?

#

because it seems to be built into the jar but then at runtime it hits me with a NoClassDef

lucid mulch
#

thats the whole point

#

it’s your fork’s own classes

naive cedar
#

okay well

#

i guessed as much

#

it's building them into the jar, but at runtime it NoClassDefFoundError's them

lament scarab
#

I mean, our tooling is designed for us, idk many platforms that go out of their way to allow forks of their software to have access to our stuff

lucid mulch
lament scarab
#

We'd need to see the full log, NoClassDefFoundError can mean many things

naive cedar
lucid mulch
naive cedar
#

well yeah it's weird

naive cedar
naive cedar
lament scarab
#

They're in seperate folders

naive cedar
#

i'd PR that to you but i don't really do kotlin

lament scarab
#

We're also generally more focused on solving our own issues, one of those being "we cannot see the contents of our patches folder on github"

lucid mulch
naive cedar
naive cedar
#

okay another question

#

i know it's not best practice and all, but does paperweight also allow patching of minecraft's libraries (i.e. netty and so on)?

lament scarab
#

idk if support for forks was implemented but yes

naive cedar
lament scarab
#

yes, you'd use that

naive cedar
#

what'd be the artifactId for a library

lucid mulch
#

i think it was mentioned there at some point

#

yeah it is

#

the authlib is an example for a lib

lucid mulch
#

or 15

naive cedar
#

i was asking how can i guess the artifactId for a library

lucid mulch
#

prob its the name lowercased

#

try all combinations and see

naive cedar
#

i've tried those that made sense to no avail so i turned here

lucid mulch
#

it should be the artifact id like in the maven repo

#

the name

lucid mulch
naive cedar
#

well, my target is netty-transport and i know that one is there

#

none of netty_transport, netty, netty-transport and nettytransport as artifactId did it

lucid mulch
#

oh it might be just minecraft libraries like authlib etc

naive cedar
#

it's fine if it's not possible, just wanted to see if it was pointless to waste more time on this

lucid mulch
#

you can always override the class

naive cedar
#

just place it in my sources and it'll work?

lucid mulch
#

by creating the package and respective class yourself in your fork’s sources dir

lucid mulch
#

src/main

naive cedar
#

janky but i really just need it to debug something so it's fine

#

thank you

echo kilnBOT
lucid mulch
#

i have a question related to reobfPackagesToFix

#

i noticed that all paper etc packages are added there

#

should forks also add their packages into that block?

fading vapor
#

any reason as to why I can't make a JavaDoc but it builds fine?

lucid mulch
#

its a known issue with the early builds

#

update it

fading vapor
#

oh really

#

okay

#

thanks

lucid mulch
#

np

mellow venture
lucid mulch
#

and if they didnt do that for paper/velo then yea

#

they prob wont do it

#

also just imagine the size of the maven repo with paper builds almost daily

#

it would become unmaintainable

lament scarab
#

We already have enough storage issues as-is, it's just not maintainable

#

if you require pinning stuff, I'd suggest using your own repo to mirror

toxic nexus
#

having some trouble using paperweight-userdev

lament scarab
#

update gradle

terse vault
#

Use 8.14.1

echo kilnBOT
toxic nexus
#

i see

#

thank you

dreamy bramble
#

i did transform(ServiceFileTransformer::class.java) too

#

i found the problem, it was because of relocating slf4j

mellow venture
vestal bridge
#

I have a multi-module project and I'm trying to avoid having to copy repositories between modules... I thought I'd use gradle's new(ish) dependencyResolutionManagement in settings.gradle.kts:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        ...
        maven(url = "https://repo.jeff-media.com/public/") // SpigotUpdateChecker
        maven(url = "https://repo.codemc.io/repository/maven-releases/") // PacketEvents
    }
}

But paper's userdev seems to be incompatible with it... So I remove the "strict" line

    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)  // REMOVE THIS

Which skips the error, but unfortunately the repositories block is never set on any project that uses paper's userdev... I'm not sure exactly what is going wrong, but I guess either gradle finds a settings.gradle.kts from the paper userdev, thus ignoring mine? Or maybe userdev is just incompatible with this gradle feature? Any theories would be a major help! Thanks very much.

#

So here is an example of a module using paper's userdev:

plugins {
    `java-library`
    id("io.papermc.paperweight.userdev")
}

dependencies {
    compileOnly(project(":weaponmechanics-core"))

    compileOnly(libs.mechanicsCore)
    compileOnly(libs.adventureApi)
    compileOnly(libs.foliaScheduler)

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

Which will not work, since the repositories for mechanicsCore will not be included... so a fixed version might look like:

plugins {
    `java-library`
    id("io.papermc.paperweight.userdev")
}

repositories {
    maven(url = "url for mechanicsCore")
}

dependencies {
    compileOnly(project(":weaponmechanics-core"))

    compileOnly(libs.mechanicsCore)
    compileOnly(libs.adventureApi)
    compileOnly(libs.foliaScheduler)

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

Which will fix mechanicsCore not being found... but I'm trying to use gradle's new features specifically to avoid this

smoky violet
vestal bridge
#

Thanks for the tip

mellow venture
vestal bridge
#

Was previously using a convention plugin but am trying to simplify my project structure

fleet epoch
#

I understand that you are frustrated, but it is not fair to treat people who are trying to help you like this... try invaliding caches and restart

drifting torrent
#

Hi, trying to understand the new paperweight forky server stuff
https://github.com/PaperMC/paperweight-examples

https://github.com/MineInAbyss/Cartridge
We have a fork to just apply some falldamage changes and other misc stuff
Trying to applly upstream changes is tricky though as im not sure what gradle tasks are needed
Is there any documentation anywhere on how this new system works?
As there is about 200 new gradle tasks im a tad lost lol

currently changing gitRef, ./gradlew rebuildLeafSingleFilePatches, ./gradlew applyAllPatches, ./gradlew rebuildAllServerPatches & ./gradlew createMojmapPaperclipJar
am i missing somehting? as it seems to not correctly apply upstream changes

Thanks prayge

(yes its based on leaf atm just general question how it works)

quaint marlin
#

Hi, I added id("io.papermc.paperweight.userdev") version "2.0.0-beta.17" and paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT") following the docs but I am getting an error: https://pastes.dev/acy33Iu8kN

echo kilnBOT
lucid mulch
#

@quaint marlin ^^

#

you have an outdated ver of gradle that’s for sure

quaint marlin
#

Umm

lucid mulch
#

you have gradle 8.8

#

latest is 8.14.1 iirc

quaint marlin
#

yea

lucid mulch
#

also you need jdk 21

quaint marlin
#

I think I do?

#

yeh

lucid mulch
#

update gradle and if it still is broken then send the build scripts

quaint marlin
#

I thought paperweight might fix this issue I had running the plugin but using the -all jar without paperweight and old gradle version works fine now thonk

#

I guess I should still update Gradle?

lucid mulch
#

if you plan on using userdev then yea

quaint marlin
#

Well I don't even know if I need it now

lucid mulch
#

you should keep gradle up to date always anyway

quaint marlin
#

Yes

#

What was the cmd again?

lucid mulch
#

./gradlew wrapper --gradle-version 8.14.1

#

i think you have to run it twice

#

for it to update both gradle and the wrapper

quaint marlin
#

Umm where do I run it?

lucid mulch
#

in the terminal

#

on windows cmd remove the ./

quaint marlin
#

Just in root directory?

#

bc I get no such file or directory: ./gradlew

lucid mulch
lucid mulch
#

or straight up gradle

#

if you use gradle without the wrapper then look at gradle’s docs on how to update

quaint marlin
#

gradle cmd also doesn't work

lucid mulch
quaint marlin
#

I have gradle-wrapper.properties

lucid mulch
#

i mean the root folder

#

of the project

#

with the build.gradle etc

quaint marlin
#

No gradlew file

lucid mulch
#

then youre either using gradle in itself or your ide to build

#

if youre using an IDE to build look at the settings idk

quaint marlin
#

Uh

lucid mulch
#

i cant help u with that

quaint marlin
#

I used the mc plugin to create the project

#

should be gradle

lucid mulch
#

try updating gradle manually by going into the gradle folder and changing the link in the gradle-wrapper.properties to have 8.14.1 instead of 8.8

#

and running a build after that

quaint marlin
#

Worked!

#

Thanks

sly knoll
#

is anyone able to assist me with this error when trying to apply all patches command

#

ive looked everywhere, tried multiple authentications to setup gitbash/github and ive found nothing

#

I am on a fork of paper, and the repository is private

lucid mulch
#

run with -Dpaperweight.debug=true and --stacktrace

#

@sly knoll ^^

sly knoll
#

gonna run it now

#

my terminal is set to java 8

#

so i think that might be an issue

lucid mulch
#

you need atleast jdk 21

sly knoll
#

intellijs project setup is jdk 21

lucid mulch
#

for paper

sly knoll
#

ah i think i found the error

#

i assume its the file name length

#

in git config

lucid mulch
#

you need to enable long file paths

sly knoll
#

its in git config right

lucid mulch
#

run git config --global core.longpaths=true

#

and also you need to tweak something in the registry

#

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and change/create a dword value LongPathsEnabled and set it to 1

sly knoll
#

thanks a bunch sir

#

ive spent hours looking at tutorials and stuff

lucid mulch
#

or just run on wsl its gonna be a lot faster that way

sly knoll
#

didnt know that debug command existed

#

🫡

#

it seems to be working fine now

safe tendon
#

hello i wan to import NMS

#

do you know why i can't ?

echo kilnBOT
distant mango
#

there’s some unsupported maven plugin somewhere

safe tendon
#

so i have to switch to using gradle?

smoky violet
#

if you want to use an official solution that is officially supported, yes

mellow venture
# lament scarab We already have enough storage issues as-is, it's just not maintainable

actually, I'm curious, how much storage is needed for the repo currently?

bc depending on how much storage is needed, I have a bunch of free storage space on my vps that I'd be willing to donate, idk if that's possible
or maybe if like donating storage directly isn't super feasible there could just be like some automated script that periodically rsyncs any new artifacts over to my server as like a "cold storage" or "archive" type of thing that others could use, idk

or if either of those aren't doable, possibly just donating a monetary amount if it can go to upgrading the storage to allow for storing artifacts for longer possibly indefinitely

(should this conversation maybe move elsewhere?)

bronze ember
#

It's above a TB iirc

#

But the storage itself isn't the main issue. The main issue is what it's on an old server and it being so large that moving is infeasible

#

We proxy a bunch of repos and people use us to grab artifacts from that repo and we store all of that, that def needs to stop. In the future we will only proxy the artifacts we actually use ourselves, the rest will be deleted, that should give us some headroom to look at changing our cleanup policies

mellow venture
#

yeah I was looking through the repo and it looks like you're just proxying maven central?

#

bc I even noticed that some of the libraries I've pushed to central are on it lol

#

for the repos I'm proxying in reposilite, I heavily restrict it to only the relevang group ids, eg. io.papermc for the papermc repo, etc.

bronze ember
#

Well, it's good practice to do that to reduce the load on central

#

Federation and stuff

stuck rivet
#
plugins {
    id 'java'
    id("xyz.jpenilla.run-paper") version "2.3.1"
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"

}

group = 'de.emn4tor'
version = '1.0.0'

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

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

}

tasks {
  runServer {
    // Configure the Minecraft version for our task.
    // This is the only required configuration besides applying the plugin.
    // Your plugin's jar (or shadowJar if present) will be used automatically.
    minecraftVersion("1.21")
  }
}

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

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

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

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

I just copied from the docs, I know those are for kts

#
A problem occurred configuring root project 'WorldGen'.
> 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.


#

ohh

fossil topaz
#

what gradle version are you using?

stuck rivet
#

Outdated gradle ig

#

Tho I just updated it

#

sec

fossil topaz
#

Check your gradle/wrapper/gradle-wrapper.properties

stuck rivet
#

8.8

#

I could swear I updated it just yesterday

fossil topaz
#

update it to 8.14.2

stuck rivet
#

sec

#

Seems to be working, had papermc repo twice...

#

thx, gradle version was the problem

terse vault
#

@amber gulch Check to make sure you're defining it as 21

#

in your gradle configuration

#

Also are you using Gradle 8.14.1

echo kilnBOT
terse vault
#

What's your Gradle version

amber gulch
#

8.14.1

#

I've updated

terse vault
#

And it doesn't work?

amber gulch
#

wait

#

I use Groovy

#

Ok

#

Now works

terse vault
#

Good

fading vapor
quaint marlin
lucid mulch
#

?

glass warren
quaint marlin
glass warren
#

Maybe link to your question and/or re-ask it here?

novel knoll
#

is that the whole build script? it should work fine then

#

actually, 1.21.4 unbreakable was valued and had a factory method, it became non-valued in .5

quaint marlin
novel knoll
#

static method in Unbreakable interface

quaint marlin
#

Could you send an example?

#

nvm

lucid mulch
#

does anyone have any examples of making a general rebuild task for a fork?

#

like creating a task that runs all the rebuild tasks in the root build file

#

i tried one but it complained bout some provided things missing

#

i dont remember what it complained about but something that should had been already set up by applying patches

#

the tasks ordering could be more defined in paperweight as not to cause issues like this and other but ik its not a priority or anything

bronze ember
#

its not really possible, thats why paperweight doesnt provide it

#

whats wrong with just doing changes and then rebuilding depending on where you did changes?

lucid mulch
strong merlin
#

are there any obvious or potential problems from ticking entities before running block events and ticking block entities?

robust olive
#

Guys I have dev bundle 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]'.

echo kilnBOT
robust olive
#

Can I link directly the github repo? Plugin is not mine

lucid mulch
#

update paperweight and it will work

#

you’re outdated

robust olive
lament scarab
#

Because they've got an older version of the userdev bundle

lucid mulch
#

well a new dev bundle main version 7 has been released recently so if youre forking a project then thats why

lament scarab
#

you're building now and it's fetching the latest bundle for that version

#

you'll need to update PW

robust olive
lucid mulch
lament scarab
#

17 works for v7 bundles, yes

#

I mean, the error is pretty clear in what it's saying

lucid mulch
robust olive
lucid mulch
#

with why my plugin doesnt work

lament scarab
#

I mean, I'm not sure adding a "make sure you're on the latest version" will enchance the outcome of missing the basic logical deduction that is expressed within that message

lucid mulch
#

for some people

#

but more so there could be an additional module like loom or whatever they changed to now, with the gradle/java errors

#

cuz the output can get confusing if you have gradle 8.2 for eg

#

and it fails to apply pw

robust olive
lament scarab
#

that's the version of the packaging of the dev bundle

robust olive
#

Ah okk

lament scarab
#

we have not gone back to update the dev bundles to v7

robust olive
#

Now I am afk. Then I send you the error that appear when I change to beta 17

white arrow
#

is there a way to automatically merge in the single file patches? (e.g. when paper changes the build.gradle.kts) All my other patches apply perfectly or allow me to handle the merge with git.
The way I currently do it is to manually copy over changes from the patch file. Is there a better way?

lucid mulch
#

or applying them when there are conflicts

white arrow
lucid mulch
#

to create use ./gradlew rebuildPaperSingleFilePatches (replace paper with your upstream)
to apply fuzzily use ./gradlew applyPaperSingleFilePatchesFuzzy

#

and then rebuild

#

with the first command

#

you can also add the Fuzzy suffix to minecraft source patches applying task on a note and you can modify the fuzz factor too

white arrow
#

thank you

lucid mulch
#

Would the paperweight team be open to implementing a plugin bootstrap like loom had?

#

for better outputs when there is outdated gradle/java

#

instead of the mess saying 8.13 then 8.2 etc

lucid mulch
smoky violet
#

no

robust olive
#

thanks, now seems work

radiant crow
#

I have a multi-module gradle project which I'm trying to migrate from groovy to kotlin script. I got an issue tough that in one submodule I can't semm to be able to load the "common" submodule:

apply(from = rootProject.file("common/build.gradle.kts")

Because I'm using configurations and stuff which are in the subprojects of the main script but as I'm shading and relocating stuff in the common module, which I can't access without the apply part idk what to do other and just load it in myself and not have it be in the common module which seams unreasonable.

Also I'm using gradle.properties files for version stuff which I can't access in the plugins section of the build scripts anymore? And now need to load them in the settings file of the root project? Which also seemed weird but I'm too unfamiliar with gradle to get it to work like I want.
-# I also tried asking o4-mini and gemini-2.5-flash but they are mostly incompetent.

smoky violet
#

your groovy scripts worked originally?

echo kilnBOT
smoky violet
#

send the script where you were doing the apply thing

radiant crow
smoky violet
#

so you had some .gradle file that you applied in multiple projects, but wasn't for a project itself?

radiant crow
smoky violet
#

so you were applying the common module's build script to other projects as well?

#

usually you use dependencies to have projects depend on each other

smoky violet
#

ok yeah that seems a bit cursed, surprised it worked

#

are you using userdev?

radiant crow
radiant crow
smoky violet
#

thats not the correct use of the shadow configuration unless you are overriding the behavior of shadowJar

#

shadow will include the runtime classpath by default, things on shadow will not be included

radiant crow
#

not sure what you mean, I have this though?

tasks.named<ShadowJar>("shadowJar") {
        configurations = listOf(project.configurations.getByName("shadow"))
    }

I tried/thought I could make the configuration so it would just be included, what do you mean by

shadow will include the runtime classpath by default
?

smoky violet
#

I mean what I said, you're overriding it there

#

what is your project structure

radiant crow
#

ah, I'm dumb idk why I did that with groovy then I did it there too

radiant crow
# smoky violet what is your project structure

I have a main/root script with a subprojects section where I define compileTime stuff and the shadow, manifest stuff etc.
and then a common module which is supposed to be included in the two other sub modules wiht it's shaded libs.

smoky violet
#

for plugins the easiest thing is just put things you want shaded on implementation (including your common project in this case) and things you don't want shaded on compileOnly

#

and then you don't need to change configurations for shadowjar, just configure the relocations

#

and then in the common module, use implementation for a lib to be shaded but not on subprojects compile classpath, api for it to be shaded and on the subprojects compile classpath, or compileOnlyApi to put it on subprojects compile classpath but not shaded

#

(again shadowjar just shades the runtimeclasspath by default, so this strategy is just using that fact to minimize extra configuration like includes and excludes)

radiant crow
smoky violet
#

apply java-library instead of java

radiant crow
#

seems to work now, thank you very much!

#

should I also migrate the .properties files to the lib tompl files in .gradle because that seems to be the norm now or what is with that?

smoky violet
#

it has better compatibility with external tools as well in my experience

#

(like, iirc renovate can handle versions in .properties, but dependabot can't, they can both handle the toml though)

radiant crow
#

will keep that in mind, thank you again!

tulip ingot
#

how can I get something I can include for plugins, i.e. either a jar with all the classes, for the dev/1.21.6-dialog branch?

sharp rune
cinder fern
#

When I uncomment lines 13 and 14 from my build.gradle reloading/syncing fails with this error: Unable to resolve a dev bundle, which is required for paperweight to function. Add a dev bundle to the 'paperweightDevelopmentBundle' configuration (the dependencies.paperweight extension can help with this), and ensure there is a repository to resolve it from (the Paper repository is used by default). I wanted to add FastAsyncWorldEdit as a dependency, but adding this mavenrepository without changingdependencies causes the error too, I am unsure what went wrong

TL;DR: adding maven("https://repo.papermc.io/repository/maven-public/") to repositories {} in build.gradle causes the error, but without that line building works just fine I'm confused by this

tulip ingot
sharp rune
tulip ingot
#

huh that has internals? i thought that's just the API

tulip ingot
#

ah I've been dumb yesterday.. I def didn't build the wrong branch, thought I switched it... welp
anyways, how can I make my path shorter...

error: unable to create file data/minecraft/advancement/recipes/building_blocks/waxed_oxidized_cut_copper_stairs_from_waxed_oxidized_cut_copper_stonecutting.json: Filename too long
https://bin.bloom.host/cenevekupo
I already cloned it to the root of my drive and named it p instead of paper qwq

lament scarab
#

enable long paths in git

tulip ingot
#

huh thats a thing? interesting

tulip ingot
#

I think I'm going crazy I can't find a jar that is just all the server code + apis qwq

lament scarab
#

We don't have a combined jar

tulip ingot
#

why can't we build that?

lament scarab
#

Because we have no reason for one and so don't care to package one

#

you'd need to publish a dev bundle if you want easy access

tulip ingot
#

ah how will I access it after I publish it?

#

also whats the task called? I cant seem to find it?

#

ah generateDevelopmentBundle?

#

hmm I have the zip file but what now

lament scarab
#

I said publish, ./gradlew publishToMavenLocal -PpublishDevBundle

cinder fern
#

this is frustrating and I don't see what i'm doing wrong 😦

lucid mulch
#

with pw

#

sadly

#

its a known issue on the issue tracker

#

If you dont use nms simply compile against paper-api

#

and dont use the userdef plugin

#

userdev*

#

and then you can add whatever dependency and repo you want

lament scarab
#

I mean, paperweight always injects that thing, so it makes 0 sense that adding it would break the build

#

probably want to see the full output from gradle

cinder fern
smoky violet
cinder fern
smoky violet
#

that is specifically about centralized repo declaration in the settings file

cinder fern
icy parrot
#

hello, tried setting up paperweight in my project, attempted to follow the tutorial on the website, and copied the template from the example repo but still getting this error: https://pastes.dev/thZRjdQDRd

quaint raven
#

Update gradle

naive cedar
#

okay i believe i found a bug with paperweight. it's not exactly a major issue, it's such an edge case, but it's your call whether this is worth fixing

#

i haven't really investigated it in depth

#

here is how to trigger it:

  • i have a "submodule" folder in my project root. in here, i keep a git submodule with a dependency i want to have.
  • i symlinked submodule/mySubmodule/src/main/java/dev into forky-server/src/main/java/dev. the idea is to get all that built into the jar without having to package a proper dependency.
  • all of this happens into a branch separate from main.

then, and only then, i get Out Of Memory: Java heap during the compileJava step when i call one of the create*BundlerJar or create*PaperclipJar

#

same exact source setup merged into the master branch worked

#

i have no idea why or how

lucid mulch
#

its a bug with gradle

#

that triggers randomly

#

the out of heap

naive cedar
#

idk if randomly

#

i consistently get it with this setup

#

and i consistently don't get it without it

lucid mulch
#

well there are some reproduction steps, try increasing the java fork heap in the server build.gradle.kts

naive cedar
#

whatever, i got it to work anyway

lucid mulch
#

you can also get it on the main branch by ctrl + c in the middle of build and then running build again

naive cedar
#

did that before and it worked fine

#

i figured i'd let you know anyway, but i it's a gradle bug then whatever

naive cedar
lament scarab
#

I mean, then you'd need to look into memory dumps

#

Unless you have a public repo that we can test, there is 0 chance anybody is going to look into it

naive cedar
#

it's okay, i got it to work

lament scarab
#

(and, even then, it would just be on the long backburner of stuff)

naive cedar
#

it just seemed like a weird thing to fail on, paperweight seemed the likely culprit

#

but if it's a gradle bug it's not your problem

rapid pine
#

Hello, I saw the latest announcement and I can no longer build my project because the dependencies cannot be found, do you have a solution?

echo kilnBOT
bronze ember
#

None of those are paper dependencies, you shouldn't be fetching them from our repo in the first place

lament scarab
#

gradle (rightfully) fails if you get unexpected http codes from earlier repos

north remnant
#
Cannot add task 'applyUpstream' as a task with that name already exists.

hmm anyidea to set name on task?

lucid mulch
#

try to apply paperweight in the root build file with apply false and then in the module build files instead of pasting in the version etc just do id(“io.papermc.paperweight.userdev”)

#

and it should work

spice canopy
#

Hey everyone. I currently have a mincraft plugin project that is configured with maven. Which steps should I take to properly configure paperweight-userdev? I've been trying a couple of things for a while now, but I'm struggling to set it up.

smoky violet
#

I would generally suggest by copying everything from the appropriate test-plugin branch except for the java code obviously

#

and then making changes testing along the way, so you know why something breaks if it does

humble badge
#

Hello there,
Can't figure out if I can put a purpur dependency as a development bundle, and how exactly? What should I do if I want to use purpur API + userdev?

lament scarab
#

ask purpur

craggy storm
#
Execution failed for task ':bukkit:reobfJar'.
> Failed to calculate the value of task ':bukkit:reobfJar' property 'mappingsFile'.
> The current dev bundle does not provide reobf mappings.
#

no reobf mappings in 1.21.6?

smoky violet
#

why would you want to reobf on modern versions anyways

#

(but, spigot released after paper, so naturally there is nothing to reobf to in initial builds)

glossy fox
#

I don't know if this is a Paperweight issue or a setup issue with my project for 1.21.6, but when I try to use the Mojang mappings in each location, it still uses the reobfJar task and throws the same error that @craggy storm already posted above.

I tried:

  • manifest = DEOBF_NAMESPACE ("mojang")
  • paperweight.reobfArtifactConfiguration = MOJANG_PRODUCTION
  • removed "tasks.assemble { dependsOn(tasks.reobfJar) }"

Update commit: https://github.com/gecolay/GSit/commit/d075a0441a3bdebedc2a0e5ed0a48b9ab5bd3f3d

lament scarab
#

REOBF_CONFIG

glossy fox
lament scarab
#

oh, missed that it wasn't set on there, but, something is still likely asking for reobf somewhere

glossy fox
lament scarab
#

idk what the side-effect of the reobfArtifactConfiguration thing is, but, you are setting it to that for .6 in your module

#

or, no, I'm apparently blind

glossy fox
#

i set it to the mojang mapping

lament scarab
#

try producing a build scan

#

outside of that, I'm on the wrong machine to really look

lament scarab
#

it generally seems to indiate that the root project is asking for the reobf config

lament scarab
#

I explictly told to to use the default configuration and it works, idk why it's trying to pull the reobf configuration

smoky violet
#

technically both variants have attributes that satisfy selection

#

just the reobf one has an extra attribute

#

it's possible the default logic changed

bold lodge
#

Has anything broke today?

#

Intellij decided that org.bukkit does exis anymore

#

Invalidate caches did the trick, nvm... IDEA having a stroke

limber glen
#

is there a way to use multiple paperweight dev bundles within a project with differend modules?

lucid mulch
#

and there you specify the dev bundles

#

in the modules’ build files

glossy fox
lament scarab
#

"default"

glossy fox
hardy tendon
#

Has something changed with recent userdev versions in regards to NMS not showing up anymore in external libraries in IDEA? I can't browse the source tree anywhere

#

e: nvm, apparently it lives here but isn't shown in external libraries anymore

smoky violet
#

thats not it

#

you probably just need to refresh the gradle build

hardy tendon
novel knoll
#

must be something about your setup, it's all there and fine for me on the latest version of intellij shrug

stable aspen
#
Unable to resolve a dev bundle, which is required for paperweight to function.
Add a dev bundle to the 'paperweightDevelopmentBundle' configuration (the dependencies.paperweight extension can help with this), and ensure there is a repository to resolve it from (the Paper repository is used by default).
#

what is this

#

nvm

wispy fiber
#

Hi, I've noticed that that the mojang-spigot-reobf.tiny file isn't part of the 1.21.6 dev-bundle anymore. I guess this is because there's no need to remap our plugins anymore and probably also due to the hardfork, right?

Anyway, I've no problem with that. All I want to know is whether it was intentionally removed or not? Will this file be permanently removed from now on? Is my reasoning above correct?

Thanks in advance!

novel knoll
#

the first couple of builds happened before spigot made their release public, so no mappings were available to bundle

#

there is an open pr to include them now that they are

static urchin
wispy fiber
#

Oh I see, thanks!

wispy fiber
bleak patrol
echo kilnBOT
calm pulsar
#

Please tell me how to apply paperweight-userdev to a paper project created using the minecraft development plugin in intellij.

#

I've been looking for it since yesterday, but I still don't know.

main mica
calm pulsar
#

wait, let me show you my log.

#
    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.17" // I added it.
    id("xyz.jpenilla.run-paper") version "2.3.1"
}```
```dependencies {
    // compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT") // I removed it.
    paperweight.paperDevBundle("1.21.6-R0.1-SNAPSHOT") // I added it.
}```
#

Is there anything else to do?

main mica
#

not really

#

make sure you are using an up-to-date version of Gradle though

calm pulsar
#

-# settings.gradle

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

rootProject.name = 'untitled11111111'```

-# result
```Settings file '~~~~~~~~~~~~~~~~~\untitled11111111\settings.gradle' line: 5

A problem occurred evaluating settings 'untitled11111111'.
> Could not find method maven() for arguments [https://repo.papermc.io/repository/maven-public/] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

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

help..

main mica
#

You are using kts syntax in a groovy build file

calm pulsar
#

oh sorry

#
> 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 17, 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 
#
              - 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 17)
                  - 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 17)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.8')```
#

idk

main mica
#

yes

main mica
#

you are using Gradle 8.8, which is outdated. Latest is 8.14

calm pulsar
#

okay

calm pulsar
#

-# "build.gradle"

    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
    id("xyz.jpenilla.run-paper") version "2.3.1"
}

group = 'net.asdfkim'
version = '1.0'

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

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

tasks {
    runServer {
        // Configure the Minecraft version for our task.
        // This is the only required configuration besides applying the plugin.
        // Your plugin's jar (or shadowJar if present) will be used automatically.
        minecraftVersion("1.21")
    }
}

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

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

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

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

_ _
_ _
-# "??"

#

help me

quaint raven
calm pulsar
#

yes

#

Should I just use paperweight-testplugin?

main mica
#

its an example that you can then use in your own plugin

gaunt horizon
#

Hello everyone, what should be the best gradle version for building plugins?

#

Was currently transfering an old plugin using 6.8 but I'm now using 8.14.2 and I have trouble using it

lament scarab
#

latest

#

coming from such an old version means that you're going to need to update stuff, like plugins, and potentially fix your script

gaunt horizon
#

Actually, it's more like a Entry plugin.yml is a duplicate but no duplicate handling strategy has been set. Please refer to issue I'm getting

#

Cleaning gradle wasn't working much too

lament scarab
#

Yea, they made such broken states warn now

#

the solution is to deal with why you're getting the dupliciate

gaunt horizon
#

Ah heh

lament scarab
#

(you can also specifiy a handling strategey, i.e. replace)

gaunt horizon
lament scarab
#

yes

gaunt horizon
#

The hardest is that I don't know what is causing the duplication, since I'm kinda new on this and that it's potentially on a specific dependency I assume

lament scarab
#

it would generally be down to resource filtering

gaunt horizon
#

Ah ok I see what you mean
I think the easiest would be to do handling strategy but ye I have to find how

lament scarab
gaunt horizon
#

Somehow I find where it cause the issue

#
from(sourceSets.main.resources.srcDirs) {
    filter ReplaceTokens, tokens: [version: version]
}
#

This makes the error duplication

lament scarab
#

Yea, as that's basically double dutying the default processResources operation

gaunt horizon
#

I see, thx for the info

#

I think I managed to fix the issue now

turbid moon
lament scarab
#

you're missing the paper repo?

turbid moon
#

Ah I need to include both?

lament scarab
#

Yes

turbid moon
#

It's still complaining, but other error

#
C:\Dev\Java\Plugins\TestProject\src\main\java\io\papermc\commands\CustomJavaPlugin.java:62: error: cannot find symbol
                .requires(Commands.restricted(c -> true))
                                  ^
  symbol:   method restricted((c)->true)
  location: interface Commands
#

It basically doesn't find the PR artefact now

lament scarab
#

make sure that the paper repo is after the pr repo?

turbid moon
#

Yep okay that does it

#

Good to know, thx

calm pulsar
#

Can someone point me to a tutorial on how to set up a complete development environment for the paperweight-userdev plugin in intellij? I've been searching and asking questions for 3 days now, but I keep having problems.

#

help me

#

please

echo kilnBOT
calm pulsar
#

Does this guide assume you've created a new Java project?

lament scarab
#

I mean, the guide assumes that you have a gradle project you can copy and paste a few things into

#

There is also the paperweight test plugin on the github that can be used as a template

#

but, this is advanced tooling, there comes a level of expectations around your abilities when using it

quiet tree
#

Would like to test Configuration API PR. Is it possible to use it with run-task Gradle plugin? Or not possible atm?

lament scarab
#

afaik if you provide a dev bundle it should pick it up

quiet tree
#

alright, will try to figure this out - thanks

smoky violet
#

apply paperweight-userdev and use runDevBundleServer

long agate
#

I will just build another project

blazing harbor
#

I dont know how to solve this one exactly, I dont relaly like the build tools stuff xD ```gradle
A problem occurred configuring project ':BingoReloaded'.

Could not resolve all artifacts for configuration 'classpath'.
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.17.

#

I have the correct repositories and stuff

#
repositories {
    mavenCentral()
    maven {
        name = "papermc-repo"
        url = "https://repo.papermc.io/repository/maven-public/"
    }
    maven {
        url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
    }
    maven {
        url 'https://repo.codemc.io/repository/maven-releases/'
    }
    maven {
        url 'https://repo.codemc.io/repository/maven-snapshots/'
    }
}```
echo kilnBOT
blazing harbor
#

I was about to send the paste, but then I figured, might as well try to update gradle, and that seems to have fixed it (8.12 -> 8.14). I swear I read somewhere that 8.12 would also work

#

guess not

#

anyways, thanks for the reminders 😛

#

ill post full logs next time I have issues

torpid tulip
#

why ,please help me !

lament scarab
#

You have a corrupted patch file; easiest step would generally be to make sure that you grabbed the repo from the correct point for that version of paper

#

the layout has changed a bit over the past few months

torpid tulip
#

how should i fix it, minecraft version is 1.20.1

lament scarab
#

as I said, checkout a commit of that repo that works for 1.20.1

#

otherwise, you'll need to figure out how to fix it yourself, we don't provide support for that version of MC, and we're generally not here to teach git

amber imp
#

I am trying to use paper weight, I used ./gradlew wrapper --gradle-version=latest and still same issue

#

I also used clean

novel knoll
#

paperweight version?

lament scarab
#

update the gradle version manually, then you'll be able to update the wrapper using the command

#

otherwise, there is not enough information there

amber imp
#
    `java-library`
    id("io.github.goooler.shadow") version "8.1.8"
    id("io.papermc.paperweight.userdev") version "1.7.3"
    id("xyz.jpenilla.run-paper") version "2.3.1"
}

amber imp
#
Groovy:        3.0.24
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  21.0.4 (Eclipse Adoptium 21.0.4+7-LTS)
Daemon JVM:    C:\Program Files\Eclipse Adoptium\jdk-21.0.4.7-hotspot (no JDK specified, using current Java home)
OS:            Windows 10 10.0 amd64
#

are these latest version of gradle?

novel knoll
#

outdated userdev

#

latest is 2.0.0-beta.17 or something

amber imp
#

oh okey

#

does paperweight already include paper api?

tulip ingot
fading vapor
#

the dev bundle does

tulip ingot
#

ah true

#

my bad

tulip ingot
acoustic timber
#

I just want the final jar to be {pluginname}-{version}.jar

lament scarab
#

renaming jars is generally kinda asking for headaches

#

you would otherwise need to change the artifact of the main jar task or whatever it was, otherwise the files are going to conflict, as it's saying

acoustic timber
#

Okay thank you, maybe I'll just have a separate folder and copy and rename the file into there

lucid carbon
#

Hey i got this error while adding the dependency to the gradle project:


Please ensure the host name is correct. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
tender vine
# novel knoll latest is 2.0.0-beta.17 or something

2.0.0-beta.17 doesnt resolve, 2.0.0-SNAPSHOT (which is stored in paper nexus repo and is the same version) sort of resolves but still fails.

It seems it was changed back to snapshot in the latest version, but it still being tagged as beta 17

#

2.0.0-SNAPSHOT works after upgrading gradle version tho

dusk quail
#

paper publishes to gradle plugin portal afaik so make sure it still has it

novel knoll
#

@tender vine check the link in my message directly below, like ebic mentioned paperweight is hosted on the gradle plugin portal

#

if you have any further errors, share your build script, your settings script, and the full error log

tender vine
#

I was just pointing out that it is stored in both, thats all

novel knoll
#

snapshots specifically are published to our repository yes

#

but it is advised against depending on snapshots unless you really need to

tulip ingot
bleak lark
#

trying to use paperweight, i dont think i skipped a step but i still cant use nms methods

for (Player p : Bukkit.getOnlinePlayers()) {
  p.getHandle() // doesn't exist
}

no errors in gradle

lament scarab
#

Player is a bukkit interface, it does ofc not have a method that exposes nms, as nms does not exist in the API

#

you would need to cast it to CraftPlayer, that has a getHandle method

bleak lark
#

ah it works thank you

acoustic timber
#

How would I use the applyPatches task without setting a global git user?
I tried it without --global in the root repository and the server repository and it's giving me this error.

> Task :paper-server:applyFeaturePatches FAILED
Committer identity unknown
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
distant mango
#

why not set it globally?

acoustic timber
#

I have a school and personal account

main mica
#

if you just omit the --global, it will per repo

#

though iirc paperweight uses multiple repos still? So you might need to use the global one. Can always just set it back afterwards tho

acoustic timber
odd current
#

Hello, I'm making a new plugin to use the new Dialogs in 1.21.6. There aren't any APIs out for it yet, so I'm trying to use paperweight-userdev.
However, the plugin doesn't seem to work. Can anyone help me?

lament scarab
#

update gradle

echo kilnBOT
odd current
smoky violet
#

for search: Unable to load Maven meta-data from https://s01.oss.sonatype.org/content/repositories/snapshots/ Unable to load Maven meta-data from https://oss.sonatype.org/content/repositories/snapshots/ ^

open latch
smoky violet
#

I am happy to get away from that plugin

open latch
#

Also they fix the issue where publish a stage release only can be published by the same user who create the stage

smoky violet
#

that they updated is nice but its very much full of legacy jank

open latch
smoky violet
#

and is always lagging behind on updating for gradle changes

#

yes

#

the one I linked is fully compatible with config cache and project isolation

#

from the ground up following proper conventions

open latch
#

When i see the date and search a fast mitigation (because forget the date xd) if maven central release a proper gradle plugin can try full migrate from that... By the moment works xd

smoky violet
#

if they release something official I will look at it, but I kind of doubt it will be as idiomatic as luke's

#

and with how many community options sprung up, I don't really think they will be in a rush to make their own

open latch
smoky violet
#

at the end of the day it will just be consuming the same public apis

open latch
#

Kotlin again ConterLost

smoky violet
#

this calls the tasks

open latch
#

But i take note when have time for make tests using that, thanks doggo

candid thorn
distant mango
#

now send the pom.xml

#

and also try actually building

#

(mvn clean package)

candid thorn
candid thorn
distant mango
#

and what is that error

#

also why are you using java 8

candid thorn
#

I mean, i don't?

distant mango
#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
#

What error are you getting

candid thorn
mellow venture
lucid carbon
#

why's this happening ```Unknown host 'piston-meta.mojang.com'.

Please ensure the host name is correct. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle```

lucid carbon
#

?

torn sonnet
lucid carbon
#

Intellij

bronze ember
#

are you in some country that limits the internet?

lucid carbon
pliant carbon
#

that looks ok

bronze ember
#

Mmh, strange, no clue why IntelliJ has an issue then

#

Wait are you running IntelliJ on your phone?

lucid carbon
lucid carbon
#

Any ideas? :/

lament scarab
#

are you using WSL or something?

#

otherwise, it's probably firewall or antivirus or something stupid

#

I mean, the question was to open the link on the same device as you're having issues with, not on some other device

midnight stone
#

does nms work with java 21? getting a error

lament scarab
#

update gradle

echo kilnBOT
midnight stone
#

i run the newest

lament scarab
#

your wrapper is using 8.8

midnight stone
#

is this something i need to worry about?

distant mango
#

no

midnight stone
#

theres more

distant mango
#

you can ignore them

lament scarab
#

Unless you're parsing untrusted data it's not a huge concern

bronze ember
#

That's what we expect

#

It's not the DNS error you encountered in IJ

hexed timber
distant mango
#

github renovate

glass sable
#

doesn't intellij show that automatically in the pom?

hexed timber
#

It used to, but since Intellij 2025.1 has removed the Package Search plugin that doesn't happen anymore

glass sable
#

at least for me it marks the outdated dependencies and even security warnings in red

hexed timber
#

Do you have the newest version of IJ?

glass sable
#

of course not

#

I uase 2024.3.5 from March, I basically never update to latest as they always break workflows in new versions -.- (also I do not have a "package search" plugin)

#

wait, no, that's for go. google is so useless

hexed timber
#

iirc Package Search came bundled with IntelliJ up until sometime last year, after that it was deprecated but you could still install it manually via the Plugins marketplace, but since 2025.1 it's not even supported anymore.
The Package Search plugin is what adds "Dependencies" under "View -> Tool Windows -> Dependencies"

glass sable
#

I don't have that

hexed timber
#

Hm

#

Do you have some other plugin installed that could be responsible for showing these tooltips?

glass sable
#

I don't think so

hexed timber
#

Because that's exactly what I'm looking for

glass sable
#

although I can't seem to trigger it right now but I'm sure it still worked recently (at least after the last time I updated IntelliJ)

tranquil shadow
#
23:26:21: Executing 'build'…

Calculating task graph as configuration cache cannot be reused because file 'settings.gradle.kts' has changed.
[Fatal Error] core-7.2.14.pom:1:44: Content is not allowed in prolog.
[Fatal Error] core-7.2.14.pom:1:44: Content is not allowed in prolog.

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache state could not be cached: field `provider` of `org.gradle.internal.serialize.codecs.core.ProviderBackedFileCollectionSpec` bean found in field `__remapper__` of task `:reobfJar` of type `io.papermc.paperweight.tasks.RemapJar`: error writing value of type 'org.gradle.api.internal.DefaultNamedDomainObjectCollection$ExistingNamedDomainObjectProvider'
> Could not resolve all files for configuration ':pluginRemapper'.
   > Could not find tiny-remapper-0.11.1-fat.jar (net.fabricmc:tiny-remapper:0.11.1).
     Searched in the following locations:
         file:/C:/Users/Max/.m2/repository/net/fabricmc/tiny-remapper/0.11.1/tiny-remapper-0.11.1-fat.jar

* 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 1s
Configuration cache entry discarded due to serialization error.
23:26:23: Execution finished 'build'.

Hello how can I fix that ?

smoky violet
#

dont use mavenLocal unless you are specifically trying to test something from your local repository, and even then use a content filter

tranquil shadow
lament scarab
#

I mean, that's not a class in paper

#

nor is it in spigot

tranquil shadow
#

how that's possible I used it and it worked when I was on maven

lament scarab
#

that event existed a decade ago

novel knoll
#

it was moved packages eventually

lament scarab
#

looks like it was removed when one was added into their bukkit fork

tranquil shadow
#

ok ty lol

steep lava
bronze ember
#

Well, what happens if you click that url?

steep lava
#

It's the repo URL

#

So they should be valid

#

Googling the error implies that there must be an empty <repository></repository>, but checking my Pom files shows no such thing

bronze ember
#

Oh it's not the actual url of the artifact?

#

Have you checked that you didn't accidentally enable offline mode in IJ?

#

Try running via CLI

steep lava
#

Offline mode is disabled.

open latch
#

Hi i have a build.gradle like this
https://pastes.dev/8uGPSIm6hY

currently works but i feel like im a little redundant for the "i just wanna one jar" if try mess with jar get a issue for the genResourcePack

steep lava
#

And running a mvn clean install is actually building the stuff

#

Tho, opening any class in the project that uses external imports (i.e. JavaPlugin import) show it as invalid.

#

Like just so you see what I mean

bronze ember
steep lava
#

tried it twice already

bronze ember
#

Check maven settings, maybe it points to a different maven home than your cli

steep lava
#

Looks to be the default settings

#

There's an IJ update that also updates the maven plugin.
Maybe this will help, but I honestly don't have much hope here

royal hawk
#

This project i last visited it 3 weeks ago, and it was fine. i came back today, but now i cannot execute any gradle commands ? can anyone tell me what im doing wrong

faint iris
#

try ./gradlew instead

royal hawk
#
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain```
tough pike
#

What can I do about this?

Patch failed at 0001 Rebrand
error: invalid object 100644 bf9520bf4f314dacc66db9a7d30dbcc239db2c7d for 'net/minecraft/world/damagesource/DamageSource.java'
lament scarab
#

depends on the what you did to induce that

#

but, that is generally a 3way merge failback when the patch changes and your repo doesn't have a reference to the OG commit to try to do a 3way diff

#

easiest option is iether to try to figure out how to get it that context, i.e. make sure that you do an apply and rebuild before updating, otherwise, just redo whatever failed manually

tough pike
#

Okay

#

I was updating from 1.21.4, so I'm resetting to the last 1.21.4 commit and running apply all and rebuild

#

Well that's interesting

#

wait I forgot to run rebuild lol

tough pike
lament scarab
#

well, idk how filtering stuff worked now, there might be a gradle propery for it

#

-Ppaperweight.filter-patches=false from what I gather

tough pike
#

hmm

#

still no change

#

Let me try updating to an older 1.21.5 commit

lament scarab
#

I mean, the commit ver doesn't really matter

#

stuff changed

#

the hopes for rebuilding without filtering is that the git stuff should line up better in order to allow it to try a 3 way

tough pike
#

Although now I got a failed three way merge from three files, instead of a file that can't be found

lament scarab
#

Well, yea

#

that's a change

#

that means that the info was there so that it could try to do a 3way

#

it's not magically going to change the fact that a conflict was found, as I already said, it just had a better shot of trying to auto resolve it

tough pike
lament scarab
#

your patch failed to apply because the code that it is applying over changed

#

the only change that would occur from a straight rebuild is the hashes inside of the patch file changing

tough pike
#

Yes

#

And those did not change

lament scarab
#

I mean, apply and rebuild generally also means that you applied the patches so that those objects will exist, especially if this was a fresh clone

tough pike
#

Okay well 1.21.5 decided to apply, apparently

tough pike
tough pike
#

Okay so I think I know what's happening

#

I have three classes that failed to patch, whatever. I fix them, cd into src/minecraft/java, add them to git, run am continue, and then rebuild server patches.

#

But, the changes I had to make to fix the feature patch don't seem to save to the patch file

#

Not sure what I'm doing wrong, maybe this is the old way to fix patches from before feature and file patches?

tame finch
#

I've tried jdk21 aswell

main mica
#

probably a good idea to use 1.21.7 at this point. .5 was a weird in-between version that never got a proper Paper release.

Check your gradle (wrapper) version though, and make sure its up-to-date

main mica
#

no

tough pike
#

Oh, mb

main mica
#

though if you are on 1.21.5 for some reason I would update too kek

tough pike
#

Yeah I'm trying

#

One of my patches failed to apply and I fixed it, but my changes refuse the save to the feature patch for some reason. Although I could be doing it wrong.

main mica
#

are you running the correct tasks? e.g. fixup first, then rebuild? And for the right part of the server (api/minecraftSources/server?

tough pike
#

Is fixup also for server feature patches?

#

I got the idea that it was only for single file patches

main mica
#

it might be, I haven't used feature patches with the new tooling

#

but pretty sure for feature patches it works the same as it did with the old tooling, e.g. git rebase and then rebuilding patches. But see the contributing.md of Paper, it should be covered there

tough pike
#

I was looking in there, maybe the wording is weird

#

yeah I just can't read

#

oops

tough pike
#

hmm

#

"Saved modified patches (0/1)"

#

wait

#

it's not rebuilding Minecraft patches

#

???

lament scarab
#

That would generally scream that you failed to finish the rebase session

tough pike
#

Nope

#

I had to run rebuildMinecraftFeaturePatches manually and not just rebuildServerPatches, apparently

bronze ember
#

The rebuild tasks don't cascade

#

All patch sets need to be run manually

tough pike
#

Well that's nice to know for the future lol

smoky violet
#

you would know that if you read the descriptions for every task

#

or at the minimum the ones you are running

turbid moon
#

I am having slight issues with my fork of Folia. I got a setup almost the same as the fork-of-fork v2 paperweight-examples project. I have added one new file to the server, and done a few small changes to existing files. I cannot seem to be able to make a feature patch out of those changes though.

My steps:

  1. After doing my changes, I cd'ed into my -server/src/minecraft/java dir
  2. git add .
  3. git commit -m "message"
  4. cd back into root
  5. gradle rebuildAllServerPatches

This resulted in me getting a 0001-<message>.patch file under -server/minecraft-patches/features.
For some reasons though, this patch only contained my added method, not the changes I did to other source files.
Examining the git list and checking the diff, my commit from above also only contained the new file and no modifications to previous ones.

So I have two questions related to that:

  1. Is this patch intended to be in the minecraft-patches or am I using the wrong rebuild task? Just doing rebuildServerPatches doesn't seem to create a patch.
  2. Am I doing something incorrectly in the commit step for my changes to not show up? And what would be the correct way?
turbid moon
#

Okay I finally understood what is going on. The project is separated into three source sets:

  • minecraft, where all minecraft changes go
  • paper-server, where all paper server file changes go
  • folia-server, where all folia server file changes go

Since I had commit to the minecraft folder, which only contained my freshly created file, it only created a patch for making that one fresh file. It didn't contain the changes which I (unknowingly) did to paper-server. This is also the reason it created a minecraft patch instead of a Paper one.

After moving my new file to the paper-server folder (it doesn't really matter, but just so only one patch happens), running rebuildPaperServerPatches creates the expected paper-patches patch which contains the freshly created file and the changes to paper source files

tough pike
#

bruh

#

I'm trying to look at your paste, but Malwarebytes blocks lucko.me by default for some reason lol

tough pike
lucid mulch
#

its not

#

i can access it

tough pike
lucid mulch
#

however i dont understand groovy dsl so gsand

tough pike
#

I manually unblocked it and it's still blocked

lucid mulch
#

i can send it here if u want

#

the copy

tough pike
#

Hold on, I think I know what it wants

#

That's so stupid

#

Part of it was browser cache, part of it was having to exclude the subdomain

#

crazy idea, but what if we didn't blanket block everything

#

Groovy is pain

tough pike
open latch
tough pike
#

Well, you shouldn't need build and deploy to depend on shadowJar

tough pike
#

Because it's generally a nicer looking language than Groovy

open latch
tough pike
#

Yes

#

If it doesn't work without those dependsOn then something else is wrong

#

Groovy allowing you to use single quotations for strings is heinous

exotic basin
#

Can anyone help me with the migration of the whole part of the Build system from Gradle to Gradle Kotlin DSL, I tried to use the option of overwriting the file type in IntelliJ after copying from a project created so the contents of the .kts files before I did the overwriting it gave various errors is problems after that it seems gone I don't know if anything else needs to be done or if I did everything wrong

turbid moon
echo kilnBOT
turbid moon
#

(You'd want to use pastes.dev in this case)

exotic basin
#

Before I did that it also gave me this error.

open latch
#

i try to debug a 403 with a repository in github actions.... not sure why calling ./gradlew build --stacktrace get the 403 and only in github actions.. i wanna know if can debug to show the full response of the repo because if test a curl i get the content from where i get 403 with gradle

edit: clear github cache looks like fix.. or not sure what happen in that... because the self-hosted runner not has that issue

turbid moon
exotic basin
exotic basin
#

Can anyone ire me if it is normal that after doing Build > Build Artifacts > Build, the final file weighs 120 MB

lucid mulch
#

are you sure you dont shade anything by accident?

#

it shouldnt be that big ever

#

@exotic basin

exotic shoal
#

so im using paperweight and today it stopped working, i assumed i needed to update my gradle.kts so i did so but the newest version errors
is there something im missing?

plugins {
  `java-library`
  //id("io.papermc.paperweight.userdev") version "1.7.1"
  //id("io.papermc.paperweight.userdev") version "1.7.5"
  id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
  id("xyz.jpenilla.run-paper") version "2.3.1"
}

group = "io.dinoboy50.spinosaurus"
version = "1.5.0"
description = "General plugin for DINOBOY50"

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

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

tasks {
  runServer {
      downloadPlugins {
            hangar("ViaVersion", "5.1.1")
          }
       minecraftVersion("1.21.3")
      jvmArgs("-Dcom.mojang.eula.agree=true")
    }
  // Configure reobfJar to run when invoking the build task esk
  assemble {
    dependsOn(reobfJar)
  }

  compileJava {
    options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
    options.release.set(21)
  }

  javadoc {
    options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
  }

  processResources {
    filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
    val props = mapOf(
      "name" to project.name,
      "version" to project.version,
      "description" to project.description,
      "apiVersion" to "1.21" //1.20
    )
    inputs.properties(props)
    filesMatching("plugin.yml") {
      expand(props)
    }
  }
}

north flume
#

What error do you get?

lucid mulch
#

also the latest ver would be beta.18 but ^^

exotic shoal
brave widgetBOT
echo kilnBOT
north flume
#

You'll most likely need to update gradle

exotic shoal
#

i think updating gradle worked

exotic shoal
#

yea it did

north flume
#

sweet, yeah same thing happened to me lol

misty current
#

Can someone help me with an internal kotlin compiler error im getting. It says "source must not be null" and points to a random line in a file.

org.jetbrains.kotlin.util.FileAnalysisException: While analysing C:/dev/java/Typewriter/engine/engine-loader/src/main/kotlin/com/typewritermc/loader/ExtensionLoader.kt:49:5: java.lang.IllegalArgumentException: source must not be null

It would probably be easier to VC over this

#

Also, this error stops me from syncing the gradle project entirely, not compiling

#

im not even doing gradle build, im just syncing it in IDEA. I have invalidated all caches and restarted, as well as reinstalling my gradle wrapper

lament scarab
#

I mean, unless --stacktrace gives you some interesting output, outside of advising that you try to update stuff, there isn't much we can advice if kotlinc dies

misty current
#

stacktrace is just kotlin compiler internals

lament scarab
#

only rela thing would be to see if there are any updates to the kotlin plugins, etc, for gradle, and go file a report on their tracker

#

This channel is generally for help with build tooling configuration stuff, theres not much we can do if the compiler is eating dirt

misty current
#

well, turns out my build script was freaking out over the version catalogue. i messed with it and now it works

#

no idea what was going wrong, i think something was using an older version of kotlin from the build cache

lament scarab
#

version mismatch or something weird was my general guess, hence why I suggested to just update everything

jolly moat
#

Only getting back into MC stuff, but have some server changes to make lol.

Is there a specific gradle task to create a patch for the forked build.gradle.kts files?

#

Found it, don't mind me :)

drifting moss
#

Is there a guide for making a fork in 1.24+ ? i'm working on upgrading my server to latest but I'm not sure how the forks work now and I haven't been able to really find any documentation

exotic basin
main mica
frigid vigil
#

anybody else having trouble building paper?

#5 8.131 > Task :paper-server:cloneSpigotBuildData FAILED
#5 8.131                                                                                                                                                                                                                                                
#5 8.131 $ (pwd) /work/Paper/paper-server/.gradle/caches/paperweight/taskCache/cloneSpigotBuildData.zip-1925470213
#5 8.131 $ git -c commit.gpgsign=false -c core.safecrlf=false init --quiet
#5 8.131 
#5 8.131 $ (pwd) /work/Paper/paper-server/.gradle/caches/paperweight/taskCache/cloneSpigotBuildData.zip-1925470213
#5 8.132 $ git -c commit.gpgsign=false -c core.safecrlf=false remote add origin https://hub.spigotmc.org/stash/scm/spigot/builddata.git
#5 8.132                                                                                                                    
#5 8.132 $ (pwd) /work/Paper/paper-server/.gradle/caches/paperweight/taskCache/cloneSpigotBuildData.zip-1925470213
#5 8.132 $ git -c commit.gpgsign=false -c core.safecrlf=false fetch --depth 1 origin 436eac9815c211be1a2a6ca0702615f995e81c44
#5 8.132 fatal: unable to access 'https://hub.spigotmc.org/stash/scm/spigot/builddata.git/': The requested URL returned error: 403
glass warren
frigid vigil
#

main branch

static urchin
#

403 on the spigot repo is uhhh

glass warren
#

Yeah that's kinda weird.

static urchin
#

idk, rate limited maybe?

glass warren
#

We're still hitting the spigot repo post hardfork?

static urchin
#

We are for reobf mappings

glass warren
#

Ahhh

#

That makes sense.

static urchin
#

if you don't care for those, disable them ™

frigid vigil
#

is there a way to?

lucid mulch
#

set enabled under the spigot ext in the server build file to false

static urchin
#

^

#

in paper-server

frigid vigil
#

alrighty ty

smoky violet
#

now I nuked my local env by accident while testing

#

since actions doesn't run this task to populate remote caches

static urchin
#

did md change something o.O

smoky violet
#

its running git clone

#

so building spigot is broken too probably

static urchin
#

the webpage for it works on my end

smoky violet
#

yes

static urchin
#

nice upsidedown_cry

#

I'll add "spigot infra does not work" to my list of arguments for "drop remapping one day COPIUM"

smoky violet
#

search 403 in spigot discord lol

#

apparently their maven is also broken

static urchin
covert horizon
#

if I wanted to use a snapshot of adventure, would the best way be to just change the adventure version being used in my fork of paper? if that's the case, how would I go about making it use the snapshots repository? I made an attempt at it but failed.

elder beacon
#

hello there
I use maven/gradle, but i also would like to get paper .jar which i can use for offline coding and import in my plugin
Precisely i would like to compile paper 1.21.4 and 1.21.7

Can someone tell me which exact jar file or files for 1.21.4 for example i need? and where can i find instructions to compile

fading vapor
elder beacon
#

do i need for that to compile jar from source?

fading vapor
#

why would you want to compile paper? And AFAIK you need a connection to compile Paper as it checks the origin

#

the paperweight-userdev also needs a connection I think

#

if you're just reffering to the API it's just a library that gets copied to your mavenLocal

elder beacon
#

i am going away somewhere and i probably will not have internet connection
i want to have offline dependencies of paper so i can use to code

#

i have connection now to compile

elder beacon
#

i don't know specifically which jar files because i know there is mojmap, papermap(?), api, etc

fading vapor
#

well are you using paperweight-userdev?

elder beacon
#

i only ever used gradle and maven, never had interested in what actually happens beneath

fading vapor
#

cause if you're not then simply referencing the API and adding local maven repo to your repo list should do it

#

you can check if you have a copy downloaded in ~/.m2/repository/

#

both Gradle and Maven use this repo to check for cached libraries

#

just make sure mavenLocal is not the first one, also quick google search tells me an --offline flag exists that essentially does what I've been saying but safer or something

pliant silo
#

Hey I'm using the run server task and it keeps launching 1.21.1 and id like to use 1.21.7, how would i change it?

smoky violet
pliant silo
#

Not sure what you mean by that

#

seems that i figured it out..

turbid moon
honest raven
turbid moon
honest raven
tender tusk
#

Updating a 1.20.6 paperweight to 1.21.5.
paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
Getting this:
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

#

Paperweight version is 1.7.7

proud maple
#

Update it to the latest version

#

Gradle itself too

tender tusk
#

That is the latest non-beta version

proud maple
#

The latest version is the beta version

tender tusk
#

That's wild, but fair enough

#

All is good now. Thank you

peak dagger
#

hi, I wanted to ask how I can make one of my plugins depend on another plugin I've made. I'm using gradle

final jewel
# peak dagger hi, I wanted to ask how I can make one of my plugins depend on another plugin I'...

there are two ways you could go about that. The easiest but not so standard is depending on the binary (the JAR file) directly like so:

dependencies {
  implementation(files("libs/myPlugin.jar"))
}

The more standard way to go about that, is to use the maven-publish plugin in your dependent plugin, like so:

plugins {
  `maven-publish`
  // java plugin goes here too
}

group = "me.ladycat"
version = "0.0.1"

publishing {
    publications {
        create<MavenPublication>("local") {
            groupId = group 
            artifactId = project.name
            version = version

            from(components["java"])
        }
    }
}

Then you execute ./gradlew publishToMavenLocal which should publish it to your local m2 repository

#

once you do that, you can depend on it like so:

repositories {
 mavenLocal() 
 // other repositories...
}

dependencies {
  implementation("me.ladycat:MyPlugin:0.0.1")
}
peak dagger
#

thank you so much ❤️

tender tusk
#

In the nms docs there is a section on running version specific code. So, in my plugin, I have an NMS interface for version specific code, and I have two questions about using paperweight for this purpose.

  1. How would one set up the gradle so that each implementing class for the NMS interface uses a different server jar? So, the project at large runs 1.21.5 api but a single class runs 1.21.7.
  2. Do paper api changes between versions need to be added to nms as version specific? For instance, between 1.20 and 1.21 GENERIC_MAX_HEALTH was changed to MAX_HEALTH - if my paper plugin yml api version is, say, 1.20.6, does this kind of thing get translated automatically, or would I need to create version specific implementations for this? What's a good way to leverage the build tooling to check for these incompatibilities between versions?

(Note if you care: I'm not planning to support ancient versions of Minecraft, but I think actively testing for the most two recent major releases, such as 1.20.x and 1.21.x, is a reasonable middle ground considering internals shift less with the new mojang mappings)

final jewel
#

as for the other question, in theory Commodore (spigot's remapping tool) should deal with API incompatibilities for you. I think this changes if you use paper plugins however I am not too keen on the details

tender tusk
#

Yeah I'm using the new paper plugins for all of my stuff so I probably shouldn't rely on undefined/undocumented behavior

turbid moon
#

Out of curiosity: Is there any plans to make paperweight/userdev no longer beta? Aka release an actual 2.0.0 version

#

I feel like it's been long overdue, but I also don't know the specifics of the paperweight codebase

fading vapor
#

inb4 get hit with the /eta command

lucid mulch
echo kilnBOT
final jewel
#

I imagine it is just that nobody has time to work on it yet and there's probably some things they want to iron out

haughty plover
#

io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false fetch --depth 1 origin d6c81daebcec6c595dda004bdc13f3cfb305c9ed

how to fix it?

static urchin
#

run again with -Dpaperweight.debug=true

haughty plover
#

Im developing new fork of paper for my some 1.21.3 test.
But I cant load paper upstream..

paperweight {
    serverProject = project(":${brandName.lowercase()}-server")

    remapRepo = "https://repo.papermc.io/repository/maven-public/"
    decompileRepo = "https://repo.papermc.io/repository/maven-public/"

    useStandardUpstream("paper") {
        url = github("PaperMC", "Paper-archive")
        ref = "da7138233f6392e791d790d1c3407414c855f9c2"

        withStandardPatcher {
            baseName("Paper")

            apiPatchDir.set(projectDir.resolve("patches/api"))
            apiOutputDir.set(projectDir.resolve("Test-API"))

            serverPatchDir.set(projectDir.resolve("patches/server"))
            serverOutputDir.set(projectDir.resolve("Test-Server"))
        }

        patchTasks.register("generatedApi") {
            isBareDirectory = true
            upstreamDirPath = "paper-api-generator/generated"
            patchDir = projectDir.resolve("patches/generated-api")
            outputDir = projectDir.resolve("paper-api-generator/generated")
        }
    }
}
haughty plover
#

I don't know any idea for fixing it...

#

I did trying it all day.....

haughty plover
#

Execution failed for task 'paperdownloadSpigotDependencies'.

Cannot create consumable configurations in detached resolvers