patchedSourcesJar.log by @tawny horizon: https://pastes.dev/XwAtMg57M5
#build-tooling-help
1 messages ยท Page 11 of 1
ShapelessRecipe.java by @tawny horizon: https://pastes.dev/uJ8HpLB3Au
not sure what jar you're looking at, the patch is failing
this one
generally meaning that it thinks that there is a difference between the two
mfw all the minor versions are included 
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
are there any other logs that might be relevant?
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
hey it could be worse
at least i didnt include the minor versions with the same craftbukkit versions

"pls run build tools for versions 1.8 to 1.21 locally before compiling"
lmao
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>
do you have mavenLocal somewhere in here 
{
"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 
i have no idea what im even looking at
i dont think ive got one ive never compiled paperweight
oh lmao
yeah you have maven local in there lmao
oh yeah it publishes itself to maven local
you shouldn't have it for resolving deps though
commenting the mavenlocal repo out shouldnt matter
if you need it for a specific dep then add a filter
I'll remove it in the patch I'm working on
thanks
@tawny horizon
0001-Explicitly-declare-toolchains-make-compile-work-cons.patch by @smoky violet: https://pastes.dev/bgG1tctMWz
0001-Explicitly-declare-toolchains-make-compile-work-cons.patch by @smoky violet: https://pastes.dev/aCdlRfa9xQ
there
thanks
@tawny horizon you should use https://github.com/gradle/actions/tree/main/setup-gradle instead of manual caching
yeah i need to update my actions they're really outdated
looks like all the bundles apply in ci at least
doesn't work locally though
it does for me
ill delete caches again
maybe need to do that one last time yeah
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
maybe need to add the pluginRemapper to that build
whats in that log file mentioned?
but also yeah
C:\Users\Will\IdeaProjects\eco\eco-core\core-nms\v1_20_R2\.gradle\caches\paperweight\taskCache\reobfJar.log is empty?
no warnings or anything else
not empty
think i just need to add pluginRemapper
yep that worked
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
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
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
I think this issue is why I can't find a way to depend on a non-obfuscated configuration
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
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.
which are only needed during compilation
this is nuanced. The real meaning is dependencies which do not need to be provided at runtime by you
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
The docs state that this should only be used for dependencies which are not available at runtime
Meaning nobody provides them
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
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
you are conflating the concept of runtime configuration and the build task
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
I mean implementation is just a combination of the compile and runtime configurations.
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
I feel like this lacks standardization. The shadow plugin should have ignored the runtime configuration imo and just
include shadow configured dependencies.
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
its much less error-prone and less repetetive to just use the dependency scope defined for that dependency
Google analytics fun
I see, thanks for clarifying. So ill continue to use compileOnly like provided and just ignore the shadow configuration then
btw: you would have to explicitly include every transitive dependency
the runtime configuration approach automatically adds all transitive dependencies
yes, its best to ignore the include in the shadow configuration
Is that a conditional "would"? In which case?
conditionally on usage of shadow's include
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
F
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
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.
thats especially painful because if committed, they will bloat your git repository
Ah i meant the libs folder of the paper server. The src project was barren of any sanity.
ah okay
you can forget distributing a public plugin like that ๐
but it sounds like its just private
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...
๐ good luck
hi, where I sholuld place eula.txt if I want to run runDevServer gradle task?
run folder, iirc
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
you need java 21 for .6 also <#build-tooling-help message> see this convo
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
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
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
send your build script(s)
Yeah that fixed it
Thanks a lot
why do you have the kotlin plugin without a kotlin source set
like that?
kotlin {
jvmToolchain(21)
}
try creating src/main/kotlin
or just removing the kotlin plugin since it looks like you're not using it
I'm using it
but it located in src/main/java/net/ritasister/wgrp/rslibs/api/config
put it proeprly in src/main/kotlin
well done it
relocated and pushed into git
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?
.kts ?
ye
tasks.reobfJar
yeah that did it
or
tasks {
assemble {
dependsOn(reobfJar
}
}
you guys should rly update the docs
i'll make pr
wait, can I do it?
ok, how ignore checkstyleMain javadoc for one subproject?
so how I can exclude module for checkstyle javadoc missing?
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:
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:
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
}
}
message.txt by @woeful gate: https://pastes.dev/NgCdYBGp6c
you need java 21 and nuke your caches
Thanks!
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
afaik you pulish to central via ossrh
Does anyone know what causes this issue?
:Paper:main: Could not resolve io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT.
Required by:
project :Paper > io.papermc.paper:paper-server:userdev-1.21-R0.1-SNAPSHOT
Main project build.gradle:
https://pastes.dev/RUe0kerMyO
Sub-project build.gradle:
https://pastes.dev/9GjlKfy4ru
I am running under java 21, I tried deleting my caches but still the same error
def targetJavaVersion = 17
full log
oh wait gradle is defined with 17
that was the full error, the log shows success but thats because the main project was fine
thanks, that fixed it!
@smoky violet wanted to let you know i have the same issue, idk if its normal and about to be fixed
use the correct java toolchain for the dev bundle version and cleanCache
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)
you need to use java 21
if you're doing multi project you'll want to set the toolchain on that module
so i have java 21, still doesn't work
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
excuse me but how did you fix it? ive encountered the same error
yo, i updated java to version 21
and then i cleared the gradle cache (manually, gradle build clean didn't do the job)
manually?
in the gradle folder, delete the cache subfolder
i've tried cleanAllPaperweightUserdevCaches and cleanCache
yes im sure
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
and
options.release.set(21)
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
oh i see
nps & gl
do i need to close IDEA?
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)
haha
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
sorry i couldn't help, good luck tho ๐
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

๐ฅ
can i have multiple dev bundles for different mc versions?
I'm honestly unsure but really good question. This would be great
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)
}
}
}
where are you specifying the version
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
you need to add it to your buildsrc build.gradle as a dependency
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
https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation idk why people still use source/target compatibility so often
is there some outdated guide telling people to do that?
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
outside of "make sure that the thing detecated gradle", eeer
if that means that IJ runs gradle actions from context menus like always - yes
I think there's a setting for this in the intelij terminal settings?
Tools > Terminal > Run Commands using IDE I believe
Now it works!
I don't really know how could that changed to be disabled
But thanks!
โค๏ธ
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.
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
is there a reason you made reobf depend on reobfJar
I'm not going to support anything older than 1.20.6, so obfuscation is thankfully moot on my end. Should simplify things
you cant call reobfJar directly from another module for some reason
so you need to create a custom task which depends on the actual task
... what?
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
given that fork has a single patch that just kinda changes "paper" to "forktest" I doubt it? What does the error look like
https://github.com/MrMicky-FR/FastBoard.git
The error seems to be caused by FastBoard which is supposed to support 1.20.6.
I just downloaded the latest paper build and it works fine.
It seems to use reflection for packets which is why I made the assumption.
can you share the whole exception
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
but runDevServer should not do any relocation or the likes. Its a dev server in the end /shrug
Just going to check one more time that it doesn't occur on the paper build
https://paste.gg/p/anonymous/54b09f8e51d24b059064c20f5de92635
Here it is, considering the NoClassDefFoundError, I would have assumed that I just didn't shade it properly except I don't seem to get this error when using paper
Hmmm, yea indeed looks like something is blowing up during its reflective init process
Alright well I'll check out the paper repo and compare the build settings to see If I'm missing something
I'll have a quick look too
hm no, don't see any relocation happening at runtime (not really much of a surprise)
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.
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
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.
easest option, go look at mache
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)
crosspost wrong channel
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?
java 9? okay I'll look for it
java 22 will be fine too, right?
if you're on windows, prefer 21
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")
}
}
}
}
you configured shadowJar and jar to output to the same location...
one of the many reasons I advise against messing with output conventions
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!
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
yeah, many plugins separate their utilities into a separate plugin and then depend on it
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)
the issue is if a other plugin also shades those drivers
20MB is just fine, don't over optimize stuff that doesn't matter
normally you'd just relocate if that's the case
yeah but you can't do that transitively
only within the same jar
you can do it in a multi-module project
theres no way of putting the relocation information in the maven artifact to consume by the other plugin
im not 100% convinced
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
I don't see why that would be the case unless you are introducing ABI breaking changes in your core plugin
yeah thats what I had
though I agree that it isn't worth the effort, generally you'd rather dynamically load the dependencies like a JDBC driver at runtime
this is very easy nowadays since Spigot offers a limited way to do this and Paper offers the whole shebang (dynamically loading of dependencies at runtime through the new bootstrap/loader API which allows for relocation or straight out isolation of classloaders which removes the need for relocation)
though still experimental APIs, they're pretty capable
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.
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?
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
I'm extending PAPI's PlaceholderExpansion and want to have name/author/version match the rest of the plugin.
I don't think this project is useful outside of adventure
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
Blossom does a lot more then that
most people won't need more than that
err, whatever kyoripowered uses it for I guess, I automatically link that org with adventure and forget they got other projects as well lol
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
you would have them be separate projects, then have one depend on the other
and use the shadow plugin instead of maven shade
https://plugins.gradle.org/plugin/io.github.goooler.shadow
Mar 5, 2024 ... io.github.goooler.shadow ยท Version 8.1.7 (latest) ยท Using the plugins DSL: ยท Using legacy plugin application: ยท Using the plugins DSL: ยท Usingย ...
About 29,100 results (0.35 seconds)
I never shaded it
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
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?
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
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
you have:
repo
-> plugin
-> library
?
yeah
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
okay, and how do I build the project then
you run the shadowJar task
./gradlew shadowJar
it will get run in each module that has that task
from the root folder
yep
thats kinda annoying
right, so can I open both projects at once in intellij then
why is it annoying? the repo folder is what normally gets opened anyways
you open the repo folder
and you just click that to build it
you need to add the shadow plugin
it shades everything in the runtime dependency configuration scope
so that means: api, implementation and runtimeOnly
(including transitive dependencies)
which are deps of my library?
deps of deps
seems like its starting to work as im getting the hang of it, thanks for helping out @verbal skiff
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.
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
Thank you for your help! I was rebuilding in the main repo ๐ฆ
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
hot reloading is an IDE thing, not a build tool thing
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 
johnrengelman/shadow moment
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
is this a java version mismatch? library uses a newer version of java than your project?
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:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html```
where BingoReloaded is my plugin im tryna build
pastebin your full build.gradle
of the library?
of BingoReloaded, the project that can't find that library
I don't see the codemc repo in there...
well its in my libraries build.gradle
its the one from this dep implementation(project(":EasyMenuLib")) https://pastes.dev/P05hVTrlM8
if you try to just build your library, does it work?
well add the codemc repo to your plugin's build script as well as your libraries
okay that worked
but why
why would it not use the repo from my libs repositories
trying to contribute to paper, using wsl and getting this issue running ./gradlew applyPatches
server certificate verification failed. CAfile: none CRLfile: none
so whats the solution
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
ill give it a shot
@cinder ember are you trying to set up a paper fork or a plugin using paperweight?
im making a plugin using paperweight
are you following https://github.com/PaperMC/paperweight-test-plugin/blob/master/build.gradle.kts ?
you should be able to just copy paste from that
i was looking through it before yeah
for now im donezo, 3 hours in no progress its time for bed
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
send your build.gradle.kts here
have a good night!
feel free to ask here whenever
thnx buddy you have yourself a nice day!
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 :(
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
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
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
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
paste the gradle config
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
.
Yep I will do that, il just troncate it a little bit bcs its really long
change line 27
- it.options.release.set(17)
+ it.options.release.set(21)
Oh thanks I hadn't see this duplicate
Just asking, what language are you using to make this git changelog with colors?
if you really want the colors then
https://message.style/app/tools/colored-text
[2;45mJust select[0m [2;34msome text[0m and [2;32mclick[0m on the [2;31m[1;31mcolor[0m[2;31m[0m or [4;2mformat that you like[0m!
they sometimes break it but most often if works
Thats a nice website! Thanks :D
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?
er, is this a .kts script?
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
I'm guessing it's not
dont think
chatgpt, and I'm out
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT") should work
1.20.1 - buddy that's super ancient. Upgrade ๐
also can remove
paperweight {
paperDevBundle("io.papermc.paper:dev-bundle:1.20.1-R0.1-SNAPSHOT")
remapJar {
archiveClassifier.set('remapped')
}
}
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.
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
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?
i completely get that, not saying everyone used gpt, this is just a method im using as it was recomended to me
Whoever recommended it to you is someone you should stop listening to. ChatGPT is wrong at least half the time on technical answers. Let alone highly specific stuff like paperweight userdev. It's a tool for making convincing writing. It is not a learning/teaching tool. It does not have knowledge, or an ability to check its work. It just writes good sentences.
listen im not trying to anger you im just trying to learn
And I'm just trying to teach you that you need to change how you try to learn ๐
People are generally pointing out that there are generally much better options out there than using a system whose function is to halicinate
Hallucinate? Nah. Bullshit. https://link.springer.com/article/10.1007/s10676-024-09775-5
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
i will, but where do i start?
Depends on your experience
for userdev?
If you are a complete java/development beginner
for everything else, #paper-dev has some recommendations for java courses
I like jetbrains academy
i am, kinda wanna focus on the minecraft side of it all thouhh
I'd recommend focusing a bit on core java first
okay okay
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
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
at the very least, you need a fair grasp of OOP and the collections API, that's my core advice there
Hey there o/
I am trying to add FAWE as a dependency to my plugin, but for some reason it does not seem to be working. I put it into my build.gradle.kts exactly as specified in their API Usage Documentation. Here is my build script: https://pastes.dev/Vrb274nkso
Oh right, error message: ```ruby
GenCore:main: Could not resolve com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.11.0.
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
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 
I looked it up. Their repo contains 2.11.0
No idea what their repo is
But, gradle is saying it does not exist within your repo list
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?
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
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
mappings are mappings
How can I change from gradle kotlin to gradle groovy when the projekt is already created?
you would need to manually modify the structure over
but, groovy is pretty much in "glhf" territory
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
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
But isnt there a compileJava function in gradle kotlin?
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"
}```
groovy vs kotlin changes pretty much nothing to gradle itself
probs in the wrong place
ahh
I only have the paper project opened rn, but, like
idk why but I have to tasks.compileJava
if I make the structure like yours it doesnt work
because itโs a task
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
it's all generally going to depend on the layout of the project and what the thing ends up being able to infer
#general is the place for this. This channel is for build tool to build Paper and Paper plugin not resource pack help
ah sorry i was in the wrong channel lol
trying to use https://github.com/jpenilla/resource-factory but getting some form of circular dep error when trying to build 
try building from terminal nvm im dumb
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
as you're using the convention plugin, remove the import so you are configuring the extension instead of creating a random instance
fixed it
well seems to work 
I guess I missed your import being uppercase
still does not make sense to be in the tasks block
no yeah just moved it around, its outside originally
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?
add an exclusion for bukkit in your build system
currently doing ```kotlin
compileOnly("me.clip:placeholderapi:2.11.6") {
isTransitive = false
}
how would I do that in gradle?
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
Update to 1.7.1
bruh their thingy is outdated
Yeah that lowkey fixed the issue of having 1.13 Bukkit in there lmao
even without isTransitive
What do you expect? It basically took them 2 years to publish a version with that fix. ๐ซ
https://github.com/MilkBowl/VaultAPI/commit/c17036183c0c32f89db12b1f1540503859b697a1
bruh why is VaultAPI this outdated ๐
i don't get why people still use it :p
same
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
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
yeah, the project is cloned on the WSL drive. so I should install IntelliJ a second time in WSL?
okay, thanks!
How can I downgrade the maven version to 3.8.1 in IntelliJ?
Settings -> Build, execution, deployment -> Build Tools -> Maven
there change the maven home directory
and I just have to download the maven version online?
well, yeah
do I have to set the path to the bin folder of the maven thing?
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>
IntelliJ would just prob refuse to compile it
you could also just use the maven wrapper ig
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```
Why not just fixing your root cause. Which repo fails for you? Your own? Then setup ssl for that!
I canยดt set it up myself, so I need another fix for that
http only in 2024, cringe
If the error still shows on 3.8.0 then you failed to actually downgrade
Run mvn --version
They have ssl encryption on their main site. So expanding it onto the maven repository isn't that difficult. Are you a dev at that server?
yea I am a dev there and the sysadmin is not there atm so we canยดt setup ssl there
here it says 3.9.8 but Iยดve changed the version in intellij already
Sad thing. A "workaround" more a hack could be that.
For the sake please let the enable ssl as soon as possible.
https://gist.github.com/vegaasen/1d545aafeda867fcb48ae3f6cd8fd7c7
So you add a fake mirror. Recommend adding a comment to remove it after ssl migration.
doesnt work
Could not find artifact ch.ronny:EnderFrame:pom:1.0-SNAPSHOT in papermc-repo (https://repo.papermc.io/repository/maven-public/)
Even tho I downgraded it to 3.8.0 it doesnt work
And even with the fake mirror it doesnt work
@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
ok I'll try that changes, thank you
#paper-help message trying to follow this in vs code windows and i don't know where to put the jar file for paper
you don't put the jar file anywhere
you add the dependency to your build.gradle.kts
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
err.txt by @warped ruin: https://pastes.dev/L8LYtjM5UL
what's that?
neither work
send your full build.gradle.kts
Please send large files/logs to a pastebin
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))
}```
and what happens when you try to build
err.txt by @warped ruin: https://pastes.dev/8kYVtNpYkL
gradle, java and kotlin are all fresh reinstalls
id("..") should still work for that
Yeeeaaa...
ig i'll try to reinstall or downgrade gradle
------------------------------------------------------------
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```
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
i'll try a redownload
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
can be empty
do you have this on github or anything?
i can take a look but your setup looks fine
it's just a replica of the guide
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
see pins, i guess
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
ooh I see
Failed to apply dev bundle patches. WorldBorder fails
I tried to follow
the pinned messages
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
send your build script
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
Such errors are generally caused by doing things like renaming task outputs in a manner that they overwrite others
umm where can I find the resource?
done! thanks
Do I need the shade plugin or can I remove it?
Are you using it to shade anything?
I donยดt even know what that is lol
adding another dependency into your jar
then I need it when I have the paper dependency right?
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
ahh
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
Make sure your Gradle is up to date
At least I think that's Gradle complaining about your java being to new
Yea im on openjdk 21
Or some Gradle plugin maybe that's too old
that's the IJ plugin
you need to update gradle itself
(or, you can manually modify the properties file inside of the gradle folder)
Is the build.gradle.kts file in my project the same thing as a build.gradle file?
โyesโ different syntax though
thanks
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
what happens when you actually try to run build
from terminal
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
do ./gradlew in the terminal (or ./gradlew.bat if on windows)
Dev bundle exists
I dont see how ./gradlew is going to fix it
considering that's what IDEA uses.
are you using multiple modules
Nope
Single file atm
Fixed!
getMOJANG_PRODUCTION() not MOJANG_PRODUCTION
seems docs is wrong
might want to edit that
not really
https://github.com/PaperMC/paperweight/commit/3711175570c2b5c099028e0b434ae776278d2948 it is a static field, needing to use the getter means something is wrong with your build basically
is groovy supposed to be better?
I think we generally recommend kotlin over groovy but, if you know what you are doing who are we to stop ya
nah its just like that in groovy
idk why
how do I add a dependency that will get compiled with the plugin?
in gradle
what
thatโs a different thing
wat
do you know if I can change the output name of the file?
right now it adds -all to the output file
i dont want that
actually no lol
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
I'm trying to shade FastBoard but I don't know how
pom.xml https://paste.gg/p/anonymous/7d9cd2694afd4a79b8e2ea9b5148b022
project structure: me.waleeed.myplugin.Main
How are you building the jar?
I'm using IntelliJ
you mean the artifact?
Oh, okay how I can do that?
see the maven tool window
Yes
find the package task in there and run that
Okay I have done this
now, your jar is in the target folder
I have two versions shaded and other
yes, and you want the shaded one
Thank you, I have the shaded one now in plugins folder
and the server worked
Scoreboard not shown I will find a solution
I am allowed to fork Paperweight for my own project, right? Jw since it didnt have a license
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
Also if a project really do have no license, itโs presumed to be all right reserved
in velocity how to change output directory in maven cfg
velocity uses gradle, so you would have to modify the gradle file not maven
you can set the output of the shadowjar task
but it's not really recommended
you probably want to use the copy task
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
check the pins
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
how do i find the build.gradle.kts
which build tool are you using
gradle
then it should be at the root of your project/sub-project
and how do i find that
you're using groovy
what's that
should i change it?
the modern convention is Kotlin Script
I'm not familiar with migrating between the two
there
i'm a bit confuzzled about disambiguation
am i just supposed to change stuff in the file and rename it
basically
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
}
}
im gettingthis error: Duels:main: Could not resolve io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT.
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
1.20.5+ require java 21
im using java 21
you're targeting 17
def targetJavaVersion = 17
Unsupported class file major version 65
You have to use gradle 8.7 at least
Im using maven
how would I change gradle cfg while I'm working with maven
are you making a velocity plugin
yes
@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
your question said "in velocity" so I assumed you meant how to change it in velocity
It works
and using velocity doesn't affect how you would change the output directory
Oh, Sorry Alex I was try to find quick solution and forget the clarity in my question
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
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.
why are you doing it in afterEvaluate
simple testing :c
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
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?
if everything from there is missing there is probably something wrong with your project setup
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
^
I can't see your setup
either you changed something or there is something wrong with your project
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?
Alright thanks. That solves my current problem.
I still wonder if this exists if I wanted an older version.
for most packages you can search on search.maven.org
but paper has its own repo
Thanks!
The repo for paper weight i downloaded off paper github does not work
Gradle gibs big errors
"does not work"
I was about to send errors but Intellij crashed gimmie a minute
make sure you git clone and not download the zip from github
paperweight
send the errors, but should still try to use git clone
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I will try to use git clone in a bit
how do i modify a patch in paperweight-patcher for a custom paper fork
See Paper's contribution guide here: https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md
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๐
)
try a build via terminal
how can i build with the terminal?
the error that i am getting is: Dependency 'xyz.gameoholic:partigon:1.3.4' not found
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
thank you๐ ๐ at list i know what's the problem
can you recommend other particles libraries?
wait that lib sounds so fucking cool
yeh i know but its not working (for me at least)
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
๐ค even their example project cant load the dependencies๐คทโโ๏ธ
is this the correct place to ask a question about paperclip?
yes
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
You would need to use that updated version of paperclip in papers build files and then compile paper
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
Hi does someonoe know a easy or any way to compile plugins from github?, there is no release and I want to use some
what program do I need or I can do everything with cmd
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
"object"?
change the version lol
oh a paper fork?
yeah
no clue how that works
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,
any forks i've seen just do it
like without regard for merge conflicts, because i assume they have none
install maven und run "mvn package" in the projects folder
Is no one else having problems with paper weight test plugin?
what exact issue are you having?
The gradle part always gives errors
send the errors
These errors
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
I can it has no useful info tho

