#build-tooling-help

1 messages ยท Page 11 of 1

brave widgetBOT
tawny horizon
#

ShapelessRecipe fails but when i open the jar the class is fine?

brave widgetBOT
lament scarab
#

not sure what jar you're looking at, the patch is failing

tawny horizon
#

this one

lament scarab
#

generally meaning that it thinks that there is a difference between the two

smoky violet
#

mfw all the minor versions are included omegaroll

lament scarab
#

did somebody screw up line endings? ๐Ÿ˜„

#

but, I mean, did a diff earlier between my local copy of that class and one you provided, so, i'm not exactly sure how it's failing

tawny horizon
#

are there any other logs that might be relevant?

smoky violet
#

im still looking into it locally

#

just need to wait for every version since 1.17.1 to decompile

#

im up to 1.19.4

tawny horizon
#

hey it could be worse

#

at least i didnt include the minor versions with the same craftbukkit versions

static urchin
#

"pls run build tools for versions 1.8 to 1.21 locally before compiling"

tawny horizon
#

lmao

smoky violet
#

wtf

#
* What went wrong:
Could not determine the dependencies of task ':eco-core:core-nms:v1_20_R2:compileJava'.
> Could not resolve all dependencies for configuration ':eco-core:core-nms:v1_20_R2:compileClasspath'.
   > Parameter specified as non-null is null: method kotlin.text.StringsKt__StringsKt.split, parameter <this>

tawny horizon
#

what

#

ive never seen that

smoky violet
#

do you have mavenLocal somewhere in here omegaroll

#
{
  "minecraftVersion": "1.20.2",
  "mappedServerCoordinates": "io.papermc.paper:paper-server:userdev-1.20.2-R0.1-SNAPSHOT",
  "archivedPublications": [
    "io.papermc.paper:paper-api:paperweight-local",
    "io.papermc.paper:paper-mojangapi:paperweight-local"
  ],
``` this does not look like a normal dev bundle ![omegaroll](https://cdn.discordapp.com/emojis/779885760278036530.webp?size=128 "omegaroll")
tawny horizon
#

i have no idea what im even looking at

#

i dont think ive got one ive never compiled paperweight

smoky violet
#

some dev bundle config from my maven local

#

some experiment from 1.20.2 days

tawny horizon
#

oh lmao

static urchin
smoky violet
#

yeah you have maven local in there lmao

tawny horizon
#

oh yeah it publishes itself to maven local

smoky violet
#

you shouldn't have it for resolving deps though

tawny horizon
#

commenting the mavenlocal repo out shouldnt matter

smoky violet
#

if you need it for a specific dep then add a filter

tawny horizon
#

i think i added it when one of my deps' repo broke

#

forgot to remove it again

smoky violet
#

I'll remove it in the patch I'm working on

tawny horizon
#

thanks

smoky violet
brave widgetBOT
smoky violet
#

oh wait forgot one thing

brave widgetBOT
smoky violet
#

there

tawny horizon
#

thanks

smoky violet
tawny horizon
#

yeah i need to update my actions they're really outdated

smoky violet
#

looks like all the bundles apply in ci at least

tawny horizon
#

doesn't work locally though

smoky violet
#

it does for me

tawny horizon
#

ill delete caches again

smoky violet
#

maybe need to do that one last time yeah

tawny horizon
#

i think its worked

#

thanks so much jmp couldn't have done it without you

tawny horizon
# smoky violet ``` * What went wrong: Could not determine the dependencies of task ':eco-core:c...

weirdly im getting a diff error for 1_20_R2

Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\Users\Will\IdeaProjects\eco\eco-core\core-nms\v1_20_R2\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\Will\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.8.10\7b6ef88079ac1d0c306c4f243d689357978b5ae5\tiny-remapper-0.8.10-fat.jar
#

it syncs at least so i can do dev but it doesn't build

smoky violet
#

maybe need to add the pluginRemapper to that build

paper kestrel
#

whats in that log file mentioned?

smoky violet
#

but also yeah

tawny horizon
#

ill try

#

yeah i think so

#

the log doesnt show anything

paper kestrel
#

C:\Users\Will\IdeaProjects\eco\eco-core\core-nms\v1_20_R2\.gradle\caches\paperweight\taskCache\reobfJar.log is empty?

tawny horizon
#

no warnings or anything else

#

not empty

#

think i just need to add pluginRemapper

#

yep that worked

olive violet
#

Looking through the paperweight issues, I found this issue which walks you through how to add the apply false. I tried it and still have the same issue as before

GitHub

If you use paperweight in mutli module project its working until paperweight is implemented in a second module in the same project. settings.gradle.kts include("shared") include("buk...

#

I think my issue is similar to this one, except in that case the reported was expecting to output spigot mapped and had it double obfuscated, when I am expecting to output mojang mapped and have it single obfuscated

GitHub

Gradle build system plugin for Paper and Paper forks - Issues ยท PaperMC/paperweight

#

Does anyone know how to do the recommended solution?

Ideally, you should depend on the Mojang mapped version of any internals-accessing dependency that you shade.

#

I've figured out how I can modify the dependency to use the "reobf" configuration, but I can't figure out how to use the non-reobfuscated configuration

smoky violet
#

I don't think so

#

the default outgoing configuration is not reobf'd or modified by paperweight in any way

#

you have to go out of your way to depend on the reobf variant

sturdy coral
#

I am kind of conflicted on when to use implementation vs compileOnly.
I thought that compileOnly was the equivalent to mavens provided, but the documentation
states that it should be exclusively used for dependencies, which are only needed during compilation.
And since i need all my dependencies at runtime, i would simply never use compileOnly. Now the
shadow plugin is introduced into this thought process, adding an implicit meaning to compileOnly,
resulting in dependencies not being shaded. The plugin also adds a shadow configuration, which
i couldnt find a lot of information on, but seems to result in the same behavior as implementation.

verbal skiff
#

plugin loading in an environment such as paper is not the normal case, so thats why it doesn't match the definition you may have found

#

paper provides many classes at runtime (such as the api) so it would be a mistake to include them in the runtime configuration (hence shade them) yourself

sturdy coral
#

The docs state that this should only be used for dependencies which are not available at runtime

#

Meaning nobody provides them

verbal skiff
#

well thats not true

#

generally, applications aren't loaded by another JVM

#

so thats why its written like that

#

okay let me rephrase

#

things you add in the compileOnly scope are not made available by your writing compileOnly(...)

#

they are made available by the fact that your plugin is loaded in an environment that has those dependencies available at runtime

#

which is not considered by that documentation

sturdy coral
#

But the implementation configuration doesnt normally result in shading. That is an effect of the shadow plugin.
So after what the docs said, it logically would make sense to define papers api as implementation

verbal skiff
#

the build task does not include the runtime configuration because it only includes the classes from your module

#

that has nothing to do with the implementation configuration

#

that is a decision of the build task to ignore the runtime configuration

sturdy coral
#

I mean implementation is just a combination of the compile and runtime configurations.

verbal skiff
#

yes

#

but the build task ignores the runtime configuration

#

that doesn't mean the runtime configuration doesn't exist

#

you can write your own fatJar task which includes the runtime configuration

#

that is one ugly link

sturdy coral
#

I feel like this lacks standardization. The shadow plugin should have ignored the runtime configuration imo and just
include shadow configured dependencies.

verbal skiff
#

not really

#

that would be really annoying

#

the runtime configuration feature exists and can be used

#

its just not used by the official task

#

IMOP there should be an official task that uses the runtime configuration properly, but there isn't

#

so thats why shadow exists

verbal skiff
paper kestrel
sturdy coral
#

I see, thanks for clarifying. So ill continue to use compileOnly like provided and just ignore the shadow configuration then

verbal skiff
#

the runtime configuration approach automatically adds all transitive dependencies

verbal skiff
sturdy coral
verbal skiff
#

conditionally on usage of shadow's include

sturdy coral
#

Ah

#

Ahh

verbal skiff
#

im not 100% sure, but I think as soon as you put a single include, you have to include everything manually

#

i once did this in one of my old plugins because I didnt know better a while ago

sturdy coral
#

F

verbal skiff
#

it was a painstaking process to find out which runtime dependencies were missing at runtime

#

because you only get the ClassNotFound at runtime

#

I had included a dependency but not its own dependencies

sturdy coral
#

The dev before me dowloaded all dependencies by hand, and threw them in the libs folder.
So i can feel your pain as im currently in the process as well.

#

And since im cleaning up, i decided to make sure im using the gradle configs properly, thx.

verbal skiff
sturdy coral
#

Ah i meant the libs folder of the paper server. The src project was barren of any sanity.

verbal skiff
#

ah okay

#

you can forget distributing a public plugin like that ๐Ÿ˜‚

#

but it sounds like its just private

sturdy coral
#

You wouldnt believe it, but there are just under 100 ppl right now, playing on that mess.

#

Its private yeah. My first reaction was. "Ok nobody is touching that garbage, lets start from 0".
But then i realized it was in production already.
I literally had a src.zip folder sent to me.
Anyways...

verbal skiff
#

๐Ÿ˜‚ good luck

dull forum
#

hi, where I sholuld place eula.txt if I want to run runDevServer gradle task?

lament scarab
#

run folder, iirc

dull forum
#

yep, found it just rn

#

thank you

turbid moon
#

Whenever I try to set my paperweight version to 1.21-R0.1-SNAPSHOT (as said in the docs), it goes wrong with this build log. The log files referenced on the build failure can be viewed here

A bit of a different error I get when trying to set the version string to 1.20.6-R0.1-SNAPSHOT. There, it finishes "successfully", but it tells me it Could not resolve io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT, which is required by io.papermc.paper:paper-server:userdev-1.20.6-R0.1-SNAPSHOT.

I already tried to add the net.fabricmc:tiny-remapper:0.10.3:fat dependency, without success.

Here is my build.gradle.kts: https://pastes.dev/y74VqV8SQd

distant mango
turbid moon
#

I noticed the java 21 flaw just after I send this in. But for 1.21 it still doesn't work, so let me go through the link rq

lament scarab
#

do note that there is a bug report open for changing the java version not busting the decomp cache

#

so, you might want to remove that manually and try again after fixing the JDK used

quiet oasis
#

ok

#
Build cache key for task ':wgrp-paper:checkstyleMain' is 3a06b45abc80f9e473bb7574af716b42
Task ':wgrp-paper:checkstyleMain' is not up-to-date because:
  Task has failed previously.
file or directory 'C:\Users\RitaSister\Desktop\ideaprojects\WorldGuardRegionProtect\wgrp-paper\src\main\kotlin', not found
Running checkstyle with toolchain 'C:\Program Files\Amazon Corretto\jdk21.0.3_9'.
[ant:checkstyle] Running Checkstyle 9.3 on 49 files
distant mango
#

send your build script(s)

quiet oasis
turbid moon
#

Thanks a lot

distant mango
#

why do you have the kotlin plugin without a kotlin source set

quiet oasis
distant mango
#

try creating src/main/kotlin

#

or just removing the kotlin plugin since it looks like you're not using it

quiet oasis
#

but it located in src/main/java/net/ritasister/wgrp/rslibs/api/config

distant mango
#

put it proeprly in src/main/kotlin

quiet oasis
#

relocated and pushed into git

turbid moon
#

Hey uh, me again o/
When I try to make tasks.assemble depend on the reobfJar task the way the paper docs say, it does not work. Anybody know why?

lament scarab
#

.kts ?

turbid moon
#

ye

distant mango
#

tasks.reobfJar

turbid moon
#

yeah that did it

distant mango
#

or
tasks {
assemble {
dependsOn(reobfJar
}
}

turbid moon
#

you guys should rly update the docs

distant mango
#

i'll make pr

turbid moon
#

wait, can I do it?

distant mango
#

sure

#

papermc/docs

quiet oasis
#

ok, how ignore checkstyleMain javadoc for one subproject?

quiet oasis
#
Build cache key for task ':wgrp-paper:checkstyleMain' is b0fc68968adb51c71a33cf7d00894747
Task ':wgrp-paper:checkstyleMain' is not up-to-date because:
  Task has failed previously.
Starting process 'Gradle Worker Daemon 6'. Working directory: C:\Users\RitaSister\.gradle\workers Command: C:\Program Files\Amazon Corretto\jdk21.0.3_9\bin\java.exe -Dcheckstyle.enableExternal
DtdLoad=false --add-opens java.prefs/java.util.prefs=ALL-UNNAMED @C:\Users\RitaSister\.gradle\.tmp\gradle-worker-classpath6081941850228417200txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=RU -Duser.language=ru -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 6'
Successfully started process 'Gradle Worker Daemon 6'
Started Gradle worker daemon (1.964 secs) with fork options DaemonForkOptions{executable=C:\Program Files\Amazon Corretto\jdk21.0.3_9\bin\java.exe, minHeapSize=null, maxHeapSize=null, jvmArgs=[--add-opens, java.prefs/java.util.prefs=ALL-UNNAMED], keepAliveMode=SESSION}.

This JVM does not support getting OS memory, so no OS memory status updates will be broadcast

> Task :wgrp-paper:checkstyleMain
Running checkstyle with toolchain 'C:\Program Files\Amazon Corretto\jdk21.0.3_9'.
[ant:checkstyle] Running Checkstyle 9.3 on 49 files

> Task :wgrp-paper:checkstyleMain FAILED                                                                                                                                                        

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wgrp-paper:checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
   > An unexpected error occurred configuring and executing Checkstyle.
      > Unable to process files:
quiet oasis
#

I will update, but process can't unable process files...

> Task :wgrp-paper:checkstyleMain FAILED
Running checkstyle with toolchain 'C:\Program Files\Amazon Corretto\jdk21.0.3_9'.
[ant:checkstyle] Running Checkstyle 9.3 on 49 files

> Task :wgrp-paper:compileKotlin
Finished executing kotlin compiler using DAEMON strategy
Stored cache entry for task ':wgrp-paper:compileKotlin' with cache key 5020cfb40a1131468c28c0e6fa2bf7b0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wgrp-paper:checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
   > An unexpected error occurred configuring and executing Checkstyle.
      > Unable to process files: 
woeful gate
#

Hey, how can I fix this? This is my build.gradle

plugins {
    id 'java'
    id 'io.papermc.paperweight.userdev' version '1.7.1'
}

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

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

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

def targetJavaVersion = 17
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
    }
}
brave widgetBOT
distant mango
#

you need java 21 and nuke your caches

woeful gate
#

Thanks!

inland snow
#

How can I upload my project to maven central (not ossrh)

#

I tried Jreleaser but I got stuck bc the tutorial uses groovy instead of kotlin dsl

distant mango
#

afaik you pulish to central via ossrh

unkempt geode
lament scarab
#

probably not the full error

#

but, you need java 21

unkempt geode
#

I am running under java 21, I tried deleting my caches but still the same error

lament scarab
#

def targetJavaVersion = 17

distant mango
#

full log

unkempt geode
#

oh wait gradle is defined with 17

unkempt geode
unkempt geode
topaz tartan
#

@smoky violet wanted to let you know i have the same issue, idk if its normal and about to be fixed

smoky violet
#

use the correct java toolchain for the dev bundle version and cleanCache

topaz tartan
#

sorry i don't understand, can you explain me in baby steps

#

use the correct java toolchain for the dev bundle version
which one

#

clean cache fair enough (i'll just gradle clean)

lament scarab
#

you need to use java 21

#

if you're doing multi project you'll want to set the toolchain on that module

topaz tartan
#

ah okay, thank you ๐Ÿ™‚

#

will try

topaz tartan
#

same issue

#

id("io.papermc.paperweight.userdev") version "1.7.1"

#

compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(21)
}

#

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

#

i cleared the cache too

#

my bad

#

sorry for the ping

#

it fixed

#

thx a lot

cedar heron
topaz tartan
#

and then i cleared the gradle cache (manually, gradle build clean didn't do the job)

cedar heron
#

manually?

topaz tartan
#

in the gradle folder, delete the cache subfolder

cedar heron
#

i've tried cleanAllPaperweightUserdevCaches and cleanCache

topaz tartan
#

u sure u on java 21?

#

and did u update

cedar heron
#

yes im sure

topaz tartan
#

toolchain.languageVersion.set(JavaLanguageVersion.of(21))
and
options.release.set(21)

cedar heron
#

im using kotlin dsl

#

but i think it is similar to groovy dsl

#

let me try

topaz tartan
#

i'm using kotlin too

#
plugins {
  `java-library`
  id("io.papermc.paperweight.userdev") version "1.7.1"
  id("com.github.johnrengelman.shadow") version "7.1.2"
}

group = "moonlit.alexis.mooncore"
version = "1.0"
description = "A private plugin used on the Moonlit Den Minecraft server"

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

dependencies {
  paperweightDevBundle("org.purpurmc.purpur", "1.21-R0.1-SNAPSHOT")
  compileOnly("org.purpurmc.purpur", "purpur-api", "1.21-R0.1-SNAPSHOT")
  api("net.dv8tion:JDA:4.4.0_350"){
    exclude(group = "club.minnced", module = "opus-java")
  }
  implementation("club.minnced:discord-webhooks:0.7.5")
  compileOnly("net.luckperms:api:5.4")
  implementation("com.vdurmont:emoji-java:4.0.0")
  implementation("org.apache.logging.log4j:log4j-core:2.13.3")
  implementation("org.apache-extras.beanshell:bsh:2.0b6")
}

repositories {
  mavenCentral()
  maven("https://repo.purpurmc.org/snapshots")
  maven("https://nexus.hc.to/content/repositories/pub_releases")
  maven("https://repo1.maven.org/maven2/net/luckperms/api/")
  maven("https://mavenrepo.cubekrowd.net/artifactory/repo/")
  maven("https://m2.dv8tion.net/releases")
  maven("https://jitpack.io")
}

tasks {
  assemble {
    dependsOn(reobfJar)
  }

  compileJava {
    options.encoding = Charsets.UTF_8.name()
    options.release.set(21)
  }
}
#

here is my build.gradle.kts

cedar heron
#

oh i see

topaz tartan
#

i deleted this whole folder for clearing the cache:

#

paperweight-userdev

cedar heron
#

ok

#

thx and i will have a try

topaz tartan
#

nps & gl

cedar heron
#

do i need to close IDEA?

topaz tartan
#

no idea

#

but one tip i can give you

#

careful of IDEs, sometimes they mess up at random shit

#

when i deal with build errors i prefer debug them in the terminal

#

like do the commands manually

#

i personally use VSC (and that's enough for most people here to murder me at my house)

cedar heron
#

haha

cedar heron
#

unfortunatrly, it still doesn't work, but 1.20 works. and im determined to follow jmp's suggestion to try setting paperweight.experimental.genSources=false in gradle.properties, although that will cause the decline in the ide experience, at lease it can be compiled

#

thx for helping

topaz tartan
#

sorry i couldn't help, good luck tho ๐Ÿ™‚

cedar heron
#

thx

#

actually it doesn't matter cuz im going to give up this project thanks to the mess of project structure

#

and i finally have a reason to recode the plugin

topaz tartan
#

๐Ÿฅ—

bleak lark
#

can i have multiple dev bundles for different mc versions?

woeful cove
zenith stream
#

referring to #paper-dev message

plugins {
    `java-library`

    id("io.github.goooler.shadow")
}

val extension = extensions.create<EternalShadowExtension>("eternalShadow")

afterEvaluate {
    dependencies {
        extension.compileOnlyDependencies.forEach {
            compileOnlyApi(it)
        }
    }
}
distant mango
#

where are you specifying the version

zenith stream
#

Invalid plugin request [id: 'io.github.goooler.shadow', version: '8.1.7']. Plugin requests from precompiled scripts must not include a version number. Please remove the version from the offending request and make sure the module containing the requested plugin 'io.github.goooler.shadow' is an implementation dependency of project ':buildSrc'.

#

You can't specify the version

distant mango
#

you need to add it to your buildsrc build.gradle as a dependency

zenith stream
#

ok nvm

#

yeah i see it

zenith stream
#

Okay so I have another issue. I want to make the plugin compatible with version 1.20.4 of MC and 1.20.6. I need to compile the plugin with Java 21, but classes have to be generated using Java 17, how do I achieve this?

#

this approach doesn't seem to work

smoky violet
#

is there some outdated guide telling people to do that?

pallid chasm
#

Normally, in Intellij IDEA, this command was highlighted with a green color, and I've been able to just press ctrl + enter and IDE executed this command with installed gradle instance. Now, randomly, without changing anything - this stopped working. The command isn't highlighted, nor executing it like before doesn't work. I can just press 'normal' enter, but then I have to add gradle to the path and configure JAVA_HOME. Unfortunaltely, I have absolutely no idea why it suddenly stopped working

#

It's really hard to find anything in jetbrains docs

lament scarab
#

outside of "make sure that the thing detecated gradle", eeer

pallid chasm
#

if that means that IJ runs gradle actions from context menus like always - yes

granite valve
#

I think there's a setting for this in the intelij terminal settings?

#

Tools > Terminal > Run Commands using IDE I believe

pallid chasm
#

Now it works!

#

I don't really know how could that changed to be disabled

#

But thanks!

#

โค๏ธ

tender tusk
#

I see the example plugin for userdev, but is there one that demonstrates a multi-module setup with different userdev game versions? I don't see anything relevant in the pins.

raven barn
#

you can just use the plugin with the desired version in each module
if you want to shade all modues into one artifact you can use shadow and create a custom reobfuscation task which you call in your main module when building

#

I did that once in this project
plugin is the main project
just take a look at the build files
each submodule defines a task called reobf

final jewel
#

is there a reason you made reobf depend on reobfJar

tender tusk
#

I'm not going to support anything older than 1.20.6, so obfuscation is thankfully moot on my end. Should simplify things

raven barn
smoky violet
#

... what?

rugged goblet
#

Hey, does anyone know if the paperweight-examples repo relocates the craftbukkit package?
I'm testing plugins that work fine with 1.20.6 builds from Paper but they seem to break when I use ./gradlew runDevServer

static urchin
#

given that fork has a single patch that just kinda changes "paper" to "forktest" I doubt it? What does the error look like

rugged goblet
static urchin
#

can you share the whole exception

echo kilnBOT
static urchin
#

but runDevServer should not do any relocation or the likes. Its a dev server in the end /shrug

rugged goblet
rugged goblet
static urchin
#

Hmmm, yea indeed looks like something is blowing up during its reflective init process

rugged goblet
#

Alright well I'll check out the paper repo and compare the build settings to see If I'm missing something

static urchin
#

I'll have a quick look too

#

hm no, don't see any relocation happening at runtime (not really much of a surprise)

rugged goblet
#

Gotcha, well thanks for having a look.
When I use ./gradlew createMojmapBundlerJar to build the project it works just fine so it's not a big issue.

misty pond
#

How can I get the correct version of net.minecraft.world.level.levelgen.SurfaceRules? When I get it through dev-imports, I get an error: src\main\java\net\minecraft\world\level\levelgen\SurfaceRules.java:183: error: cannot reference context before supertype constructor has been called

lament scarab
#

decompilers are not perfect

#

you'd need to fix it manually

misty pond
#

I'm not sure how to fix this if I pass the context through the consturator in the world instead of stone deepslate is generated.

lament scarab
#

easest option, go look at mache

scenic inlet
#

Hello, I'm new here and I'm having issues with starting everything. I have an error when I run the command "gradlew applyPatches" (I use the cmd)

This is the Error:
java.lang.UnsupportedClassVersionError: io/papermc/paperweight/core/PaperweightCore has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
io/papermc/paperweight/core/PaperweightCore has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

(I downloaded the last Java version)

distant mango
#

crosspost wrong channel

scenic inlet
#

oh sorry, I already sent it in #paper-help and someone told me to send it in here. Where should I send it? Or just wait for other to answer?

distant mango
#

you need at least java 9 for paperweight

#

21 to compile paper

scenic inlet
#

java 9? okay I'll look for it

distant mango
#

I think

#

may be 11

#

I'd just install java 21

scenic inlet
#

java 22 will be fine too, right?

lament scarab
#

if you're on windows, prefer 21

scenic inlet
#

alright

#

it's working, thank you so much!!

olive violet
#

I'm trying to get publishing to GitHub packages working, but I'm getting an error:

Invalid publication 'maven': multiple artifacts with the identical extension and classifier ('jar', 'null').
Full workflow can be found here and source here, but you can read the relevant section:

publishing {
    publications {
        create<MavenPublication>("maven") {
            groupId = "net.countercraft"
            artifactId = "movecraft"
            version = "${project.version}"

            from(components["java"])
            artifact(tasks["shadowJar"])
        }
    }
    repositories {
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/apdevteam/movecraft")
            credentials {
                username = System.getenv("GITHUB_ACTOR")
                password = System.getenv("GITHUB_TOKEN")
            }
        }
    }
}
GitHub

The original movement plugin for Bukkit. Reloaded. Again. - Publish package to GitHub Packages ยท APDevTeam/Movecraft@19918a2

smoky violet
#

you configured shadowJar and jar to output to the same location...

#

one of the many reasons I advise against messing with output conventions

olive violet
#

I think I changed that and now this is the error:

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

#

I think I figured it out, thanks!

short trench
#

Is it possible if-
I have multiple plugins, Core, Moderation ... I want to put the DB drivers and whatever into the core plugin and access the DB driver from the moderation plugin, but through the Core plugin if that makes sense?

#

only mainly because with everything, the size of the plugin jars are ~ 20 mb but without it all its a few hundred kilobytes

final jewel
#

if your question was whether you could maintain them in the same repo instead of splitting them up, then that's also possible and it is commonly called monorepos (multiple projects, which normally have some relation to one another, in one repository)

verbal skiff
#

20MB is just fine, don't over optimize stuff that doesn't matter

final jewel
verbal skiff
#

only within the same jar

final jewel
#

you can do it in a multi-module project

verbal skiff
#

theres no way of putting the relocation information in the maven artifact to consume by the other plugin

verbal skiff
#

you would have to relocate packages that aren't being shaded

#

i dont think shadow supports that but I could be wrong

#

but as someone who had plugins that did something like this.... just don't

#

its super annoying

#

you have to update all plugins together

#

all just to save a few megabytes that don't even matter

final jewel
final jewel
#

though I agree that it isn't worth the effort, generally you'd rather dynamically load the dependencies like a JDBC driver at runtime

verbal skiff
#

its still just not worth it for the reason I mentioned

#

yeah

#

or that

final jewel
#

though still experimental APIs, they're pretty capable

tender tusk
#

Is there any way to substitute build.gradle.kts properties into strings in a java or text file? This was dead simple in maven but gradle does not seem to have the same ${foo} capability, at least not out of the box.

tulip ingot
#

I am not quite sure if this is the right channel for it, but can i somehow not download libraries inmy paperplugin if a dedicated library plugin is present? so that i dont need to recompile all my plugins if i have a hotfix?

verbal skiff
#

but also consider whether what your actual goal is

#

if you're just trying to include version information, you could also include a text file from resources in the final archive

tender tusk
#

I'm extending PAPI's PlaceholderExpansion and want to have name/author/version match the rest of the plugin.

verbal skiff
#

right, well I don't have any experience with PAPI

#

check out that plugin

tender tusk
#

Well now that I think of it

#

I could just grab the info from my plugin at runtime

final jewel
distant mango
#

uh what?

#

It's not even used with adventure

final jewel
#

well, rather, it's hard to justify using it vs just creating a copy task where token is replaced and passing that as input to JavaCompile task

#

or the equivalent for resources

distant mango
#

Blossom does a lot more then that

final jewel
#

most people won't need more than that

final jewel
blazing harbor
#

I am moving to gradle build system from maven, for my main plugin I could recreate the project using intellij minecraft dev plugin which seems to work fine, however I am kinda stuck as to how to import my own library. I wrote a library for some menu stuff thats in the same github repo as my main plugin. In maven I used to just rely on my local repo to include and compile it
but idk what to do for gradle
I wanna move this library over to gradle too
but im not quite sure how to do this
and then also how to use it in my plugin build

smoky violet
#

you would have them be separate projects, then have one depend on the other

#

and use the shadow plugin instead of maven shade

brave widgetBOT
blazing harbor
#

I never shaded it

verbal skiff
#

TLDR:

you put this in settings.gradle.kts

include("foo")
include("bar")

then you can do this in your modules:

dependencies {
  implementation(project(":foo"))
}
#

just make sure you don't have a cyclic dependency

blazing harbor
#

hmm

#

I guess that makes sense, but like before I had a folder which is the repo, and then one folder for the plugin and a separate folder for the library

#

and then the maven repo fixed it for me

#

but I guess I have to use some like actual prject setup for gradle?

verbal skiff
#

if its two folders in your git repo, its not a problem

#

just include both of them like I wrote, or is written in the docs

#

the include("...") matches the folder name

blazing harbor
#

yeah but like there is nothing about the main project in that root folder

#

so the settings.gradle would be in a folder outside of both project folders

verbal skiff
blazing harbor
#

yeah

verbal skiff
#

you put the settings file in the repo

#

next to the plugin and library folders

#

that is your root module

#

plugin and library are your sub modules

blazing harbor
#

okay, and how do I build the project then

verbal skiff
#

you run the shadowJar task

#

./gradlew shadowJar

#

it will get run in each module that has that task

blazing harbor
#

from the root folder

verbal skiff
#

yep

blazing harbor
#

thats kinda annoying

verbal skiff
#

or you use the button in intellij

#

which is what I do

blazing harbor
#

right, so can I open both projects at once in intellij then

verbal skiff
#

you open the repo folder

#

and you just click that to build it

blazing harbor
#

hmm

#

that didnt quite work

#

I dont have any shadowJar option

verbal skiff
blazing harbor
#

oh my bad

#

so does that shade all dependencies? or like whats the deal there

distant mango
#

yes

#

all api or implementation dependencies

verbal skiff
#

it shades everything in the runtime dependency configuration scope

#

so that means: api, implementation and runtimeOnly

blazing harbor
#

so not compileOnly then I guess

#

okay

verbal skiff
#

(including transitive dependencies)

blazing harbor
#

which are deps of my library?

verbal skiff
#

deps of deps

blazing harbor
#

right

#

hmm

blazing harbor
#

seems like its starting to work as im getting the hang of it, thanks for helping out @verbal skiff

mighty pewter
#

In which file do the patch files generated by ./gradlew rebuildPatches exist?
I forked Paper and ran git add . I then typed git commit followed by ./gradlew rebuildPatches.

granite valve
#

in which of the 3 git repos inside Paper did you make a new commit before rebuilding?

#

patches are in patches/api and patches/server

mighty pewter
#

Thank you for your help! I was rebuilding in the main repo ๐Ÿ˜ฆ

shut dome
#

Are there any guides for setting up hot reloading with Gradle? I've probably been blind but my research has dug up nothing so far

lament scarab
#

hot reloading is an IDE thing, not a build tool thing

crude kernel
#
FAILURE: Build failed with an exception.

* What went wrong:
org/gradle/api/plugins/MavenPlugin
> org.gradle.api.plugins.MavenPlugin

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

CONFIGURE FAILED in 1s

getting this error when trying to run any gradle task with my velocity plugin. build script: https://pastes.dev/2XNYiWOUyT

#

i updated to goooler/shadow and that magically fixed it kekw

#

johnrengelman/shadow moment

blazing harbor
#

turns out its not working yet. For context I am trying to build a project that contains a library written in the same repo folder, which has a dependency, I am trying to shadow that dep into the jar, but it doesnt work I dont know why this is what I have for the library gradle dependencies { compileOnly "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT" implementation 'com.github.retrooper.packetevents:spigot:2.3.0' }

#

with the repo gradle maven { url 'https://repo.codemc.io/repository/maven-releases/' }

#

which is on the plugin's page

#

but it says my main project cant find com.github.retrooper.packetevents:spigot:2.3.0 which my lib requires

granite valve
#

is this a java version mismatch? library uses a newer version of java than your project?

blazing harbor
#

no

#

they are both at project default, which is 21

#

im trying to build for MC 1.21, but I doubt that matters

#

this is the full error I see in intellij ```ould not determine the dependencies of task ':BingoReloaded:shadowJar'.

Could not resolve all dependencies for configuration ':BingoReloaded:runtimeClasspath'.
Could not find com.github.retrooper.packetevents:spigot:2.3.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/github/retrooper/packetevents/spigot/2.3.0/spigot-2.3.0.pom
- https://repo.papermc.io/repository/maven-public/com/github/retrooper/packetevents/spigot/2.3.0/spigot-2.3.0.pom
- https://repo.extendedclip.com/content/repositories/placeholderapi/com/github/retrooper/packetevents/spigot/2.3.0/spigot-2.3.0.pom
Required by:
project :BingoReloaded > project :EasyMenuLib

Possible solution:

#

where BingoReloaded is my plugin im tryna build

granite valve
#

I don't see it searching the codemc.io repo you provided?

blazing harbor
#

yeah

#

im confused too

granite valve
#

pastebin your full build.gradle

blazing harbor
#

of the library?

granite valve
#

of BingoReloaded, the project that can't find that library

blazing harbor
granite valve
#

I don't see the codemc repo in there...

blazing harbor
#

well its in my libraries build.gradle

granite valve
#

oh I didnt realize there was a middle library

#

ok, then both of them please

blazing harbor
granite valve
#

if you try to just build your library, does it work?

blazing harbor
#

yeah

#

if I just build my plguin it works too

#

just shadowjar task fails

granite valve
#

well add the codemc repo to your plugin's build script as well as your libraries

blazing harbor
#

okay that worked

#

but why

#

why would it not use the repo from my libs repositories

tawny horizon
#

trying to contribute to paper, using wsl and getting this issue running ./gradlew applyPatches

distant mango
#

server certificate verification failed. CAfile: none CRLfile: none

tawny horizon
#

so whats the solution

distant mango
#

try

sduo apt-get update
sudo apt-get install apt-transport-https ca-certificates -y 
sudo update-ca-certificates
```?
#

from a random gitlab thread with the same issue

tawny horizon
#

ill give it a shot

quick oyster
#

@cinder ember are you trying to set up a paper fork or a plugin using paperweight?

cinder ember
#

im making a plugin using paperweight

quick oyster
#

you should be able to just copy paste from that

cinder ember
#

i was looking through it before yeah

#

for now im donezo, 3 hours in no progress its time for bed

echo kilnBOT
quick oyster
#

send your build.gradle.kts here

cinder ember
#

its all closed now thank you sm though

#

i'll look at it tmrw

quick oyster
#

have a good night!

quick oyster
cinder ember
#

thnx buddy you have yourself a nice day!

pseudo ether
#

Hey, I'm pretty new to gradle. I started a new multi-module project and want to create a custom task, which I can use in every submodule.
My goal is to rename a generated artifact.
Currently I have the task-definition in the build.gradle of the project:

class RenameArtifactsTask extends DefaultTask {
    @InputFile
    def File artifact

    @InputFile
    def File renamed

    @TaskAction
    void execute() {
        artifact.renameTo(renamed)
    }
}

But idk how to use this task in the submodules :(

smoky violet
#

use buildSrc

#

also that is a broken task

#

you want to make a renamed copy, what you are doing will break caching & up-to-date checks among other things, also note that ouputs and inputs need to be annotated as such

novel sable
#

Can anyone tell me WTF is going on? I am using Gradle
I tried including a dependency (TomlJ in this case), like this:
implementation("org.tomlj:tomlj:1.1.1")
At runtime I get this:
java.lang.NoClassDefFoundError: org/tomlj/Toml then the stacktrace, Caused by: java.lang.ClassNotFoundException: org.tomlj.Toml

#

Googling came out inconclusive and mixed

#

Some say IDEA is to blame and some say it's runtime classpath to blame

#

I feel like I am gonna go insane

#

Nevermind

radiant rover
#

This message was sent in #paper-dev but this channel is better for my issue i guess,

Hello, I have an issue with gradle and I thought that maybe someone will be able to help me there.

I have a jdk at a version >= 21 and I try to use paper-mojangapi = "1.20.6-R0.1-SNAPSHOT" but I have the following issue :

   > Could not resolve io.papermc.paper:paper-mojangapi:1.20.6-R0.1-SNAPSHOT.
     Required by:
         project :plugin
      > Dependency resolution is looking for a library compatible with JVM runtime version 17, but 'io.papermc.paper:paper-mojangapi:1.20.6-R0.1-SNAPSHOT:20240511.162349-41' is only compatible with JVM runtime version 21 or newer.

Does anybody knows how to fix this dependency resolution problem?

Thanks a lot

echo kilnBOT
fossil topaz
#

paste the gradle config

fossil topaz
radiant rover
# fossil topaz and you need to set java 21 in gradle itself, not just use java 21

I'm on 22.0.1 in gradle --version too

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

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

Kotlin:       1.9.22
Groovy:       3.0.21
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          22.0.1 (Oracle Corporation 22.0.1+8-16)
OS:           Windows 11 10.0 amd64

fossil topaz
#

yeah, that changes nothing

#

you still need to set java 21

fossil topaz
radiant rover
#

Yep I will do that, il just troncate it a little bit bcs its really long

fossil topaz
radiant rover
#

Oh thanks I hadn't see this duplicate

#

Just asking, what language are you using to make this git changelog with colors?

fossil topaz
#

it's diff

#

`` diff

radiant rover
#

Okay thanks!

#
+ Thanks a lot
- <3
fossil topaz
#

if you really want the colors then
https://message.style/app/tools/colored-text

Just select some text and click on the color or format that you like!

they sometimes break it but most often if works

radiant rover
#

Thats a nice website! Thanks :D

cinder ember
#
plugins {
    id 'java'
    id 'io.papermc.paperweight.userdev' version '1.7.1'
}

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

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

dependencies {
    paperDevBundle("io.papermc.paper:dev-bundle:1.20.1-R0.1-SNAPSHOT")
    implementation 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT'
    implementation 'org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT'
}

paperweight {
    paperDevBundle("io.papermc.paper:dev-bundle:1.20.1-R0.1-SNAPSHOT")
    remapJar {
        archiveClassifier.set('remapped')
    }
}

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

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

processResources {
    filesMatching("plugin.yml") {
        expand "version": project.version
    }
}
#

this?

distant mango
#

yes

#

in depndencies, remove the spigot and spigot-api dependency

lament scarab
#

er, is this a .kts script?

cinder ember
#

before im asked, yes im using chat gpt to generate some stuff, im trying to learn and understand, which im doing via trying to understand it first

lament scarab
#

I'm guessing it's not

cinder ember
#

dont think

lament scarab
#

chatgpt, and I'm out

echo kilnBOT
distant mango
#

paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT") should work

torn sonnet
#

1.20.1 - buddy that's super ancient. Upgrade ๐Ÿ˜†

distant mango
#

also can remove

paperweight {
    paperDevBundle("io.papermc.paper:dev-bundle:1.20.1-R0.1-SNAPSHOT")
    remapJar {
        archiveClassifier.set('remapped')
    }
}
torn sonnet
#

Also yeah, don't use chatgpt unless you want to only use chatgpt because none of us want to clean up its 50% of the time wrong answers.

cinder ember
#

i know, but i cant find other ways to learn things

#

i wanna understand it first

#

i don't know where to start except chat gpt

torn sonnet
#

There are hundreds of java tutorials

#

The gradle documentation is thorough

#

paperweight userdev docs are clear enough for what you need

#

Buddy, ChatGPT has only been around a couple years. How do you think people learned?

cinder ember
#

i completely get that, not saying everyone used gpt, this is just a method im using as it was recomended to me

torn sonnet
cinder ember
#

listen im not trying to anger you im just trying to learn

torn sonnet
#

And I'm just trying to teach you that you need to change how you try to learn ๐Ÿ™‚

lament scarab
#

People are generally pointing out that there are generally much better options out there than using a system whose function is to halicinate

torn sonnet
lament scarab
#

most people when you say you're using ChatGPT will tune off, because we generally have enough headaches with people asking for advice in 20 discords

final jewel
#

Depends on your experience

lament scarab
#

for userdev?

echo kilnBOT
final jewel
#

If you are a complete java/development beginner

lament scarab
#

for everything else, #paper-dev has some recommendations for java courses

torn sonnet
#

I like jetbrains academy

cinder ember
lament scarab
#

I'd recommend focusing a bit on core java first

cinder ember
lament scarab
#

I see many people race into the plugin side of stuff without at least developing a reasonable foundation, and then weeks later they're screwed, because they've learned enough that going back to the basics is boring, but, they have so many holes in their foundational knowledge that they have no real way forward without going back first

final jewel
#

You still have to grasp the general concepts of Java before you can actually make anything otherwise you'll bash your head against the wall a couple of times

lament scarab
#

at the very least, you need a fair grasp of OOP and the collections API, that's my core advice there

cinder ember
#

thank you

#

i'll look through jetbrains thingy

turbid moon
lament scarab
#

you need a maven repo with that dependency in it

#

oh, they deploy to maven central now

#

maybe they just don't have that version yet MahiruShrug

turbid moon
lament scarab
#

No idea what their repo is

#

But, gradle is saying it does not exist within your repo list

gilded charm
#

With paperweight-userdev, is it possible to build my plugin using spigot mappings (so it can be used in 1.19) while compiling with the API that's available in 1.20.5?

lament scarab
#

those two are entirely detatched from one another

#

if you compile against 1.19, then no, you cannot access newer API

#

you would need to compile against 1.20.6 if you wanted to access all of the API in 1.20.6

gilded charm
#

Paperweight seems to treat remapping much differently if I compile for 1.21 vs if I compile for 1.19.4

#

It's breaking the code I have for running brigadier commands pre 1.20.6

lament scarab
#

mappings are mappings

winter glacier
#

How can I change from gradle kotlin to gradle groovy when the projekt is already created?

distant mango
#

why

#

just change and recreate the file

lament scarab
#

you would need to manually modify the structure over

#

but, groovy is pretty much in "glhf" territory

winter glacier
#

Iยดm trying to use ACF but I dont know why the shown things that I should put in the build.gradle.kts are wrong

lament scarab
#

Because ACF is old enough that it still used groovy

#

the things it tells you to do are likely not all that hard to transfer over to kotlin

winter glacier
#

But isnt there a compileJava function in gradle kotlin?

distant mango
#

there is

#

itโ€™s a task iirc

winter glacier
#
Expression 'compileJava' cannot be invoked as a function. The function 'invoke()' is not found
    options.implementationrArgs += listOf("-parameters")
    options.fork = true
    options.forkOptions.executable = "javac"
}```
lament scarab
#

groovy vs kotlin changes pretty much nothing to gradle itself

#

probs in the wrong place

winter glacier
#

ahh

lament scarab
#

I only have the paper project opened rn, but, like

winter glacier
#

idk why but I have to tasks.compileJava

#

if I make the structure like yours it doesnt work

distant mango
#

because itโ€™s a task

winter glacier
#

no, you donยดt understand my point.

If I do it like its shown in the picture. It wonยดt work at mine.

If I do:

tasks.compileJava {
 options.encoding = "UTF-8"
}

^^ it works

#

thats what I wanted to say

lament scarab
#

it's all generally going to depend on the layout of the project and what the thing ends up being able to infer

rapid fractal
#

#general is the place for this. This channel is for build tool to build Paper and Paper plugin not resource pack help

winter glacier
#

ah sorry i was in the wrong channel lol

drifting torrent
distant mango
#

try building from terminal nvm im dumb

smoky violet
#

version = version

#

also once you fix that it won't do anything, you are creating a plugin yaml and then not adding it to any source set

#

doesn't make sense to put that inside the tasks block either

smoky violet
drifting torrent
smoky violet
#

I guess I missed your import being uppercase

#

still does not make sense to be in the tasks block

drifting torrent
#

no yeah just moved it around, its outside originally

turbid moon
#

Hello there, me again o/
I am trying to work with VaultAPI on server version 1.20.6, and unluckily for me, VaultAPI contains the bukkit api for some unkown reason. Since this is the 1.13 version, I am unable to use 1.13+ bukkitapi features for stuff that was just added "recently", like adventure components in CommandSender.sendMessage() as example. Is there some way to not make Vault include bukkit?

lament scarab
#

add an exclusion for bukkit in your build system

turbid moon
#

currently doing ```kotlin
compileOnly("me.clip:placeholderapi:2.11.6") {
isTransitive = false
}

turbid moon
lament scarab
#

Well, that would work

#

but, you can also add excludes in there iirc

turbid moon
#

ooops

#

wrong dependency

#

I just noticed

#

๐Ÿ’€

#

bruh

#

I put it onto placeholderapi instead of vault

#

okay that worked after I put onto the vaultapi dependency. Sorry for wasting your time

turbid moon
#

bruh their thingy is outdated

#

Yeah that lowkey fixed the issue of having 1.13 Bukkit in there lmao

#

even without isTransitive

prime cliff
turbid moon
#

bruh why is VaultAPI this outdated ๐Ÿ’€

crude kernel
#

i don't get why people still use it :p

turbid moon
#

I have to use it because my employer wants it

#

I personally just use databases lol

crude kernel
#

same

cursive heath
#

hey guys, I am just trying to patch some things into paper but sometimes, if I open the project, it seems like it's stuck at "Gradle: Building" is there a solution for this or something? I only have this problem in this project. would it be a bad idea, to terminate this process?

#

^I'm also already using WSL

smoky violet
#

crossing filesystems boundaries tends to cause issues like that

#

make sure you have the project cloned on the WSL drive and you're using intellij in WSL

cursive heath
#

yeah, the project is cloned on the WSL drive. so I should install IntelliJ a second time in WSL?

smoky violet
#

yes, windows intellij trying to use the WSL drive will be slow

#

and vice versa

cursive heath
#

okay, thanks!

winter glacier
#

How can I downgrade the maven version to 3.8.1 in IntelliJ?

final jewel
#

there change the maven home directory

winter glacier
#

and I just have to download the maven version online?

final jewel
#

well, yeah

winter glacier
#

do I have to set the path to the bin folder of the maven thing?

final jewel
#

just the home is fine I believe

#

you could also put something like this in your pom.xml to enforce a certain version

<properties>
  <maven.version>3.8.1</maven.version>
</properties>
winter glacier
#

nah doesnt work

#

i dont know why

final jewel
#

IntelliJ would just prob refuse to compile it

#

you could also just use the maven wrapper ig

winter glacier
#

My problem is that http repositories are blocked since maven 3.8.1 but even when I use maven 3.8.0 version it shows the same error

#
Since Maven 3.8.1 http repositories are blocked.

Possible solutions:
- Check that Maven settings.xml does not contain http repositories
- Check that Maven pom files do not contain http repository http://endertime.net:8075/repository/maven/
- Add a mirror(s) for http://endertime.net:8075/repository/maven/ that allows http url in the Maven settings.xml
- Downgrade Maven to version 3.8.1 or earlier in settings```
prime cliff
winter glacier
#

I canยดt set it up myself, so I need another fix for that

bronze ember
#

http only in 2024, cringe

#

If the error still shows on 3.8.0 then you failed to actually downgrade

#

Run mvn --version

prime cliff
winter glacier
#

yea I am a dev there and the sysadmin is not there atm so we canยดt setup ssl there

winter glacier
prime cliff
#

So you add a fake mirror. Recommend adding a comment to remove it after ssl migration.

winter glacier
#

doesnt work

#

Could not find artifact ch.ronny:EnderFrame:pom:1.0-SNAPSHOT in papermc-repo (https://repo.papermc.io/repository/maven-public/)

winter glacier
#

And even with the fake mirror it doesnt work

novel knoll
#

@echo sapphire the only things to note really are, you need to add (but not apply) userdev with version (id("io.papermc.paperweight.userdev") version "1.7.1" apply false) in the root project, and in the subprojects add userdev without specifying the version (id("io.papermc.paperweight.userdev")) as it's determined by the root project
realistically you also don't need to apply the java plugin in the root project either since there are no sources and it isn't building java
you don't need the gradlePluginPortal in your repositories definitions (in any of the projects) as well as mavenLocal (unless another dependency you are consuming is in your maven local repo, but this is not necessary for paper)

besides that, there are a couple things that are iffy

the whole subprojects usage is generally fragile, it's suggested you use convention plugins for those kinds of things, see https://docs.gradle.org/current/userguide/implementing_gradle_plugins_precompiled.html, this would also allow you to not require you having java/userdev plugins in your root project, as you'd only have that shared logic in the convention plugin and add that plugin in the subprojects necessary, or apply userdev through the plugin. iirc there is an example branch of that in the paperweight-test-plugin repo

tasks.build {
    dependsOn(subprojects.map { it.tasks.build })
}

this isn't really how you do cross-project task dependencies, but, invoking ./gradlew build will run build on all projects

// plugin/build.gradle.kts
tasks.shadowJar {
    // ...
    archiveClassifier = null
    // ...
}

i suggest you leave the jar tasks classifiers as-is, userdev configures the jar/shadowJar classifiers depending on a couple of things
if you don't care about spigot compatibility, you don't need reobfJar at all and this is gonna be of your interest #dev-announcements message

echo sapphire
warped ruin
distant mango
#

you don't put the jar file anywhere

#

you add the dependency to your build.gradle.kts

brave widgetBOT
warped ruin
#
repositories {
    mavenCentral()
    maven("https://repo.papermc.io/repository/maven-public/")
}

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

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
```when i build i get this
brave widgetBOT
distant mango
#

you need to add the java plugin at the top

#

I believe

warped ruin
#

what's that?

distant mango
#

plugins {
java
} iirc

#

or id("java-library")

warped ruin
#

neither work

distant mango
#

send your full build.gradle.kts

echo kilnBOT
warped ruin
#
plugins {
    id("java-library")
}

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

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

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}```
distant mango
#

and what happens when you try to build

warped ruin
brave widgetBOT
warped ruin
#

gradle, java and kotlin are all fresh reinstalls

lament scarab
#

something tells me that your environment is cursed

#
plugins {
    `java-library`
 }
distant mango
#

id("..") should still work for that

lament scarab
#

Yeeeaaa...

warped ruin
#

ig i'll try to reinstall or downgrade gradle

distant mango
#

what gradle version

#

./gradlew -v

warped ruin
#

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

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

Kotlin:       1.9.22
Groovy:       3.0.21
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          22.0.1 (Oracle Corporation 22.0.1+8-16)
OS:           Windows 11 10.0 amd64```
distant mango
#

try downgrading your java version to 21?

#

otherwise /shrug

lament scarab
#

8.8 added support for java 22

#

that more generally looks like the things borked, weird path issue? misconfigured env vars?

#

I can't really advise over windows, however

warped ruin
#

i'll try a redownload

warped ruin
#

yeah i have no idea

#

is settings.gradle.kts supposed to be empty? there's nothing written in the docs about what to put in it

lament scarab
#

can be empty

warped ruin
#

are there any plugin templates?

#

i can try to test on them

strange stirrup
#

i can take a look but your setup looks fine

warped ruin
#

it's just a replica of the guide

warm zinc
#

Yo! For some reason Paperweight just stopped working to me out of nowhere

Execution failed for task ':plugin:reobfJar'.
> io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\Users\tadea\IdeaProjects\EndCells\plugin\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\tadea\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.8.6\a584208ddeebec2eb210aaa2a6f8622052c07132\tiny-remapper-0.8.6-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.
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.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1s
7 actionable tasks: 1 executed, 6 up-to-date

This is the error

Am using Java 21 and userdev v1.7.1

lament scarab
#

see pins, i guess

warm zinc
#

If you mean this solution, is not it for older userdev versions?

#

as its been told in the msg

#

and I use the latest version of userdev

distant mango
#

dev bundle versions, not user dev versions

#

dev bundle being 1.21, 1.20 etc

warm zinc
#

ooh I see

hexed furnace
#

Failed to apply dev bundle patches. WorldBorder fails

#

I tried to follow

#

the pinned messages

stable birch
#

Can anyone help me?

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':minecraft:plugin:room-server:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '[REDACTED]\minecraft\plugin\room-server\build\classes\kotlin\papermc\main'.
    
    Reason: Task ':minecraft:plugin:room-server:compileJava' uses this output of task ':minecraft:plugin:room-server:papermcFixMissingResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':minecraft:plugin:room-server:papermcFixMissingResources' as an input of ':minecraft:plugin:room-server:compileJava'.
      2. Declare an explicit dependency on ':minecraft:plugin:room-server:papermcFixMissingResources' from ':minecraft:plugin:room-server:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':minecraft:plugin:room-server:papermcFixMissingResources' from ':minecraft:plugin:room-server:compileJava' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

* 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 40s
distant mango
#

send your build script

stable birch
#
val copyPaperPlugin by creating(Copy::class) {
        group = "build"
        dependsOn(":minecraft:plugin:room-server:build", ":minecraft:plugin:room-server:paperJar")
        rootProject.projectDir.resolve("minecraft/game").listFiles()!!.forEach { gameDir ->
            dependsOn(":minecraft:game:${gameDir.name}:build")
            from(project(":minecraft:game:${gameDir.name}").buildDir.resolve("libs/${gameDir.name}-papermc-${project.version}.jar"))
        }
        from(project(":minecraft:plugin:room-server").buildDir.resolve("libs/room-server-${project.version}-all.jar"))
        into(rootDir.resolve("run/paper/plugins"))
    }
#

the room-server task:

tasks {
    val paperJar by creating(ShadowJar::class) {
        mergeServiceFiles()
        archiveClassifier.set("all")
        from(kotlin.jvm("papermc").compilations.getByName("main").output)
        configurations =
            mutableListOf(kotlin.jvm("papermc").compilations.getByName("main").runtimeDependencyFiles)

        exclude {
            it.file in paperPlugin.files
        }
    }
    val build by existing {
        dependsOn(paperJar)
    }
}
#

Another error (occurs when I run room-server:build directly)

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':minecraft:plugin:room-server:papermcFixMissingResources' (type 'Copy').
  - Gradle detected a problem with the following location: '[REDACTED]\minecraft\plugin\room-server\build\classes\kotlin\papermc\main'.
    
    Reason: Task ':minecraft:plugin:room-server:compileJava' uses this output of task ':minecraft:plugin:room-server:papermcFixMissingResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':minecraft:plugin:room-server:papermcFixMissingResources' as an input of ':minecraft:plugin:room-server:compileJava'.
      2. Declare an explicit dependency on ':minecraft:plugin:room-server:papermcFixMissingResources' from ':minecraft:plugin:room-server:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':minecraft:plugin:room-server:papermcFixMissingResources' from ':minecraft:plugin:room-server:compileJava' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

* 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 20s
lament scarab
#

Such errors are generally caused by doing things like renaming task outputs in a manner that they overwrite others

cinder ember
#

any idea? I'm using maven

distant mango
#

paper is not on central

#

you need to add the paper repo

cinder ember
#

umm where can I find the resource?

brave widgetBOT
cinder ember
#

done! thanks

winter glacier
#

Do I need the shade plugin or can I remove it?

torn sonnet
winter glacier
#

I donยดt even know what that is lol

distant mango
#

adding another dependency into your jar

winter glacier
#

then I need it when I have the paper dependency right?

distant mango
#

no because you don't add the paper dependency into your jar

#

you'll need to if you add like a database such as mysql or whatever

winter glacier
#

ahh

proven cargo
#

Im new to making plugins and I can't get it to build I am using the IntelliJ IDEA ide with the Minecraft Development plugin

#

Yet I get said error

bronze ember
#

Make sure your Gradle is up to date

#

At least I think that's Gradle complaining about your java being to new

proven cargo
#

Yea im on openjdk 21

bronze ember
#

Or some Gradle plugin maybe that's too old

proven cargo
#

How would I go about updating it?

#

It says it is up to date

lament scarab
#

that's the IJ plugin

#

you need to update gradle itself

#

(or, you can manually modify the properties file inside of the gradle folder)

peak dagger
#

Is the build.gradle.kts file in my project the same thing as a build.gradle file?

distant mango
#

โ€œyesโ€ different syntax though

peak dagger
#

thanks

next hinge
#
plugins {
    id 'java'
    id "xyz.jpenilla.run-paper" version "2.3.0"
    id "io.papermc.paperweight.userdev" version "1.7.1"
}

group = 'dev.imb11'
version = '0.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/"
    }
}

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

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

tasks.assemble {
    dependsOn(tasks.reobfJar)
}

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)
    }
}

jar {
    manifest {
        attributes["paperweight-mappings-namespace"] = "mojang"
    }
}

tasks {
    runServer {
        minecraftVersion("1.20.1")
    }
}

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

Can't use mojmap on 1.20.1

Caused by: groovy.lang.MissingPropertyException: No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration

distant mango
#

why do you have both the attribute and that

#

you only need one

next hinge
#

Ah, docs is misleading

#

Okay

novel knoll
#

what happens when you actually try to run build

next hinge
#

Same error

#

Gradle cant sync

distant mango
#

from terminal

next hinge
#

Im using IDEA here, i've cleaned out the .gradle and build folders

#

Its the same issue, cannot find property MOJANG_PRODUCTION for class: ...Reobf...

#

Doing repair IDE has led to this

#
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'SkinShufflePlugin'.
> Failed to notify project evaluation listener.
   > Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains no files.
   > 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.
#

Different error, but uh? Not sure what it's on about

crude kernel
#

do ./gradlew in the terminal (or ./gradlew.bat if on windows)

next hinge
#

Dev bundle exists

#

I dont see how ./gradlew is going to fix it

#

considering that's what IDEA uses.

distant mango
#

are you using multiple modules

next hinge
#

Nope

#

Single file atm

#

Fixed!

#

getMOJANG_PRODUCTION() not MOJANG_PRODUCTION

#

seems docs is wrong

#

might want to edit that

novel knoll
#

๐Ÿ’€ what

#

oh

#

groovy, yeah

next hinge
#

I refuse to use kotlin lel

#

unnessecarily complicated

novel knoll
#

not really

smoky violet
verbal skiff
next hinge
#

well it works for me because im using stonecutter

#

for multiversion support

static urchin
#

I think we generally recommend kotlin over groovy but, if you know what you are doing who are we to stop ya

next hinge
strange stirrup
#

idk why

hidden yarrow
#

how do I add a dependency that will get compiled with the plugin?
in gradle

distant mango
#

mark it as api or implementation

#

use 'shadowJar' for the task

hidden yarrow
#

so buildDepends wont work anymore?

#

damn

distant mango
#

what

strange stirrup
#

never heard of buildDepends

#

must be very very old

hidden yarrow
distant mango
#

thatโ€™s a different thing

strange stirrup
#

wat

hidden yarrow
#

right now it adds -all to the output file

#

i dont want that

distant mango
#

use a copy task

#

does it really matter though?

#

or change the classifier

hidden yarrow
echo kilnBOT
dark bluff
#

project structure: me.waleeed.myplugin.Main

lament scarab
#

How are you building the jar?

dark bluff
dark bluff
lament scarab
#

yes

#

don't use IJs artifact thing

#

use the maven tasks

dark bluff
#

Oh, okay how I can do that?

lament scarab
#

see the maven tool window

dark bluff
lament scarab
#

find the package task in there and run that

dark bluff
lament scarab
#

now, your jar is in the target folder

dark bluff
lament scarab
#

yes, and you want the shaded one

dark bluff
#

and the server worked

#

Scoreboard not shown I will find a solution

rain vessel
#

I am allowed to fork Paperweight for my own project, right? Jw since it didnt have a license

rain vessel
#

mb lmao

#

my main thing i was gonna do is use it as a base for my own build system for the mc jar, not rly much else im using it for

#

it will be heavily modified

#

if yall want me to not do that, plz lmk

rapid fractal
#

Also if a project really do have no license, itโ€™s presumed to be all right reserved

dark bluff
#

in velocity how to change output directory in maven cfg

verbal skiff
#

you can set the output of the shadowjar task

#

but it's not really recommended

#

you probably want to use the copy task

turbid jacinth
#

how do i change the output location for the build of my plugin

#

explain in dumb terms please

#

i'm new to intellij and java

crude kernel
#

check the pins

turbid jacinth
#

i don't understand anything though

#

how do i implement it

lament scarab
#

don't change the output

#

copy the output using a custom task

#

that thing is pretty much as close to copy and apste as can be

turbid jacinth
#

how do i do that

#

how do i add a task

turbid jacinth
#

how do i find the build.gradle.kts

fading vapor
#

which build tool are you using

turbid jacinth
#

gradle

fading vapor
#

then it should be at the root of your project/sub-project

turbid jacinth
#

and how do i find that

fading vapor
turbid jacinth
fading vapor
#

you're using groovy

turbid jacinth
#

what's that

fading vapor
#

its just build.gradle

#

its the old way to script gradle build settings

turbid jacinth
#

should i change it?

fading vapor
#

the modern convention is Kotlin Script

#

I'm not familiar with migrating between the two

#

there

turbid jacinth
#

i'm a bit confuzzled about disambiguation

#

am i just supposed to change stuff in the file and rename it

fading vapor
#

basically

serene prawn
#

plugins {
id 'java'
}

group = 'me.waitlists'
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 {
compileOnly "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT"
}

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

tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}

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

lament scarab
#

1.20.5+ require java 21

serene prawn
#

im using java 21

lament scarab
#

you're targeting 17

serene prawn
#

when i do that i get a dif issue

#

lemme send

lament scarab
#

def targetJavaVersion = 17

serene prawn
raven barn
#

You have to use gradle 8.7 at least

serene prawn
#

aah

#

thanks

dark bluff
#

how would I change gradle cfg while I'm working with maven

distant mango
#

are you making a velocity plugin

dark bluff
#

yes

brave widgetBOT
dark bluff
#

@distant mango thank you so much, I tried to search in google and i know that i need to change the cfg of maven-jar plugin but i was confused

verbal skiff
dark bluff
#

It works

verbal skiff
#

and using velocity doesn't affect how you would change the output directory

dark bluff
turbid jacinth
#

um

#

so i tried to migrate to kotlin gradle from groovy

#

and now when i build i have now idea where it builds to

#

or which task should i use to build it?

#

nevermind it started working for some reason

#

when i use the copy jar it copies to files into the folder

#

nevermind i figured it out

gritty robin
#

i have this error in gradle:

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':NMS:NMS_1_18_R2:reobfJar' (type 'RemapJar').
  - Gradle detected a problem with the following location: 'C:\Users\danip\IdeaProjects\Mechanics-ReWrite\target\Mechanics-1.0.1.11a-dev-all.jar'.
    
    Reason: Task ':NMS:NMS_1_18_R2:reobfJar' uses this output of task ':NMS:NMS_1_18_R1:shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':NMS:NMS_1_18_R1:shadowJar' as an input of ':NMS:NMS_1_18_R2:reobfJar'.
      2. Declare an explicit dependency on ':NMS:NMS_1_18_R1:shadowJar' from ':NMS:NMS_1_18_R2:reobfJar' using Task#dependsOn.
      3. Declare an explicit dependency on ':NMS:NMS_1_18_R1:shadowJar' from ':NMS:NMS_1_18_R2:reobfJar' using Task#mustRunAfter.
gritty robin
#

IWJdwajdoawdkwwad

#

I DID ITI DID ITI DID IT

gritty robin
#

Any solution for this?

#

I am applying it but it still does not recognize it

distant mango
#

why are you doing it in afterEvaluate

gritty robin
gritty robin
smoky violet
#

you would need to use extensions.getByType<PaperweightUserExtension>() or smth

#

the accessors wont be generated in projects that dont apply the plugin

#

and yeah, cant add the dep afterevaluate

green bison
#

when i compile, i get infinite errors about org,bukkit (doing gradle runDevServer)

/Users/sushrut/Documents/cubicpaper/server/cubicpaper-server/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java:34: error: package org.bukkit.event.hanging does not exist
import org.bukkit.event.hanging.HangingBreakEvent;
                               ^
/Users/sushrut/Documents/cubicpaper/server/cubicpaper-server/src/main/java/net/minecraft/world/entity/item/ItemEntity.java:37: error: package org.bukkit.entity does not exist
import org.bukkit.entity.Player;

#

just an example

#

i think org.bukkit just dosen't exist for whatever reason

#

is me using java 22 any issue?

lament scarab
#

if everything from there is missing there is probably something wrong with your project setup

green bison
#

fixed that, but now i get this

/Users/sushrut/Documents/cubicpaper/server/cubicpaper-server/src/main/java/com/destroystokyo/paper/entity/ai/PaperVanillaGoal.java:47: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/sushrut/Documents/cubicpaper/server/cubicpaper-server/src/main/java/com/destroystokyo/paper/entity/ai/PaperVanillaGoal.java:52: error: method does not override or implement a method from a supertype
    @Override
    ^

lament scarab
#

I can't see your setup

#

either you changed something or there is something wrong with your project

bitter moss
#

Short and probably dumb question...

#

How do I find out what to put in build.gradle?

#

Right now it is "compileOnly 'io.papermc.paper:paper-api:1.19.1-R0.1-SNAPSHOT'" and I want to update.

#

Is there like an official list of what versions exist?

static urchin
bitter moss
#

Alright thanks. That solves my current problem.

bitter moss
verbal skiff
#

but paper has its own repo

bitter moss
#

Thanks!

cinder ember
#

The repo for paper weight i downloaded off paper github does not work

#

Gradle gibs big errors

lament scarab
#

"does not work"

cinder ember
#

I was about to send errors but Intellij crashed gimmie a minute

distant mango
#

make sure you git clone and not download the zip from github

cinder ember
#

well

#

i did download it off github.

distant mango
#

with repo? Paper

#

or paperweight

cinder ember
#

paperweight

distant mango
#

send the errors, but should still try to use git clone

cinder ember
#

I will try to use git clone in a bit

proper grove
#

how do i modify a patch in paperweight-patcher for a custom paper fork

echo kilnBOT
verbal mirage
#

hi, i searched for particles libraries and found Partigon
because its my first time using maven i have no idea how to it to the project, any advice or help will be appreciated (i am probably missing something๐Ÿ˜… )

distant mango
#

try a build via terminal

verbal mirage
#

how can i build with the terminal?
the error that i am getting is: Dependency 'xyz.gameoholic:partigon:1.3.4' not found

distant mango
#

ful message

#

but looks like their repo is dead

verbal mirage
#

thats the repo: https://github.com/Gameoholic/Partigon
might be dead...
and the build error:
[ERROR] Failed to execute goal on project Shards: Could not resolve dependencies for project com.weezard12:Shards๐Ÿซ™1.0: Failed to collect dependencies at xyz.gameoholic:partigon๐Ÿซ™1.3.4: Failed to read artifact descriptor for xyz.gameoholic:partigon๐Ÿซ™1.3.4: The following artifacts could not be resolved: xyz.gameoholic:partigon:pom:1.3.4 (absent): Could not transfer artifact xyz.gameoholic:partigon:pom:1.3.4 from/to gameoholic-repo (https://repo.gameoholic.xyz/releases): status code: 522, reason phrase: (522) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

distant mango
#

yes their repo is dead

#

that's why

verbal mirage
#

cryfade thank you๐Ÿ™ ๐Ÿ™ at list i know what's the problem

#

can you recommend other particles libraries?

crude kernel
verbal mirage
lament scarab
#

you could probably just install it to maven local

#

deploy it to your own repo, etc

#

worse case, maybe jitpack decided to not suck nvm, manual curl failed, it's upset cos it's 2024 and they default to java 8

verbal mirage
#

๐Ÿค” even their example project cant load the dependencies๐Ÿคทโ€โ™‚๏ธ

final jewel
#

just fork and fix what's broken

#

probably something dumb

wraith cave
#

is this the correct place to ask a question about paperclip?

distant mango
#

yes

wraith cave
#

idk how to word this... i kinda wanna ask for a status update on https://github.com/PaperMC/Paperclip/pull/66, like whats holding it back from being merged
i managed to fork and build paperclip with that pr merged but i have no clue how to use it, discord search and the docs on papermc.io didnt really help me

bronze ember
#

You would need to use that updated version of paperclip in papers build files and then compile paper

wraith cave
#

managed to build a paper jar with it
i just built paperclip, published it to maven local, edited papers build.gradle to use the new version, removed the paper repo for paperclip, built paper, done

cinder ember
#

is paper weight project working fine for everyone?

#

the test plugin ^

thick coral
#

Hi does someonoe know a easy or any way to compile plugins from github?, there is no release and I want to use some

distant mango
#

clone it

#

follow their build steps

thick coral
#

what program do I need or I can do everything with cmd

green bison
#

cmd should be enough, unless you are editing code then get an IDE

#

Also, are there any instructions on how to upgrade a paperweight project (paper fork) to a newer version

distant mango
#

"object"?

green bison
#

project

#

not object

distant mango
#

change the version lol

green bison
#

mb

#

and when i apply patches it will show merge conflicts that i have to resolve?

distant mango
#

oh a paper fork?

green bison
#

yeah

distant mango
#

no clue how that works

thick coral
#

I got 0 idea of what are the steps to build, If I wanted to compile this (https:// github. com/NCBPFluffyBear/FlowerPower/tree/master) what code or thing should I copy paste, run, execute, Idk,

green bison
#

like without regard for merge conflicts, because i assume they have none

agile skiff
cinder ember
#

Is no one else having problems with paper weight test plugin?

agile skiff
cinder ember
#

The gradle part always gives errors

agile skiff
#

send the errors

cinder ember
agile skiff
#

could you send the contents of C:\Users\HI.gradle\caches\paperweight-userdev\ff775525efc29c3503a07d1006e63e5695a742b7505cf63e157d49d32419c69f\module\io.papermc.paper\dev-bundle\1.21-R0.1-SNAPSHOT\paperweight\setupCache\patchedSourcesJar.log

cinder ember
#

I can it has no useful info tho