#build-tooling-help

1 messages · Page 9 of 1

paper kestrel
#

since mache is server-first, ill keep runserver saving to run/, and make runclient use runClient/, unless there are any better suggestions

granite valve
#

yeah, that works. tbh, I too would find it useful to be able to run the client from the IDE so I can use the debugger to debug interactions with the server

#

I have set that up before in the past with mcp reborn but I remember it was a PAIN to get it to work in online mode

#

like you gotta specify 400 startup flags for the client

paper kestrel
#

yeah 100%

#

previously while i was debugging status messages, iirc i edited some of the code and re-ran to add additionally logging

merry terrace
merry terrace
#

Any advice?

bronze ember
#

Which should be good enough for all debugging purposes, right?

grand niche
brave marsh
#

foojay-resolver doesn't support Java 21 yet?

distant mango
#

it should

#

what version are you using

paper kestrel
brave marsh
#

I also changed IntelliJ runtime to 21

lament scarab
#

I'd imagine they mean of the resolver, not java...

brave marsh
#

oh

#

it's 8.0.0

#
Execution failed for task ':runServer'.
> Failed to calculate the value of task ':runServer' property 'javaLauncher'.
   > Unable to download toolchain matching the requirements ({languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/b57d293a38ff8dec8d7ae748a8128e0e/redirect'.
      > Provisioned toolchain 'C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1' could not be probed: Unexpected command output: 
        [0.012s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
        [0.012s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
        [0.012s][warning][cds] C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules size has changed.
        GRADLE_PROBE_VALUE:C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1
        GRADLE_PROBE_VALUE:21.0.2
        GRADLE_PROBE_VALUE:JetBrains s.r.o.
        GRADLE_PROBE_VALUE:OpenJDK Runtime Environment
        GRADLE_PROBE_VALUE:21.0.2+13-b375.1
        GRADLE_PROBE_VALUE:OpenJDK 64-Bit Server VM
        GRADLE_PROBE_VALUE:21.0.2+13-b375.1
        GRADLE_PROBE_VALUE:JetBrains s.r.o.
        GRADLE_PROBE_VALUE:amd64
#

It works with 17

lament scarab
#

eeeerrrrrrrrrr, either there is something weird with that JDK install or foojays stuff is being weird

#

it supports 21 in general just fine

brave marsh
#

hmm

#

i'm just using adoptium 21

lament scarab
#

you told it to use jetbrains

brave marsh
#

Is there something wrong in here?

brave marsh
lament scarab
#

foojay tried to download the jetbrains one due to the projects config

#

and for some reason blew up

brave marsh
#

adoptium doesn't work too

lament scarab
#

the fact that you have CDS complaining is somewhat weird, too

brave marsh
#

what is CDS

lament scarab
#

it's a java mechanism that speeds up server startup by precompiling some stuff

#

cds complaining about files changing is generally weird, but, I'm not a windows user, so, idk how you'd go about diagnosing that sorta thing without just wiping the gradle jdks folder

brave marsh
#

tried that but doesn't work 😢

#

why it works with 17 even though I don't have 17 installed on my machine or IDE

lament scarab
#

You need to work out why the cds messages are being spat out

#

like, that is likely the issue here

#

it's bitching that the process pat out some command output it didn't expect

brave marsh
#
tasks.withType(AbstractRun::class) {
  javaLauncher = javaToolchains.launcherFor {
    vendor = JvmVendorSpec.JETBRAINS
    languageVersion = JavaLanguageVersion.of(21)

  }
  jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
}
#

is there something wrong here

lament scarab
#

I don't know

#

like, the issue is likely the cds warnings

brave marsh
#

u mean it has nothing to do with java version?

lament scarab
#

I mean, maybe jetbrains fucked up their package

brave marsh
lament scarab
#

So, yes, they did

#

but they're saying it's supposed to be fixed

brave marsh
#

what

lament scarab
brave marsh
#

where should I run those commands

#

in jdk path?

#
[0.442s][error][cds] Unable to create shared archive file C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin\server\classes.jsa: (I/O error).
[0.443s][error][cds] An error has occurred while writing the shared archive file.
lament scarab
#

it's an issue with the JBR runtime

#

so you'd need to go mess with its files in the .gradle folder

#

and if you want to regen them, you would need to directly run that runtime that is having issues

brave marsh
#
Execution failed for task ':runServer'.
> Failed to calculate the value of task ':runServer' property 'javaLauncher'.
   > Unable to download toolchain matching the requirements ({languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/b57d293a38ff8dec8d7ae748a8128e0e/redirect'.
      > Provisioned toolchain 'C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1' could not be probed: Unexpected command output: 
        [0.013s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
        [0.013s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
        [0.013s][warning][cds] C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules size has changed.
        GRADLE_PROBE_VALUE:C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1
        GRADLE_PROBE_VALUE:21.0.2
        GRADLE_PROBE_VALUE:JetBrains s.r.o.
        GRADLE_PROBE_VALUE:OpenJDK Runtime Environment
        GRADLE_PROBE_VALUE:21.0.2+13-b375.1
        GRADLE_PROBE_VALUE:OpenJDK 64-Bit Server VM
        GRADLE_PROBE_VALUE:21.0.2+13-b375.1
        GRADLE_PROBE_VALUE:JetBrains s.r.o.
        GRADLE_PROBE_VALUE:amd64
#

still same error 😦

#

but at least this time it downloaded something from the api link

lament scarab
#

I mean, it was downloading from there

#

the issue is that the jdk it's extracted from that is busted

merry terrace
grand niche
#

could you also share the log at /home/********/WorldEdit/worldedit-bukkit/adapters/adapter-1.18.2/.gradle/caches/paperweight/setupCache/decompileMinecraftServerJar.log ?

lament scarab
#

failed with exit code 137

#

137 is pretty much always an OOM

merry terrace
#

Hey so, uh, I am out of ram? It says I still have alot. : /

lament scarab
#

if you ran out of memory the log ther eisn't going to have anything interesting

#

well, 4G for the decompiler o.O

merry terrace
lament scarab
#

Command: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Xmx4G

merry terrace
#

Oh I meant to turn ping off sorry

lament scarab
#

No

merry terrace
merry terrace
lament scarab
#

4G of ram was given as the Xmx to the decompiler

#

that is ontop of the other parts of the building system

merry terrace
lament scarab
#

all I can tell you is that your machine ran out of memory

merry terrace
#

or it sounds like it

lament scarab
#

decompiling is not cheap

merry terrace
#

Fair

bronze willow
#

Is there a simple way to shade smth with paperweight?

distant mango
#

shadow

bronze willow
#

And then execute shadowJar instead of reobfJar?

#

wtf is this?
Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\.all\.projects\.private\Simple-Chals\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\derio\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.10.1\c293b2384ae12af74f407fa3aaa553bba4ac6763\tiny-remapper-0.10.1-fat.jar

distant mango
#

no you still use reobfJar

bronze willow
#

yeah if i execute reobfJar this happens

bronze willow
#

nvm

#

i did smth wrong configuring shadow

exotic ridge
paper kestrel
#
GitHub

currently to build, this requires my fork of sculptor installed to maven local.

GitHub

Hello. I know that Velocity is still improving its stability with Fabric modded servers, so I wanted to report another bug. There's a mod called MightyMail, which sends a config packet to clien...

lament scarab
#

mache is intended to poop out consumable bundles

#

it's cool that you can (ab)use it for other avenues but it's not a usecase we intend for

paper kestrel
#

modding as mojang intended

lament scarab
#

like, the goal is that, you don't touch mache as a tooling set, essentially; you consume the mache bundle and have some tooling elsewhere that deals with importing the bundle from mache into a useful source set in order to poop out your own useful stuff that you can shove into a mod; Not to say that this sorta thing isn't part of why I wanted mache for the client, just useful tooling for consuming it will generally be elsewhere

paper kestrel
#

yeah ik, and it can be a pain having compile patches and feature patches in that way in the same source tree, but at the moment its the easiest way for me to get a compiling and running minecraft source that i can verify has not had any changes from fabrics tooling etc (iirc both fabric and neoforge create a merged source set, when i just want to use client files to recreate the client jar, not that it should matter. they also both add client only annotations etc, and i cant be bothered to ensure thats the only change they make etc.)

#

also it feels better using mache-client as I hacked it in, so by golly im going to use it lmao

granite valve
#

@paper kestrel did you want to fix the resource pack issue for runClient?

#

idk how involved that is. probably have to download a bunch of assets from the version manifest or smth

paper kestrel
# granite valve <@324638236196601869> did you want to fix the resource pack issue for runClient?

sorry, i had i message in here i forgot to send lmao

The runClient seems to be missing all the resources from the resource pack, like textures and sounds. Also, it should be more explicit about what a user has to manually change in order to log in to the client correctly.

i think @bronze ember deemed the resources unnecessary for testing, and im not 100% sure how you can override these task's arguments with gradle.
if we get that working however, the user can specify --assetsDir to point to their .minecraft/assets folder (maybe as a default, as its a fair assumption they have minecraft with the offical launcher?), as well as --assetIndex to change what resource index.json is used (an int based on version. this could be automatically fetched (get the right name), but not downloaded without downloading the rest of the assets)
once the args are overridable, --accessToken should be possible to find in plain text in most launchers.

bronze ember
#

Yeah, adding a property for the asset dir or for client launch param seems like a good middle ground between launching the game and writing a whole fucking launcher

#

While for maches purposes in general the sounds are not necessary

#

(will look at your stuff tomorrow btw machine, coming down from a way too nice night, don't feel like using my brain today, lol)

fading vapor
#

Any way to improve this? No google search has answered my answer so far and I'm genuenly confused as the same project takes 1.5 seconds to start the daemon on my laptop

granite valve
#

lemme see how annoying it'd be to download all the stuff from the asset index from the manifest

paper kestrel
#

what im trying to do is move the args for the tasks into a property for mache extension

#

current issue I'm running into is the default value, particular for the runClient directory, as it needs a project directory context

#

target.layout.projectDirectory.dir("runClient").asFile.absolutePath,

granite valve
#

@paper kestrel so I got the downloading of the missing assets working (except idk anything about kotlin in terms of not doing the downloads in serial). Mind if I push it to your branch?

paper kestrel
#

not at all, go ahead :)

granite valve
#

done

paper kestrel
#

a note: the MinecraftVersionAssetsIndex can be replaced with a MinecraftDownload, since mojang have basically standardised that stuff between all the downloads i think

#

(and actually looks like the size field in that is currently unused, so would be basicaly identical the the one you made i think?)

#
target.tasks.getByName<ProcessResources>("processResources") {
                    dependsOn("downloadClientResources")
                }

doing this could be an issue because of how gradle only loads tasks that have an explicit thing in the configure step maybe? id have to check, but if it currently works i guess its fine?

granite valve
#

yeah, I did that to silence an issue about the download client resources task implicitly using an input for processResources

#

and the download obv. has to happen before resources are copied to build/resources/...

granite valve
#

oh wait, I was looking at the wrong one

#

its not exactly the same, but the 2 properties are the same

paper kestrel
#

the size property on the existing one isnt used either

#

ill push changes on my side, it should be fine

#

im trying to get async working atm

granite valve
#

I think I did

#
@TaskAction
    fun run() {
        val assetManifestResource: TextResource = project.resources.text.fromFile(assetsManifestFile)
        val mcVersionAssetManifest = json.decodeFromString<MinecraftVersionAssetsManifest>(assetManifestResource.asString())
        runBlocking {
            val deferreds = mcVersionAssetManifest.objects.map { (name, obj) ->
                val output = if (name.startsWith("icons/")) outputDir.file(name) else outputDir.file("assets/$name")
                output.convertToPath().parent.createDirectories()
                project.download.downloadAsync(
                    "https://resources.download.minecraft.net/${obj.hash.substring(0, 2)}/${obj.hash}",
                    output,
                    Hash(obj.hash, HashingAlgorithm.SHA1)
                ) {
                    println("Downloaded $name")
                }
            }
            deferreds.awaitAll()
        }

    }
#

I was missing the runBlocking {} thing

paper kestrel
#

ah ok cool

granite valve
#

I pushed

paper kestrel
#

my issue was converting from List<Defered> to vararg, but that makes sense

granite valve
#

yeah, theres an extension function apparently for List<Deferred>

#

so I think the stuff that should be configurable via the mache extension would be what, username, uuid, xuid (what is this), accessToken?

#

I guess have to specify maybe userType as well

paper kestrel
#

ive got args working (i think) ill push in a sec after ive tested it

#

xuid is xbox user id iirc

#

i think the logging of downloads could be a bit verbose

#

dunno if a progress bar is possible (x/y?)

#

i know gradle is terminally challenges with line stuff tho

granite valve
#

I played around with an (x/y), but I then only wanted to print smth if it was actually downloaded

#

and since it's async, the order is kinda wack and you don't know how many you have to download at the beginning, idk I don't really care that much

paper kestrel
#

having the asset dir download to the resources folder might be an issue, as they get bundled into the produced jar

#

might be worth having it be a mache internal directory, with the path argument pointing there

granite valve
#

oh that's true. didn't consider really ever dealing with a produced jar, just running from IDE

paper kestrel
#

ive pushed customisable args to the branch now

smoky violet
#

we should copy what vanillagradle does with checking common assets dirs (vanilla launcher, multimc, etc.)

paper kestrel
#

i mean downloading is already working, it just needs to be moved into a different cache folder

#

tho i agree it should be shared if possible

paper kestrel
#

@granite valve looks like the only reason those were loaded was because they got included in the jar by accident :/
i think the --assetsDirectory param expects it in the aa/aaaaaaaaaaaaa format

#

we can either do what it says, and download them in the format it wants (in a global directory maybe, since we need the asset index there too)

#

or use an existing launchers assets directory set

#

or maybe we can re-build the index to use the actual filenames, since we are downloading it per-version and wont have nameconflicts

granite valve
#

when you do runClient it doesn't make a jar

#

There is specific handling for when you provide an assetsDir and not an assetsIndex. If you provide the index, then it creates an indexed filesystem to workwith, othewise it just uses it directly

inland snow
#

How can i only publish the api package of a library to maven central?

granite valve
#

only create a publication in that specific module

#

if you are asking how to publish anything to maven central, there's a whole signup/approval process you have to go through. plenty of tutorials online for that

paper kestrel
inland snow
paper kestrel
brisk belfry
granite valve
#

@smoky violet would be be simple to make the runXxx tasks use the jetbrains runtime? I think lynx was saying to me that it supports more hot swap changes than other ones do.

bronze ember
#

But I guess you just did anyways, so doesn't really matter ^^

#

But I agree with jmp that we should check common mc install folders before downloading

pallid elbow
#

Why doth my fork's reobfJar after these paperweight updates no longer make me my jar in build/libs/

paper kestrel
#

Does build still make the jar?

pallid elbow
#

Either it writes the bundler jar somewhere else or it just doesn't

paper kestrel
#

Oh nvm

pallid elbow
#

file mod time is the last i built my fork out a weekish ago

prime cliff
pallid elbow
#

yeah, latest paper hash, updated paperweight, gradle

prime cliff
pallid elbow
#

yep cleanCache, applyPatches; though do have this now ```> Task :slice-server:reobfJar FROM-CACHE
Build cache key for task ':slice-server:reobfJar' is 71366bc093242a4b8073a6789e01f326
Task ':slice-server:reobfJar' is not up-to-date because:
Output property 'outputJar' file /home/cryptite/dev/Slice/slice-server/build/libs/slice-server-1.20.4-R0.1-SNAPSHOT-reobf.jar has been removed.
Loaded cache entry for task ':slice-server:reobfJar' with cache key 71366bc093242a4b8073a6789e01f326

#

all the steps say something to that effect

#

also tried removing the old existing jar but no dice

prime cliff
#

I expect the jar to be in Slice/build/libs/

main mica
#

Works fine for me when cloning the Slice repository. reobfJar creates its .jars in /Slice/slice-server/build/libs/, and the createReobf... tasks create one in /Slice/build/libs/, as expected. the server also seems to run properly
Latest Paperweight is 1.5.13, but it works with .12 too.
My guess would be something with your gradle is broken. maybe try running it without the cache (--no-build-cache) or deleting the cache. but the project itself seems fine

paper kestrel
#

but i had to specify 2x assets in the dirpath i think anyway

#

so i dont think the icons got used that way since different parent

#

(when otherwise they would

paper kestrel
#

gradle is pain

#

and so are launchers

paper kestrel
#

how much do we care about asset correctness? atm ive got it defaulting to checking hashes of the assets file, and ensuring all assets are intact (which is what we do if we get it locally)
but neither modrinth nor prism asset indexes match the hash for me: prism has a local cache of their metadata, which currently is an older version, so would be considered unsuitable to use

#

the actual differences is some slightly outdated translations i think

#

and modrinths is just... cursed

#

i think im being too harsh verifying

#

if i just verify that the asset index exists with an expected name, (12.json for 1.20.4 for example)

#

that should be ok? since it changes semi-freqently whenever translations change

smoky violet
#

that sounds fine to me

#

what does vanillagradle do

paper kestrel
#
GitHub

A toolchain for Minecraft: Java Edition that builds a workspace to interact with the game using the official mappings provided to the public by Mojang Studios. - SpongePowered/VanillaGradle

smoky violet
#

checking for the correct index json seems fine then

#

when we have to download them ourselves should probably include some logic to configure how often it checks for asset updates

paper kestrel
#

it uses the same 4 hour cache as everything else i think

#

ive pushed my changes, including the checking other launchers

#

im not 100% sure the properties were done in the best way possible, but gradle stages is pain so

#

¯_(ツ)_/¯

#

it needs to be tested on windows, and ideally macos (but windows is the important one, due to path differences i think)

gleaming copper
#

I'm trying to build the javadocs locally with ./gradlew javadoc but somethings going wrong. I haven't modified anything in the project so wondering if this is happening for anyone else?

$ java --version
openjdk 22 2024-03-19
OpenJDK Runtime Environment Temurin-22+36 (build 22+36)
OpenJDK 64-Bit Server VM Temurin-22+36 (build 22+36, mixed mode)

Terminal output: https://pastebin.com/tLHSXsE1

distant mango
#

have you done applyPatches first

lament scarab
#

make sure that you actually applied the patches

gleaming copper
#

oh, I'm new to this, didn't realise. I'll try again. Thank you.

#

I've built the jar with ./gradlew applyPatches && ./gradlew createReobfBundlerJar which was successful but after running ./gradlew javadoc I get the same error.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper-server:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/jai/Projects/Paper/Paper-Server/build/tmp/javadoc/javadoc.options'

Seems like a very generic error.

https://pastebin.com/VftBdGKC

lament scarab
#

you need to run javadoc only on paper-api

#

the thing blows up on the server for some reason

gleaming copper
#

that seems to have worked, thank you :)

molten ravine
#

PS C:\Users\liams\OneDrive\Desktop\Coding\froglight> ./gradlew applyPatches

Configure project :
paperweight-core v1.5.13 (running on 'Windows 10')

Task :applyApiPatches
Resetting Paper-API to Spigot-API...

Task :applyApiPatches FAILED

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

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentatio
n.

BUILD FAILED in 52s
4 actionable tasks: 2 executed, 2 up-to-date

#

@distant mango

prime cliff
molten ravine
#

and idk it leaks my name. but thats my birthname and im trans and shit so dont affect me

prime cliff
molten ravine
molten ravine
prime cliff
#

Just move it to C:\froglight
and try again.

molten ravine
brisk belfry
#

Well if it’s paper the best would be to have it on wsl

prime cliff
brisk belfry
#

Alright

prime cliff
#

If the whole process takes a lot follow Noah's recommendation with wsl.

molten ravine
#

what does wsl stand for again?

distant mango
#

windows subsystem for linux

molten ravine
#

io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upst
ream/upstream

#

this seems like the true error

#

its now in c:

lament scarab
#

try a fresh clone if you've not already

#

otherwise, see the full output to see if there is anything useful in there

molten ravine
#

i mean i might try again the cloned project just finished building

lament scarab
#

scroll up

molten ravine
#

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

#

would this be an issue?

lament scarab
#

no

molten ravine
#

ok

#

PS C:\froglight> ./gradlew applyPatches

Configure project :
paperweight-core v1.5.13 (running on 'Windows 10')

Task :applyApiPatches
Resetting Paper-API to Spigot-API...

Task :applyApiPatches FAILED

FAILURE: Build failed with an exception.

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

io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upst
ream/upstream

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

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

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

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentatio
n.

BUILD FAILED in 1m 5s
4 actionable tasks: 2 executed, 2 up-to-date

#

@lament scarab this is all

lament scarab
#

No idea

molten ravine
#

i wanna just fork paper and remove two patches thats all.

#

it might be a git error

distant mango
#

do you have your git user and email set

lament scarab
#

if it was unset it would generally explictly scream that in the command output

molten ravine
paper kestrel
paper kestrel
static urchin
lament scarab
#

Afaik you can’t access those files without a headache, and so, well

static urchin
#

Actually, we delete them after the pipeline KEKW

#
cleanup:
  name: Cleanup
  runs-on: ubuntu-latest
  needs:
    - verify
    - update
    - applyPatches
    - build
  if: always()
  steps:
    - uses: geekyeggo/delete-artifact@v5
      with:
        name: patched-sources
paper kestrel
#

ah i didnt look that far lmao

remote mirage
golden seal
remote mirage
#

ı try this but dont saved @golden seal

lament scarab
#

Read the info above that

remote mirage
#

okey

lament scarab
#

Like, the full thing; that truncated snippet looks like a typical misconfig

remote mirage
#

@lament scarab ı try ./gradlew rebuildPatches

#

and other err

lament scarab
#

Just reapply the patches

remote mirage
lament scarab
#

Just apply patches

#

As per the read me

#

Redo the step that failed

remote mirage
#

ı try same command and ı get some problem

lament scarab
#

I can’t help you

remote mirage
golden seal
#

because it literally tells you what to do

lament scarab
#

Because the issue and the solution is literally right on your screen

golden seal
#

if you can't follow what it wants you to do then we can't help you

#

like it's literally giving you commands to run

lament scarab
#

If you can’t follow that, as I alreadt pointed you to, I can’t help you

remote mirage
#

ım sory but ım not using gradle in before

golden seal
#

it has nothing to do with gradle

#

read

#

literally says what it wants from you

#

and how it wants it from you

remote mirage
#

login

#

Is the problem solved that easily?

golden seal
#

yes

#

just read

remote mirage
#

huh okey

golden seal
#

it is spoonfeeding you the answer

remote mirage
#

I'm sorry for making you tired

rancid oak
#

Hey
Got this error

Caused by: java.lang.RuntimeException: Operation has non zero exit code: 1
    at paper.libs.codechicken.diffpatch.cli.CliOperation$Result.throwOnError(CliOperation.java:55)
    at io.papermc.paperweight.userdev.internal.setup.step.ApplyDevBundlePatches.run(ApplyDevBundlePatches.kt:75)
    ... 165 more```

When i look to the logs i got this
```Patching: net/minecraft/server/network/LegacyQueryHandler.java
 Hunk 0: EXACT: @@ -12,81 +12,135 @@
 Hunk 1: FAILURE: @@ -94,20 +148,108 @@
 Hunk 2: EXACT: @@ -115,9 +257,10 @@```
and this
```Patching: net/minecraft/server/level/ChunkMap.java
 Hunk 0: EXACT: @@ -1,11 +1,13 @@
 Hunk 1: EXACT: @@ -19,16 +21,18 @@
 Hunk 2: EXACT: @@ -39,6 +43,7 @@
 Hunk 3: EXACT: @@ -51,6 +56,7 @@
 Hunk 4: EXACT: @@ -84,9 +90,11 @@
 Hunk 5: EXACT: @@ -95,7 +103,12 @@
 Hunk 6: EXACT: @@ -106,84 +119,237 @@
 Hunk 7: EXACT: @@ -197,37 +363,75 @@
 Hunk 8: FAILURE: @@ -236,382 +440,162 @@
 Hunk 9: EXACT: @@ -619,172 +603,117 @@
 Hunk 10: EXACT: @@ -792,226 +721,248 @@
 Hunk 11: EXACT: @@ -1019,12 +970,13 @@
 Hunk 12: EXACT: @@ -1033,218 +985,283 @@
 Hunk 13: EXACT: @@ -1260,23 +1277,18 @@
 Hunk 14: EXACT: @@ -1287,77 +1299,148 @@
 Hunk 15: EXACT: @@ -1367,9 +1450,13 @@
 Hunk 16: EXACT: @@ -1379,9 +1466,14 @@```

I wonder if there's a way to debug this ?
lament scarab
#

debug is generally "work out how the tool works and look at the diff to see why it failed"

#

outside of that, the general common failure point people have is using ancient builds of paperweight

rancid oak
#

I've tried many things before asking here, i don't want take your time for nothing

lament scarab
#

No, you set the version of paperweight inside of your build config

rancid oak
# lament scarab No, you set the version of paperweight inside of your build config

I don't know if that's the problem, I've got one working project where there's no error code and another that doesn't work.
I tried to see with my project config if everything was OK, and everything seems to be OK.
Wouldn't there be something to remove that would cause problems?
Ex: last time I had a problem, I deleted the .gradle folder and managed to fix it.
Isn't there a folder somewhere else that I could delete to refresh the files?

lament scarab
#

I mean, you'd generally just yeet the folder; it's not a case of "refreshing the files", it crapped itself doing that

#

but, debugging this stuff is generally non-trivial, but, the version of PW would be the first port of call considering recent changes

#

I don't know your setup, etc

rancid oak
#

Thank you for your reply
The problem came from updating paperweight.
I don't know why one of my projects was working but not the other (same config).
Thanks for taking the time to reply

winged coral
#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>ir.wylot</groupId>
    <artifactId>Refinery</artifactId>
    <version>1.0-B8</version>
    <packaging>jar</packaging>

    <name>Refinery</name>

    <properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>papermc</id>
            <url>"https://repo.papermc.io/repository/maven-public/"</url>
        </repository>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.bstats</groupId>
            <artifactId>bstats-bukkit</artifactId>
            <version>3.0.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.20.4-R0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>me.lucko</groupId>
            <artifactId>spark-api</artifactId>
            <version>0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
#

update: fixed, problem was from repository url

lament scarab
#

yea, I just noitced, was looking at the errors, brain just wandered over the " until I read the actual error and was like "wait..."

#

org.eclipse.aether.transfer.NoTransporterException: Unsupported transport protocol "https

#

So glad maven hides that information...

quiet axle
#

anyone know what the f is going on here?

Could not create task ':runMojangMappedServer'.
Could not create task of type 'RunServer'.
Could not create an instance of type xyz.jpenilla.runtask.pluginsapi.DownloadPluginsSpec.
Could not generate a decorated class for type DownloadPluginsSpec.
orchid swift
#

is paper-server-userdev the jar that you compile against for NMS and API access?

#

not trying to do anything in particular just wrapping my head around the internal operations of paperweight-userdev

harsh ore
#

Hey hopefully someone can help.
I am using Jpenilla's Resource Factories for my plugins. I just wanted to do the same for our Velocity plugin, however I am getting this error:
- In plugin 'xyz.jpenilla.resourcefactory.ResourceFactoryPlugin$Inject' type 'xyz.jpenilla.resourcefactory.ExecuteResourceFactories' property 'factories.$0.value.main' doesn't have a configured value.

however this is in my gradle:

velocityPluginJson {
    main = "lol.simeon.piervelocity.PierVelocity"
}```

Also, I am getting `java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics` when my Plugin starts up, I tried implementing kotlin("stdlib") but that did not work. I am using Jpenilla's run Task
verbal skiff
#

try the shadow plugin

harsh ore
#

well I have shadow but it doesn't get called when I use the run task

verbal skiff
#

use runShadow

#

oh wait

harsh ore
verbal skiff
#

it might be more appropriate to ask in a community for that specific project

#

i dont know if youll get a good answer here

harsh ore
#

I mean JMP is the maker of it

#

I hoped he would see it

verbal skiff
lament scarab
#

I mean, it's a classpath configuration issue

harsh ore
#

it just doesn't work in velocity for some reason

lament scarab
#

work out why it's not in the classpath

harsh ore
#

a suggestion how?
these are my deps:

plugins {
    kotlin("jvm") version "1.9.23"
    kotlin("kapt") version "1.9.23"
    alias(libs.plugins.shadow)
    alias(libs.plugins.runTask)
}

dependencies {
    implementation(libs.ansi)
    implementation(libs.bundles.configurate)
    implementation(kotlin("stdlib"))

    compileOnly(libs.api)
    kapt(libs.api)
}```
lament scarab
#

I can't really advise on the info I can see, and, sunday

harsh ore
#

oof :/ you think we could somehow get jmp's attention? I would really like to get this going

#

I just double checked on our server, when I upload the plugin it works fine.
So it must be an issue between run-task and shadow

verbal skiff
distant mango
#

send your full build script

echo kilnBOT
#

Please send large files/logs to a pastebin

distant mango
#

use run-task snapshot version or switch to the original shadow

#

(for the shading error)

#

also try using 1.1.1 of resourcefactory?

prime cliff
#

Paper needs to migrate in 1.20.5 anyways to support java 21 for shadowJar.

distant mango
#

?

olive current
#

Probably a new version of shadowJar requiring java 21?

static urchin
#

Well sweating

distant mango
#

the original shadowjar doesn't really support java 21

#

but the question mark was bc I didn't understand Yannick's comment or rather the relevance

whole obsidian
prime cliff
distant mango
#

yes i know

prime cliff
#

And my initial comment was the shortened version. 🙂

brisk belfry
#

i just re-cloned my paper repo (WSL) and when I open it in intelliJ it starts configuring the project. This seems to work at first sight but then it suddenly tries to resolve C:\user\lib\jvm.... Did someone have the same issue lately? Applying patches works perfectly fine to but it just doesn't want to finish setup.

smoky violet
harsh ore
#

the first is my build gradle the second one is my versions toml

harsh ore
#

okay I just upgraded to 1.1.1 of the resource factory and its still causing the issue

smoky violet
#

the one linked there does not use resource factory

harsh ore
#

oh yea wait, I removed it since It was causing issues. One moment

smoky violet
#

are you sure you didn't include something extra when it was broken

#

because that builds with no issues

brisk belfry
harsh ore
#

hmmm. nope but let me try restarting my pc maybe Intellij is just being stupid

distant mango
harsh ore
#

weird, restarting did not help, but yeeting the .gradle and build folder did.
The Kotlin instristics error still remains

#

its probably caused by the version of shadow I am using

#

however using the one from john won't work since our whole network works on java 21

brisk belfry
#

with the wsl java 17 as my gradle jdk

brisk belfry
#

I tried cloning a gradle project (with userdev) as well and it did configure successfully. The only projects that didn’t work was paper and paperweight (both fresh clones)

brisk belfry
lament scarab
#

failed with exit code 137

#

probably ran out of memory

brisk belfry
#

makes sense on this dogshit laptop...

#

thanks

#

it just worked before without problems thats why i was confused

north geyser
#

how would i use shadowJar with jitpack?

#

i got this:

#

although, i get this error:

#

i need to include all the dependencies in the jitpack source

smoky violet
#

solution: don't use jitpack

north geyser
raven barn
#

just host a repo yourself

#

reposilite is my personal favorite

lament scarab
#

deploy your own repo or look towards maven central or something like codemc, depending on needs

smoky violet
#

also only the second to last line of that create block should be needed

#

this is also one of the many reasons I do not recommened changing output locations to gradle newcomers

north geyser
#

how do i deploy it?

#

i got the panel workin

raven barn
#

i see no issue

north geyser
#

how do i deploy it to reposilite?

#

the jar

raven barn
#

oh you have to add a plugin like gradle publish

north geyser
#

i followed the wiki about this far:

#

doesn't seem to do anything doe

raven barn
#

here is a kts example

plugins {
    id("maven-publish")
}

publishing {
    publications.create<MavenPublication>("maven") {
        from(components["java"])
    }
    repositories.maven {
        val branch = if (version.toString().contains("-pre")) "snapshots" else "releases"
        url = uri("https://yourrepohost/$branch")
        credentials {
            if (extra.has("RELEASES_USER"))
                username = extra["RELEASES_USER"].toString()
            if (extra.has("RELEASES_PASSWORD"))
                password = extra["RELEASES_PASSWORD"].toString()
        }
    }
}
raven barn
north geyser
#

ye

raven barn
#

add your secrets to github

north geyser
#

already did

raven barn
#

then it should work when pushing to github

north geyser
#

well wtf am i doing wrong 🤦‍♂️

#

the name should be admin and the password should be the token right?

raven barn
#

although i would recommend you using on release instead of push

north geyser
#

hmm

#

it doesn't error

#

so it should but it ain't showing up in the dashboard

raven barn
#

you added your keys under security > actions > org/repo secrets right ?

brisk belfry
raven barn
#

do you even use gradle in your plugin

north geyser
#

ye

#

using this:

#

or do i have to add the credentials to gradle too?

raven barn
#

you dont publish anything

north geyser
#

😭

raven barn
#

you are missing the entire repo section

north geyser
#

what's extra?

raven barn
#

bascicly env variables

north geyser
#

ohh

smoky violet
#

you don't need to do that manually

raven barn
#

no wait dont use those

#

extra is local gradle properties

north geyser
#

ah

raven barn
#

use System.getenv instead

smoky violet
#

no

#

use PasswordCredentials

raven barn
#

do what jmp says

#

looks way better

north geyser
#

hm

#

so i do this in GRADLE_HOME/gradle.properties?

raven barn
#

if you want to only publish using your gh workflow then no

north geyser
#

RIGHTT

#

mb

#

but that's somewhat correct?

raven barn
#

when using my approach yep

#

i just heared of password credentials and they seem better then env variables

smoky violet
#

it's basically just setting up gradle properties for you based on the repo name

north geyser
#

so like this?

#

oops

#

wrong env var

#

but

#

you get it

raven barn
#

you want to publish to localhost ?

north geyser
#

rn yeah

raven barn
#

then just use maven local

north geyser
#

how do i do that

raven barn
#

as long as you dont have a public repo

north geyser
#

the repo is public on github

raven barn
north geyser
#

ah

#

but how would i use shadowJar like this?

#

i need to include all the dependencies inside the maven jar

raven barn
#

its a repo you dont provide fat jars

north geyser
#

hmm

#

i need my other projects that compile this one to have access to the dependencies

raven barn
#

your maven config is published as well so all depends are included

north geyser
#

ah okay

#

do i remove the credentials

#

if i do mavenlocal

raven barn
#

maven local is not reposilite

#

maven local is your .m2 folder

north geyser
#

ohh

#

so how would i compileOnly the local project then?

#

in another project

distant mango
#

compileOnly("group:artifact:version")

raven barn
#

you add mavenLocal to your repositories (in kts)
and then the dependency notation

raven barn
north geyser
distant mango
#

did you publish it to your maven local

north geyser
#

yeah

distant mango
#

check your maven local

#

~/.m2/repositories iirc

north geyser
#

its there

distant mango
#

did you add maven local to your repositories

north geyser
#

no

#

💀

#

what's the repo?

raven barn
#

mavenLocal()

distant mango
#

mavenLocal()

raven barn
#

thats it

north geyser
#

i c

#

although it doesn't contain any of the dependencies

#

its just my code

distant mango
#

that's how it works yes

raven barn
#

you dont directly provide dependecies in a repo

distant mango
#

they're added as transatives

#

(if you marked them as api or compileOnlyApi)

north geyser
#

yeah i need to include these into the repo:

north geyser
distant mango
#

you don't add them yourself

raven barn
#

if you are using paper most likely not

distant mango
#

they're transatives

#

it'll automatically download them

raven barn
#

transistive*

north geyser
#

but i dont have access to them?

raven barn
#

you do but they are not in the jar

raven barn
north geyser
#

hm

#

i have this

north geyser
#

i dont have access to anything

north geyser
#

in the main repo i have to set them as api?

raven barn
#

wasnt api deprecated ages ago ?

#

using gradle 8.7

north geyser
#

ohhhhhhhhhh

#

i understand now

#

actually thanks so much

#

i'm kinda dumb yk

#

💀

distant mango
#

you need to add the java-library plugin

novel knoll
#

@hollow condor into takes a directory, not a file, apart from that, care to provide a build scan?

hollow condor
novel knoll
smoky violet
#

unless you have a specific reason you need finalizedBy it's generally better to use normal depends

keen pelican
#

is there somehow a way to make a run configuration to run a server in dev workspace instead of the runServer gradle task?

quaint raven
#

why not the runServer gradle task?

keen pelican
lament scarab
#

I mean, yes

#

you use the runServer task through the debug option

#

IJ already hijacks gradles thing and injects in some stuff to make it attach its debugger

keen pelican
remote mortar
#

does anyone know the task that gets the generated sources jar

lament scarab
#

well, do note that if you're using things like relocations you'll generally break the debigger as classes won't line up

remote mortar
remote mortar
#

i register a package sources task and add it to publish, but then some non-existent generateMetadataFileForMavenPublication task needs to depend on it,
when i try and do tasks.getByPath it says it cant find it, then when i try and register it, it exists

tasks.register("packageSources", Jar::class) {
    dependsOn("classes")
    from(sourceSets["main"].allSource)
    archiveClassifier = "sources"
}

configure<PublishingExtension> {
    publications.create<MavenPublication>("maven") {
        from(components["java"])
        artifact(tasks.javadoc)
        artifact(tasks.getByName("packageSources"))
    }
}
static urchin
#

isn't there just java { withSourcesJar() } ? iirc properly adds it to the java component

#

same goes for javadoc

remote mortar
#

there is but you cant use it as an artifact

smoky violet
#

wdym

#

are you trying to include generated sources from an annotation processor or what

remote mortar
static urchin
#

no

#

it goes into the java block/extension

#

not into your publications

smoky violet
#

from(components["java"]) is all you need in the publication

#

when you use java.with[Sources/Javadoc]Jar it goes into the component

static urchin
#

withSourceJar adds it to those components ^

remote mortar
#

it is, its still not publishing the sources jar

static urchin
#

sources are not on that level?

#

that is top level group+artefact

remote mortar
#

holdup

#

omfg

#

i need to sleep more often

static urchin
#

probably

remote mortar
#

now to sort out this horrid naming convention

raw vessel
#

I'm getting this error on paperweight 1.5.15 with paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT"). Gradle version is 8.1.1.

Failed to apply dev bundle patches. See the log file at '/Users/pixeldev/Workspace/revenge-ntw/akardoo/tesseract/plugin/.gradle/caches/paperweight/setupCache/patchedSourcesJar.log' for more details. Usually, the issue is with the dev bundle itself, and not the userdev project.
Failed to apply dev bundle patches. See the log file at '/Users/pixeldev/Workspace/revenge-ntw/akardoo/tesseract/plugin/.gradle/caches/paperweight/setupCache/patchedSourcesJar.log' for more details. Usually, the issue is with the dev bundle itself, and not the userdev project.
Invalid context line in 'net/minecraft/world/entity/ai/behavior/ShufflingList.java.patch' at 1:'diff: unrecognized option `--color=never''
brave widgetBOT
smoky violet
#

your patch files are literally diff errors

#

your bundle is invalid

#

did you pass --ignore-unsupported-environment when generating the bundle?

raw vessel
smoky violet
#

doing so is what would allow an invalid bundle to generate on latest pw

raw vessel
#

I'm not creating my own fork or something like that

#

I'm trying to use paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")

orchid swift
#

day 3 of trying to get remapping to work in scala

#

gradle was a failure so i think i will be trying to dissect paperweight and turn it into sbt

orchid swift
#

control flow: all over the place

#

i am struggling to follow

bitter linden
#

What's the equivalent to this when replacing reobfJar? Since we shouldnt use reobfJar anymore

  reobfJar {
  outputJar.set(layout.buildDirectory.file("libs/test.jar"))
  }
smoky violet
#

you just configure the jar or shadowJar

brave socket
#

for some reason any time i include my library in my project i get "Unsupported class file major version 65"

#

but my lib is set to compile on j21

#

am i doing somethign wrong?

orchid swift
#

wait is paper switching to mojmap at runtime?

static urchin
#

Yes

orchid swift
#

neat

brave socket
#

so ive remade my lib using gradle

#

and i did a local publish but i cant import anything?

#

ah found my issue

#

typo in publish xd

#

still getting that "Unsupported class file major version 65" though..

#

hmm

#

shadowJar fails but build doesnt..?

cinder ember
#

Someone said building?

void badge
echo kilnBOT
#
__There Is No ETA__

Updates to Paper do not have any sort of estimate for when they release, ever. Any and all updates will arrive when they are ready, and the only thing to do is wait for them patiently along with everyone else.

keen tartan
#

hi, does anyone know whether it's possible to run paperweight without any internet? e.g. cache the currently checked out paper repo?

#

i'd like to be able to work on paper stuff while on the go

smoky violet
#

no

#

please open an issue with what issues you run into without internet, we can look into supporting gradle's --offline-mode flag

keen tartan
#

is there any good reason for that? or would it be something i can pr in?

#

ahhh awesom

keen tartan
median pulsar
keen tartan
#

ooo

#

lemme see if that works

median pulsar
#

(i havent tried it, just saw it being used for building gradle projects in environments with no internet)

smoky violet
#

I'm working on some paperweight changes

#

gonna hit the obvious areas but I might miss something

#

I feel like that might be enough to get it working offline once you have everything cached

#

with --offline-mode ofc

keen tartan
#

will that change make it into paper 1.20.5/6 release?

smoky violet
#

it'll be in paperweight 1.6.1

#

1.6.0 works good enough for the release but there's some stuff we want to fix soonish anyway

keen tartan
#

i forgot whether I need to keep paperweight in sync

#

with upstream

#

in a fork

smoky violet
#

you do

#

userdev is where you always want latest

keen tartan
#

ah so potentially 1.6.1 it won't be in 1205/6 release?

smoky violet
#

it's not set in stone

#

it'll probably be soon though either way

median pulsar
smoky violet
#

you need to explain what you are doing

median pulsar
#

i will get a minimal reproduction example

smoky violet
#

it looks kind of like code that isn't updated though

#

(plugin code)

orchid swift
#

w/ the change in mappings at runtime will i be able to yoink a remapped server jar from a paperweight gradle project and link my non-gradle project against that

smoky violet
#

you can do what you want, I barely have time to deal with supported configurations as is

#

same as with the maven plugin someone made

orchid swift
#

the question was "does that work" not "will i get help for it"

smoky violet
#

the dev bundle works for userdev and the maven plugin so clearly it's possible

orchid swift
#

no need to implement my own reobfuscation in not-gradle w/ new changes?

smoky violet
#

if you are exclusively targetting paper you don't need to remap, but set the manifest attribute

orchid swift
#

no i did not

#

i will read them

echo kilnBOT
#
__There Is No ETA__

Updates to Paper do not have any sort of estimate for when they release, ever. Any and all updates will arrive when they are ready, and the only thing to do is wait for them patiently along with everyone else.

void badge
#

Hey, I'm facing an issue with paperweight 1.6.0

Here is the error message presented when running gradle assemble

> io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: /home/foxikle/IdeaProjects/CustomNPCs/v1_20_R1/.gradle/caches/paperweight/taskCache/reobfJar.log Classpath: /home/foxikle/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.6/a584208ddeebec2eb210aaa2a6f8622052c07132/tiny-remapper-0.8.6-fat.jar

Here is the reobfJar.log that gradle produced.
https://paste.insprill.net/s6hZN

Potentially Helpful Details:

  • Gradle 8.7
  • JDK 21
  • Its a multi-module project

Module build.gradle.kts: https://paste.insprill.net/FOzeI

Parent build.gradle.kts: https://paste.insprill.net/BO8UZ

Please ping me if you can help, thanks <3

smoky violet
#

when using old dev bundles you will need to target a java version their remapper supports

#

you can use jdk 21 just fine, but set options.release to 17 on the compile task for the project

#

you could also add a newer tiny-remapper to the remapper configuration actually

#

like 0.10.2

#

from paper: remapper("net.fabricmc:tiny-remapper:0.10.2:fat")

#

in dependencies

#

well actually that might break things... if it works then it works, otherwise you would need to swap the remapper only for reobfJar

#

since the way I shared just now will also change it for the dev bundle pipeline

void badge
slate salmon
#

Does ShadowJar not work on Java 21 or is there a version I haven't seen yet?

#

Using 8.1.1 by the way

lament scarab
#

there is an updated fork

slate salmon
#

Thanks, seems to work

slate salmon
#

Is there a way to change the paperweight-mappings-namespace manifest value when using the shadowJar task with paperweight-userdev?
Because doing it the usual way doesn't seem to work and the value will always be mojang+yarn, no matter what I try.

smoky violet
#

... what are you trying to change it to

slate salmon
#

Well, spigot because of dependencies which are not mojang mapped but shaded into my plugin

smoky violet
#

but presumably your code is mojang mapped since you are using userdev

#

so that would break your code when it tries to remap

#

you should ask lib authors to publish mojang mapped variants and use those, then your shadowjar is mojang and reobf works normally

#

otherwise you could do some custom gradle setup to combine the dependencies in after reobfJar instead of before

vapid helm
#

How am I supposed to add this:
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
to my build.gradle? Currently i have this,

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

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

dependencies {
    implementation project(':abstraction')

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

But it gives me the error

* What went wrong:
A problem occurred evaluating project ':paper'.
> No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration
smoky violet
#

@vapid helm is it io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion.MOJANG_PRODUCTION in groovy?

#

if so I will need to fix that

#

and please open an issue on the paperweight repo

vapid helm
#

yes this worked

#

ok will do that now

smoky violet
#

ty I have to head out for a bit

#

will fix that for 1.6.3 tho

pastel glade
#

Hello! I'm trying to apply patches on my purpur (latest commit from ver/1.20.4) fork, but this error occurs. How to solve it?

Applying: Setup Gradle project
Applying: Remap fixes
Applying: Build system changes
Applying: Test changes
Applying: Paper config files
Applying: MC Dev fixes
Applying: ConcurrentUtil
Applying: CB fixes
Applying: MC Utils
Patch failed at 0009 MC Utils
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: invalid object 100644 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4 for 'src/main/java/com/mojang/logging/LogUtils.java'

error: Repository lacks necessary blobs to fall back on 3-way merge.
hint: Use 'git am --show-current-patch=diff' to see the failed patch```
glass warren
distant mango
#

Do you need to do anything special for run-task to use the moj mapped jar?

#

oh wait wrong task

dawn marten
vapid helm
#

looks like the userdev plugin is quite resource hungry... its crashing my build server :( Anything I can do to make it compile?

jenkins@a6f561014931$ free -m
               total        used        free      shared  buff/cache   available
Mem:            7944        3608        3978         135         746        4336
Swap:              0           0           0
jenkins@a6f561014931$ JAVA_HOME=~/jdks/jdk-21.0.3 ./gradlew shadowJar                                                                                                                                                  
:executing 'decompile transformed minecraft server jar'

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':paper:compileJava'.
> Could not resolve all dependencies for configuration ':paper:compileClasspath'.
   > Execution of 'org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler' failed with exit code 137. Log file: /var/jenkins_home/workspace/plugin/paper/.gradle/caches/paperweight/setupCache/decompileMinecraftServerJar.log Classpath: /var/jenkins_home/.gradle/caches/modules-2/files-2.1/org.vineflower/vineflower/1.10.1/4f48c5947b21f9ebc743e7c80215ee839d3dc668/vineflower-1.10.1.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 2m 23s
#

it seems to need more than 4GiB.. how much does it actually need? Is there a way to limit the memory?

smoky violet
#

decompile shouldn't be running in CI

#

it checks for the CI system property being true

#

and it needs about 4.5gb total, the decompile jvm needs 4gb and the gradle jvm needs 512m

#

but again that means only 512m needed on properly configured CI

vapid helm
smoky violet
#

when it is, decompile is skipped

#

decompile is so you can see paper sources in-ide

vapid helm
#

okay that makes sense

#

it works now, thank you

smoky violet
#

yw

autumn trout
#

idk if this the right place but someone please help i have never used gradle before and i cant fix this no matter what i do 😭

> A build operation failed.
      Could not move temporary workspace (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06-415aeaf4-df1b-492b-ba55-99e781a8daa1) to immutable location (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06)
> Could not move temporary workspace (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06-415aeaf4-df1b-492b-ba55-99e781a8daa1) to immutable location (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06)```
heres the full stack trace: https://paste.gg/p/anonymous/91f0902f630d47d9954c6cf1e8a13e2f
autumn trout
#

nvm found something written in korean saying to use gradle 8.5 and it worked

misty heath
#

ok, this is probably a really easy fix, but i dont get how to make sdk version and language level like each other:
error: invalid target release: 1.21.2

SDK 21 is not compatible with the module CustomSwords language level 21 in chosen run configuration CustomSwords package.

Change the version of JRE in the Maven Run Configuration

lament scarab
#

I mean

#

they represent two entirely different things

#

and we got away from 1. many eons ago

misty heath
#

uh so for some reason maven was set to java version 1.8, which didnt allow my switch loop

#

but in project structure my project uses sdk21 and language level 21

lament scarab
#

Make sure that your stuff is actually set to java 21, not 1.21

misty heath
#

oh

#

same exact error

lament scarab
#

you'd need to work out why it's setting an invalid version

misty heath
#

i have no idea lol

#

i have the Maven Run Configuration Java version set to Project default

lament scarab
#

if you want people to look you'd need to share your build config, I can't say much more

#

(and, I'm going to go do my morning routine)

misty heath
lament scarab
#

the pom

misty heath
brave widgetBOT
lament scarab
#

you don't put the sdk version inside of there

#

you put the language level

misty heath
#

oh, so just "21"?

lament scarab
#

yes

misty heath
#

it worked as intended, tysm

proud sinew
#

hi, i got this error when i am trying to build my prject

https://pastebin.com/HFHefXap

build.gradle
https://pastebin.com/ibjA2Hqw

proud sinew
#

i write this and i got this error again

lament scarab
#

that doesn't set the JVM that the thing runs with

#

you'd need to set the toolchain for that

proud sinew
#

i also have toolchain

lament scarab
#

or, well, maybe it should, eer, idk

#

all I can see is that it hit java code it didn't know how to deal with

#

you can also just update the remapper as he said

proud sinew
#

it doesn't works :(

#

i have this in deps

proud sinew
#

any ideas?

left imp
atomic hamlet
#

@lament scarab could you please merge bungee upstream to waterfall?

#

nvm your name is no ping

#

i realized after i pinged you

#

im sorry lmao

lament scarab
#

done, but, do note that

  1. 1.21 is probably not happening
  2. This is the channel for help with build tooling
pastel glade
# pastel glade Hello! I'm trying to apply patches on my purpur (latest commit from ver/1.20.4) ...

Same problem with clean Paper from ver/1.20.4

I'm using Ubuntu 22.04 from WSL2

Creating Paper-Server from remapped source...
Importing 255 classes from vanilla...
Importing 5 data files from vanilla...
Importing 1 classes from library sources...
Applying patches to Paper-Server...
Applying: Setup Gradle project
Applying: Remap fixes
Applying: Build system changes
Applying: Test changes
Applying: Paper config files
Applying: MC Dev fixes
Applying: ConcurrentUtil
Applying: CB fixes
Applying: MC Utils
error: invalid object 100644 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4 for 'src/main/java/com/mojang/logging/LogUtils.java'
Patch failed at 0009 MC Utils
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: Repository lacks necessary blobs to fall back on 3-way merge.
hint: Use 'git am --show-current-patch=diff' to see the failed patch```
main mica
#

See why that patch fails and fix it's conflicts I guess?

#

And of course make sure paperweight is up-to-date and that the other dependency versions in your fork (remapper, decompiler and so on) match the one used in Paper 1.20.4

pastel glade
#

This happens even on a clean Paper without any changes, I suspect it may be related to some kind of problem in the system, but I do not know how to look for it

lament scarab
#

it's probably a java version thing

left imp
lament scarab
#

I mean, that is 100% java version related

pastel glade
lament scarab
#

I mean, the thing failed to apply the patch, you'd need to work out why

#

i.e. go look at that file

pastel glade
#

There is simply no file (src/main/java/com/mojang/logging/LogUtils.java), and I just noticed another problem.

SHA1 hash of downloaded file '/root/IdeaProjects/Paper/.gradle/caches/paperweight/mappings/server_mappings.txt' does not match what was expected! (expected: 'c1cafe916dd8b58ed1fe0564fc8f786885224e62', got: '14be97974a77b09eb8bca88ed9268445f0fde3e7')
Re-attempting download once before giving up.```
lament scarab
#

if theres no LogUtils file then something is cursed with your setup and I cannot offer support

#

outside of "make sure you're not running on some broken FS", MahiruShrug

pastel glade
#

Fixed it by reinstalling ubuntu

agile coral
brave widgetBOT
smoky violet
#

does it build with ./gradlew build

agile coral
#

Yes

smoky violet
#

probably just need to use the repair ide option

#

and or set a newer jdk for the project

agile coral
#

The JDK is fresh installed, but I am working my way through the IDE repair steps.

#

Unfortunately, still nothing. Even removed the dev bundle dependency and then added it back. I'll keep working at it, though.

smoky violet
#

idea is a pain like that sometimes

agile coral
#

Do you prefer a different IDE? Idea is much better than Eclipse, which I moved from a several years ago.

#

Sorry, wrong channel to ask that.

smoky violet
#

no I use idea as well

#

it just randomly breaks sometimes

#

especially with kotlin

#

not as bad for me recently but it still happens occasionally

agile coral
#

Oh, cool. Well, I will try to figure this out buffering

#

Thank ya

#

@smoky violet Sorry for the @, but I thought you would get a kick out of this.
Off of a hunch, I uninstalled and installed the newest version of IntelliJ (I was on a 2023 edition). It works now.

#

Thank you again; I probably wouldn't have thought it was purely an IDE issue if not for your comment.

smoky violet
#

glad you resolved it

verbal skiff
agile coral
rain vessel
#

Got an index out of bounds error when rebuilding patches after making a new commit, unsure of the cause. Any ideas? It's when rebuilding server patches. Index 1 out of bounds for 1

rain vessel
#

Fixed it I think

smoky violet
#

tends to happen when the repo is in a detached head state

misty current
#

im trying to build a velocity fork and it is telling me that the extra property nettyVersion does not exist. Anyone know what a fix is?

lusty canyon
#

hi, I am unable to do anything with gradle in paper source due to following error. I tried deleting all caches i could think of, including global gradle and maven caches, neither helped. It started happenning after I pulled 1.20.5 changes. Am I doing something wrong?

bronze ember
#

Delete the paper server folder

lusty canyon
#

aaaah, did not think about deleting that, thank you!

bronze ember
#

It's basically always the solution when you have Gradle issues in one of the patched folders

#

I guess deleting the build file alone should also work

lusty canyon
#

I completely forgot those folders are generated :D

#
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':remapSpigotSources'.
> Could not create an instance of type io.papermc.paperweight.tasks.RemapSources$RemapParams.
   > paper/libs/org/eclipse/jdt/core/dom/ASTVisitor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0       

I am currently stuck on this error. Already tried changing java version for the whole project between 11/17/21 and neither helped

gentle viper
lusty canyon
#

I tried swapping the project's java version

#

but that didn't help

bronze ember
#

You need to run Gradle with a newer java version

lusty canyon
#

my default java is 21, do I need to set it somewhere else?

bronze ember
#

Look at what Gradle did use

gentle viper
#

gradle must not be running with a newer java version. if you’re using intellij you can check your gradle settings

lusty canyon
#

ah, had old JAVA_HOME and in idea's gradle's settings... hope it will work now

#

thank you!

#

yup, now it finished successfully, thank you!

golden cloud
#

Hello! 👋

Reloading the Gradle project in IntelliJ seems to be no longer possible due to Task 'prepareWorkspace' not found in project ':cardboard-api-generator'. (cardboard is the name of my fork) – is this expected or is there any migration I need to do for the api-generator module in my fork?

I'm using this build configuration and my only patch changes thereferenced dependency of the api:

        patchTasks {
            register("PaperApiGenerator") {
                isBareDirectory = true
                upstreamDirPath = "paper-api-generator"
                patchDir = layout.projectDirectory.dir("patches/api-generator")
                outputDir = layout.projectDirectory.dir("cardboard-api-generator")
            }
        }

This is the only diff:

-    implementation(project(":paper-api"))
+    implementation(project(":cardboard-api")) // Cardboard - change branding
#

Additionally, if I run ./gradlew tasks in the root directory, there seems to be another problem with the api-generator (already tried deleting it and letting it regenerate the module, came out with the same result):

Execution failed for task ':tasks'.
> Could not create task ':cardboard-api-generator:applyAts'.
   > Task with name 'fixJar' not found in root project 'cardboard'.
lament scarab
#

make sure that you'e applied patches already, as a bunch of the configuration gets derived from that stuff, and generally, make sure that you've reflected any changes done in the gradle patches of the paperweight repo, etc

golden cloud
lament scarab
#

I mean, paper is paper, the paperweight project is of the focus for fork specific caveats

golden cloud
#

For anyone having a similar problem, I fixed it by only including the generated folder of the api-generator, which has no build.gradle.kts:

         patchTasks {
             register("PaperApiGenerator") {
                isBareDirectory = true
-                upstreamDirPath = "paper-api-generator"
+                upstreamDirPath = "paper-api-generator/generated"
                 patchDir = layout.projectDirectory.dir("patches/api-generator")
-                outputDir = layout.projectDirectory.dir("cardboard-api-generator")
+                outputDir = layout.projectDirectory.dir("cardboard-api-generator/generated")
             }
         }
granite valve
#

in gradle menu in intellij, right click on module, Task Activation, delete prepareWorkspace

night zealot
brave widgetBOT
granite valve
distant mango
#

you need to get rid of the targetIavaVersion

cinder ember
#

how would i update to java 21, cuz i tried and add io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT as a compileOnly dependency and it doesnt work

distant mango
#

/nw

#

you likely need to add the adventure snapshot repo

cinder ember
#

o

rough finch
#

Who can help me? i dont know whats wrong: https://mclo.gs/QQ2kwpm
i only added:
<dependency> <groupId>io.javalin.community.ssl</groupId> <artifactId>ssl-plugin</artifactId> <version>6.1.3</version> </dependency>
and it doesnt work, but the library is needed

rough finch
prime cliff
#

And your server is running java 19 which is an unsupported version. Upgrade to Java 21 there.

rough finch
#

@prime cliff The error keeps happen with java 21

prime cliff
rough finch
#

ok i will try

#

i need ssl because i have a https site wich requests to the Webserver

prime cliff
#

It's fairly simple. Instead of exposing the service directly, you do it via a proxy that adds ssl.

Additionally I prefer not running the rest service in the plugin itself, instead having a fully separate application.

rough finch
golden seal
rough finch
distant quail
#

I seem to have installed the correct version of Java, but I get this error

lament scarab
#

your thing is still using an older version of java

distant quail
#

how to change

lament scarab
#

if you ran that from your IDE, check your settings there

distant quail
lament scarab
#

check the gradle settings

cinder ember
#

how would i upload to the maven central repo with gradle, i already have a namespace but im confused because im trying to upload with a bundle but idk how to do the repo layout

agile skiff
loud wigeon
#

hello, i'm getting this error while userdev is patching 1.19.2

brave widgetBOT
bronze ember
#

idk, stuff failed to apply worldborder stuff

#

best bet is to delete that paperweight-userdev folder and try again

loud wigeon
#

in .gradle/caches?

bronze ember
#

there and in your home kaspian .local share gradle caches folder

loud wigeon
#

i deleted the 1.19.2 one and reloaded gradle and got the same result

#

but only there, ill try both now

loud wigeon
#

yup, same thing again

lament scarab
#

Iirc world border failing in that version was an issue with the decompiler and Java version

#

Make sure to use whatever version of Java was the norm for the tool chain back then

sharp trellis
#

hi, I'm trying to update my fork to the latest commit, but I get this weird error

brave widgetBOT
lament scarab
#

something apparently mangled the jar

#

check your tooling and make sure that you're using a sane JVM, etc

sharp trellis
#

nvm, computer restart solved the issue

covert prawn
fossil topaz
covert prawn
fossil topaz
#

yes

covert prawn
#

will try

#

looks like it works, thanks mate

loud wigeon
#

hi, i'm getting this error now when running reobf with paperweight

brave widgetBOT
lament scarab
#

that version of tinyremapper doesn't support that version of java

#

iirc, you can supply the new version in the depencencies block, but, I don't remember the exacts

distant mango
#

try remvoing the 2nd tasks block

quiet oasis
distant mango
#
    
    tasks {
    
        runServer {
    
            minecraftVersion("1.20.6")
    
            pluginJars(project(":wgrp-paper").file("build/libs/WorldGuardRegionProtect-Paper-${rootProject.version}.jar"))
    
            jvmArgs("-Xms4G", "-Xmx4G")
    
        }
    
    }
quiet oasis
#

and which one do you mean?

distant mango
#

the one in the thing i pasted

#

make that ```kotlin
runServer {

        minecraftVersion("1.20.6")

        pluginJars(project(":wgrp-paper").file("build/libs/WorldGuardRegionProtect-Paper-${rootProject.version}.jar"))

        jvmArgs("-Xms4G", "-Xmx4G")

    }
quiet oasis
#

and for 1.20.6 need mojmap officialy?

distant mango
#

Paper runs using mojang mappings as of 1.20.5

quiet oasis
distant mango
#

what?

#

You're not using internals so it's fine

quiet oasis
#

so now working, thanks!

smoky violet
#

How to update tiny-remapper to use newer Java versions with old dev bundles: kotlin dependencies { pluginRemapper("net.fabricmc:tiny-remapper:VERSION:fat") } latest version as of now is 0.10.3.

Also keep in mind that some older dev bundles will fail to apply with newer toolchains due to since fixed decompiler issues (i.e. patch fails for WorldBorder.java and etc). In those cases you must use a Java 17 toolchain for the project, but can still specify newer toolchains for compile tasks.

wicked trench
#

i keep forgetting to run in debug mode instead Tired

static urchin
#

Have you asked lucko about it?

wicked trench
#

not yet - i think he just needs to update the async-profiler library tho, so i'm hoping that's all that's needed to be done

lusty canyon
#

hi, I am trying to swap the mapping to the mojmap as in paperdev online docs (still use plugin.yml because of commands), I have:

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies {
    paperweight.paperDevBundle("${mcVersion}-R0.1-SNAPSHOT")
    // ...
}

but I am getting

paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily.

if I add the config below the dependencies I am getting

No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration

If I remove the property, it works normally.
I have id 'io.papermc.paperweight.userdev' version "1.7.0"

sterile hill
#

anyone know how to do this in groovy instead of kotlin

finite crypt
#

Hi, I'm unable to execute shadowJar here it is the error, if I execute runServer it works...

brave widgetBOT
distant mango
#

send the buildscript

#

but like I said, try using gooolers fork

finite crypt
#

using the fork it works but as i said doesn't it means that there is a dep that is using java 21 and if somone try to load the plugin with java 17 it will fails bc there is a dep compiled with java21?

distant mango
#

cant test locally since your dependencies aren't on a repo ¯_(ツ)_/¯

finite crypt
#

ok don't worry, ty.

foggy crypt
brave widgetBOT
echo kilnBOT
#

Please send large files/logs to a pastebin

foggy crypt
# foggy crypt here:

a previous helper told me to change <java.version>1.8</java.version> to <java.version>17</java.version> btw

distant mango
#

the log

foggy crypt
#

oh my bad

#

[WARNING] io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml failed to transfer from https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of papermc-repo has elapsed or updates are forced. Original error: Could not transfer metadata io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml from/to papermc-repo (https://repo.papermc.io/repository/maven-public/): Connect to repo.papermc.io:443 [repo.papermc.io/104.26.12.138, repo.papermc.io/104.26.13.138, repo.papermc.io/172.67.72.198] failed: Connect timed out
[WARNING] io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml failed to transfer from https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of papermc-repo has elapsed or updates are forced. Original error: Could not transfer metadata io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml from/to papermc-repo (https://repo.papermc.io/repository/maven-public/): Connect to repo.papermc.io:443 [repo.papermc.io/104.26.12.138, repo.papermc.io/104.26.13.138, repo.papermc.io/172.67.72.198] failed: Connect timed out
[INFO] Validation error:

[ERROR] Failed to read artifact descriptor for io.papermc.paper:paper-api🫙1.20.4-R0.1-SNAPSHOT
[ERROR] [server] Maven transfer artifact problem: io.papermc.paper:paper-api:pom:1.20.4-R0.1-SNAPSHOT
Cannot resolve io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT

distant mango
foggy crypt
distant mango
#

yes

foggy crypt
#

alr

distant mango
#

in ur browser

foggy crypt
#

one second, the browser just opens with a vpn

distant mango
#

are you from brazil

foggy crypt
#

yes i am

#

hope i didnt get doxxed

distant mango
#

Some brazilian ISP's have been blocking paper websites

foggy crypt
#

so should i just use a vpn?

distant mango
#

Yeah, may also want to complain to your ISP

foggy crypt
#

thanks

#

sorry for the trouble

#

im really bad at this

cinder ember
#

can someone help me with my build script

#
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
    java
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

group = "github.unjoinable.io"
version = "1.0.0"

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

dependencies {
    implementation("com.github.stephengold:Libbulletjme:20.2.0")
    compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}

tasks {
    named<ShadowJar>("shadowJar") {
        archiveBaseName.set("Physics")
        mergeServiceFiles()
        manifest {
            attributes(mapOf("Main-Class" to "io.github.unjoinable.physics.Physics"))
        }
    }
}

tasks {
    build {
        dependsOn(shadowJar)
    }
}```
#

it doesnt compile properly for some reason

proud maple
#

can you show the error you're getting

cinder ember
#

well the error is in console because a part of library is missing

#

i decompiled and checked it too

#

u think it can be because of buildscript

lament scarab
#

It’s a linkage error

cinder ember
#

linkage error?

lament scarab
#

Likely it’s expecting that something loads a native library and that failed or didn’t happen for some reason

cinder ember
#

oh erm

#

how does one fix it

lament scarab
#

Work out what it’s missing

smoky violet
#

probably need to add a second dependency with the natives themselves

cinder ember
#

thing is

#

i use the same buildscript for another project and it works

lament scarab
#

All I can see is the error

cinder ember
#

also it makes 2 jars 1 with just my code and 2nd with libs too

lament scarab
#

You’d need to seek support from the library devs potentially

#

Well, yea, but there was a linker error, so either you’re missing the natives for your platform or somebody missed a hook point to load them

cinder ember
#

okay

#

i thought it might be build script error purely because i just changed from normal to kotlin ones

lament scarab
#

I mean, it could be

cinder ember
#

dam i realised there is 1 for maven too

#

imma quickly change project to maveen cause i dont know gradle

lament scarab
#

I mean, they’re both build tools, you can use either assuming you don’t need server internals

cinder ember
#

same error wth maven

#

i didnt read the guide fully

fluid sentinel
#

Hey'o, I seem to be having quite some trouble executing the Gradle 'applyPatches' task, which is giving me an error. I am using Windows 10, trying to run the task on the cloned Paper repo, on an exFAT formatted drive, without directly using WSL.
The error in question:

io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false config commit.gpgSign false```
Now, I did look at the more common causes of this, such as git credentials and such, but all of it seems to be in order. Running the git command alone provides zero output. This issue only occurs if I am using Windows (no WSL) **and** on an exFAT drive. If I use WSL **or** the drive format is NTFS, then it works fine.
granite valve
#

@tawdry wing i'm not the biggest expert on gradle, but can you not apply the userdev plugin?

#

that check happens inside an afterEvalutate block as well for the project it's applied to (for what it's worth)

tawdry wing
granite valve
#

I mean can you declare the plugin with apply false and then apply it in the afterEvalutate?

tawdry wing
#

Yea, that's what I have done, but I still get the Cause: paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily. unless i specifically put it in the noraml dependencies {} section and not afterEvaluate

granite valve
#

yeah, idk then. I don't know enough about how afterEvaluate works or even when or why it's used

tawdry wing
granite valve
#

is there an ordering thing there? if multiple afterEvaluate actions are added

#

like if you add your afterEvaluate before applying the userdev plugin maybe?

tawdry wing
#

I'm not exactly sure how to do that tbh, I'm most likely gonna just recode my plugin conventions so it no longer uses the afterEvaluate. I coded it a while ago and took forever to get it working Sadge

lament scarab
#

does groovy used named properties?

#

like, project("a", configuration = "b")

#

if not, eeerrrr, see the gradle api docs and figure out what method it was that lets you specify a configuration

#

but, you probably do wanna look into migrating away from groovy, the community as a whole is generally moving on from it

sterile hill
#

why is that

#

i just don’t use kotlin cuz i don’t understand it

static urchin
#

you understand groovy but not kotlin? 👀

sterile hill
#

barely understand gradle

#

used maven mostly the past 6 years

lament scarab
#

Because groovy is generally not an "IDE first" type language, and so IDE tooling, etc, generally sucks at managing it

static urchin
#

looking at it tho, project(path: ":project", configuration: 'config') should work

lament scarab
#

and so, beyond the fact that groovy is generally far from an ideal language, and kotlin has better IDE integration, etc, etc, people have generally been moving over to kotlin, especially as you can use it for more things

sterile hill
#

think i tried that can’t remember

lament scarab
#

Yea, that looks about right, I don't think path needs to be named, however

sterile hill
#

i’ll probably just switch this specific project to kotlin

static urchin
#

would be a good idea 👍

short trench
#

Will the shadow plugin ever work with Java 21? Tryna develop against it but it shits itself

short trench
#

Drop in replacement id assume?

shell leaf
pliant carbon
#

My paperweight userdev says Failed to apply dev bundle patches. See the log file at ...
The log file says that 3 hunks failed. I am currently using version 1.19.2-R0.1-SNAPSHOT.

#

Is there something i can do to fix that? I already removed the folder of the gradle cache for that version and ran it again

pliant carbon
#

please ping me if you respond

smoky violet
#

read the pins

sharp trellis
#

hi, I'm trying to run runServer task in my paper fork project and I get this error

> Task :roxypaper-server:runServer FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':roxypaper-server:runServer'.
> Failed to calculate the value of task ':roxypaper-server:runServer' property 'javaLauncher'.
   > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific} for LINUX on x86_64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.

how can I just use my existing corretto 21 installation or fix this?

distant mango
#

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
} add this to settings.gradle.kts

sharp trellis
#

okay, thx 🙂