#build-tooling-help
1 messages · Page 2 of 1
ultimate
its intellij looking in the wrong places
it also happens when I change this https://github.com/PaperMC/Velocity/blob/e364e2c7d1918ec7c20986fb640f3f6a64127bb0/build.gradle.kts#L18 to 18
it definitely exists on WSL https://i.imgur.com/irDVnHn.png
Hmmm can't find it sorry, also look online but wasn't able to find anything. Even moving my jdk to another partition just worked when running the build script. So I can't help you sadly sorry
@distant mango i keep everything in the wsl2 in the past i set the java thing for example in windows and let wsl2 use this but since a few versions sago this broken and then (dont remember how) change a few things for keep all in wsl2 (java and reps)
wha
i am trying to create a project with 2 modules, one for the bukkit part and the second one for the proxy, anyone got any idea why its always throwing this error?
I know that the wrapper task is included in the gradle files but i got rid of them since they should be considered as subprojects and not as a totally independent project
this is my current project build.gradle file
https://paste.gg/p/anonymous/53f765bb90764b189caa57dfbdb0e0b0
i happened to fix it by unlinking the 2 projects from the main in the gradle window
there were 3 elements now there is only my project and it works great.
I've got a 3-module project, and I'm trying to use paperweight in only 1 of those modules (so paperweight isn't present in any of the other modules & base build.gradle.kts), while still having 1 final jar file at project/build/libs
How can this be done?
When I do gradle reobfJar, there's no jar in project/build/libs, and if I do gradle shadowJar, then there's only a non-remapped jar that would error out if I used NMS
I tried to put kt tasks.shadowJar.get().finalizedBy(tasks.reobfJar) in the module but that also does not give a remapped jar - although in project/module/build/libs the remapped jar is there
I'm just using gradle implementation(project(":module")) in my base build.gradle.kts - how can I make it shade the remapped one instead of the normal?
tldr - how do I setup a multi module project with only 1 module using paperweight while shading all of the modules into 1 final jar?
project(":paperweight-module", "reobf")
is how you depend on the reobf artifact of a project using userdev (from within the same build)
ohhhhhh what 👀
I didn't know gradle could do that
I'll try that!
oh yep it works! ty 😃
yw
so when I use ./gradlew applyPatches
I get Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upstream/upstream, also tried with --stacktrace flag and basically got the same thing
Did you download as zip or git clone?
git clone
./gradlew applyPatches -Dpaperweight.debug=true should give more info iirc
okay lemme try
Okay so that didn't work for me. I think it's prolly because this is Folia I'm trying to work on and not Paper (which is my fault for not mentioning)
Here's that message:
Task '.debug=true' not found in root project 'folia' and its subprojects.
./gradlew applyPatches -D"paperweight.debug"=true did it!
Here's the paste from that: https://pastebin.com/4QxZNc4x
I saw that error about another git process running. I don't know if that's what caused the crash, but I don't have bash or anything other than InteliJ open rn
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 don't see any sort of session lock in .git either so I think that it's good?
okay I don't think it'd be any anti virus stuff cause I really only use windows defender lmaoo
well that can bork stuff too
when I use reobfed jar from paperweight I get errors like these:
restart server
same :/
show new error
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
full log
it is full log of error, is full log of server needed?
Use the correct version of item-nbt-api-plugin. 2.11.2 is the latest.
anyone know how i can make gradle shadow minimize not remove classes in me.epic.spigotlib.nms? ive tried ```groovy
minimize {
exclude("me.epic.spigotlib.nms.**")
}
exclude("me/epic/spigotlib/nms/**")
}```
now the nms dir isnt even added to the jar
java.lang.NoClassDefFoundError: net/minecraft/network/syncher/SynchedEntityData
Using nms in 100s of other things in the same project
Just suddenly started getting this
SynchedEntityData dataWatcher = new SynchedEntityData(null);
#paper-dev message This doesn't look like you're using our supported tooling
I just did
Now I'm getting error: void cannot be dereferenced
@smoky violet
id "io.papermc.paperweight.userdev" version "1.5.4"
paperweight.paperDevBundle("1.19.3-R0.1-SNAPSHOT")
relocate 'org.spigotmc.spigot', 'shaded.org.spigotmc.spigot'
Why would you relocate spigot? Lol
Ok wait I'm confused
What am I even trying to do
I want to relocate nms
Is the paperweight-test-plugin only compatible with paper dev?
if you don't use any paper specific stuff it'll work on lesser platforms too
no, relocating nms is not something you ever want/need to do
Yeah I'm starting to understand now, never used this tool or gradle
So I assume the tool automatically remaps nms
if you use the reobfJar task it will, yes
you can also make the build/assemble tasks depend on reobfJar to make ./gradlew build reobf too
Alright so that means
That I can just add the id
And run reobfJar task
I am required to add a paperweightDevelopmentBundle
you need a dev bundle yes
Am I just selecting 1.19.3?
why not .4
yes
Alright, executing the task now
Lets see
:installed server artifacts to cache
:done setting up paperweight userdev workspace for minecraft 1.19.3
> Task :compileJava
that's not an error with paperweight and more an error in your code
I'm not sure why you deleted the message that showed you the offending line of code
Using Java 17
I'm getting an error with io.papermc.paperweight.userdev version 1.5.4 with this buildscript: ```kt
plugins {
id("io.papermc.paperweight.userdev") version "1.5.4"
}
tasks.withType<JavaCompile> {
sourceCompatibility = "16"
targetCompatibility = "16"
options.encoding = "UTF-8"
}
dependencies {
paperweight.paperDevBundle("1.17.1-R0.1-SNAPSHOT")
}
:executing 'apply patches to decompiled jar'
:executing 'apply patches to decompiled jar'
FAILURE: Build failed with an exception.
* What went wrong:
Failed to apply dev bundle patches. See the log file at `...\patchedSourcesJar.log' for more details. Usually, the issue is with the dev bundle itself, and not the userdev project.
```Anything I should try to fix?
Previously I had this error with java 19, but I'm on java 17 now :/ (confirmed with running the command in terminal - still happening)
Patch Summary:
Un-changed files: 2420
Changed files: 680
Missing files: 0
Failed matches: 2
Exact matches: 4470
Access matches: 0
Offset matches: 0
Fuzzy matches: 0
Overall Quality 99.96%
2 failed ☹️
for whatever reason this works fine on github actions
not sure what's wrong with my local environment
run the clean task and try again
can someone help me with a patch for paper?
im trying to apply a "SlimeWorldManager" patch and everytime i try to applyPatches it says the patch is empty.
and phoenix616 the weird bot says the tool cant lie so it must be empty, but none of these patches are empty.
Build-changes.patch has 5kb and SlimeWorldManager.patch has 110kb
and as u can see on the screenshot the file is not empty
Try applying it manually and making a new patch out of that
I change from maven to gradle but when export the jar the shadowed dependencies dont appear in the jar file, im using the johnrengelman.shadow plugin
I looked in META-INF and all folders but the HikariCP library does not appear
you might need to include the version in the dependency() for the shadow plugin too
not sure, but thats like the only thing I can spot that looks off
I tried that too, but not works
get rid of the whole shadowJar { } block
and in dependencies { } replace shadow with implementation
then run ./gradlew shadowJar
also, update the shadow plugin to 8.1.1
Worked bro
Thanks ❤️
@verbal skiff
So i have 2 servers and i want send a shadow jar copy to his plugins folders when i build
I searched in gradle and the shadow plugin docs but i dind't find how
Do you know how do it?
Im trying to create a paperDevBundle that is a pufferfish fork, but when creating the dev bundle and trying to use it from another project a bunch of stuff breaks, im getting Cannot access net.kyori.adventure.identity.Identified on player objects, Cannot access net.kyori.adventure.translation.Translatable on block object, anyone have an idea on how to fix this?
Here is my gradle for the devBundle ```tasks.generateDevelopmentBundle {
apiCoordinates.set("gg.pufferfish.pufferfish:pufferfish-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
)
}
publishing {
if (project.hasProperty("publishDevBundle")) {
publications.create<MavenPublication>("devBundle") {
artifact(tasks.generateDevelopmentBundle) {
artifactId = "dev-bundle"
}
}
}
}```
and this is for my other project trying to use it:
Cannot access would generally either be a java version issue or something is borked with your classpath
idk how you'd induce the former given version requirements, and no idea how you'd induce the latter
Not sure, its very strange because the objects are resolving in my idea, just not working when i compile
You see nothing wrong with whati have for the devBundle?
Well, I mean, you should probably change the defintion so that you're not infringing on somebody elses namespace
as well as the fact that that paperDevBundle doesn't look like the example, but, if it's picking up the dep, eeer... 🤷♂️
Hello, when i want to sync my gradle project then i have this erro: ServerManager:main: Could not resolve io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT. and when i want to build it i have this error: ``` Could not resolve all files for configuration ':compileClasspath'.
Could not resolve io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT.
Required by:
project :
Could not resolve io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/io/papermc/paper/paper-api/1.19.4-R0.1-SNAPSHOT/maven-metadata.xml.
Username must not be null!
Could not resolve io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT.
Unable to load Maven meta-data from https://repo.papermc.io/repository/maven-public/io/papermc/paper/paper-api/1.19.4-R0.1-SNAPSHOT/maven-metadata.xml.
Username must not be null!```
Repositories: https://paste.labymod.net/udopufadag.bash
do i need so specify a username for all repos?
no
how do i fix this?
My only guess is that it's pissed off that the one repo where you tried to define that stuff is apparently not properly set or something
when i remove all repositories but not the paper repository the error still happends
best guess would be that it's something in your build config elsewhere
like, you have multiple repos screaming about the username being null
should i recreate the project?
How do I merge submodules into one jar ? 😄
Using gradle btw
I have been developing java for a long time so i am kinda embarrassed by that 😄
Nvm figured it out
I cant reload userdev in gradle
Well I did not
easy option is generally a dist submodule
otherwise, you can basically make the root have the shadowJar task and configure it there
I have submodules with their own buid.gradles
I included them in the root one
All the submodules implement the root one
But they do not get merged
"included"
that means literally nothing
including it inside of the project just means that gradle will load its config, etc
it doesn't make gradle produce a shadowJar, etc
as I said, either you make the root submodule pull that stuff in through shadowJar or basically setup some task which will produce a merged output (google..); or, easy option is to just setup a dist submodule
do you have shadowJar configured in the root module?
Yes + in sub too
do you have it configured to pick up those modules as dependents?
No because it does not need any of the classes from the submodules
well, there you go
you need to actually tell shadowJar what it needs to pick up if you want it to actually pull that stuff in
Yes, and if you want the root module to dump out a jar, you need to configure shadowJar in the root project to actually pick up the submodules configurations so it can produce something
I could not find how to do the merging into one on google
Can you please help me 🥺
I think I will just make a common subproject and the root will handle the merging
hello gamers
does anyone use gradle composite builds and does buildSrc from an includedBuild work properly
trying to use gitpatcher on Velocity but it doesn't seem to find any source / refuses to build anything
use the gradle shadow plugin
add the kotlin stdlib library as implementation in your dependencies block
@verbal skiff perhaps you could give me a hand here
since you rewrote most of that logic into buildsrc recently
e.g. running ./gradlew :marina-proxy:build does compile buildSrc since otherwise it would have thrown a stacktrace for unresolved references (which is what happens if you include Velocity instead of includeBuild as a composite build)
but returns https://pastes.dev/i0S5wbiTQZ NO-SOURCE on basically everything and doesn't seem to trigger other projects
this is the first time im using an external library in my plugin (intellij) and im not really sure how it works.
If I add it as a dependency in gradle.build do I also need to add it as a module or?
No. If you add it to the build file, just refresh gradle in your IDE
ah thx
i've followed this guide https://github.com/HelpChat/Wiki2/blob/master/piggys-barn/java/how-to-run-your-minecraft-server-s-in-intellij.md to setup a run configuration inside intellij to run the server, but could I also make intellij automatically place my plugin in the server directory?
nice, thx
is there a way to add a directory src/main/template as a java source in my IDE, but not have gradle actually compile the files there?
why?
Hey I am creating my own fork but I am getting Project with path ':pufferfish-api' could not be found in project ':myfork-server'.
I know it is not there
But at what step of paperweight should it be created and why wasnt it when there is no error
The same was happening for me with paper
I use the example configuration of forktest just edited the upstream to pufferfish
How did you edit the upstream?
For an upstream that isn't Paper you have to use a different syntax
paperweight {
serverProject.set(project(":fork-server"))
remapRepo.set(paperMavenPublicUrl)
decompileRepo.set(paperMavenPublicUrl)
useStandardUpstream("pufferfish") {
url.set(github("pufferfish-gg", "Pufferfish"))
ref.set(providers.gradleProperty("pufferfishRef"))
withStandardPatcher {
apiSourceDirPath.set("Pufferfish-API")
serverSourceDirPath.set("Pufferfish-Server")
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
apiOutputDir.set(layout.projectDirectory.dir("fork-api"))
serverOutputDir.set(layout.projectDirectory.dir("fork-server"))
}
}
}
yeah that seems correct, hmm
https://pastes.dev/V5CKqEzOC1
this is the build file of my fork that works fine (and its pufferfish too) and looks exactly the same to me
you need to edit the build.gradle.kts in -Server to point to myfork-api
Oh
I thought it is going to use both
Oh I see how this work
Yeah thanks
I thought it is going to do that automatically
other than that changing the api path in org.bukkit.craftbukkit.util.Versioning is the only required change you need to make, anything else comes down to branding
perfect, thanks!
for future reference
plugins {
id("idea")
}
extensions.configure<IdeaModel> {
module {
sourceDirs.add(file("$projectDir/src/main/templates"))
}
}
I've been converting my maven project to gradle, took a while but it mostly works now, except for publishing to maven local. When I build, there are two jars, core-0.1.2.jar and core-0.1.2-dev.jar. Using maven-publish, if I run gradle publishToMavenLocal, only the second jar gets copied to the .m2 folder. The plugin integrating the library is using maven, 0.1.1 works fine, but when I switch to 0.1.2 it can't find it (Could not find artifact dev.michaud.greenpanda:core:jar:0.1.2 in papermc-repo).
build.gradle.kts.txt by @pure fern: https://pastes.dev/ff1vLq4srR
If I run my server using runDev, plugins such as NBTAPI cannot find the jar version, so will not load, is there anything I can do to run my server in dev mode while specifying a real version that plugins can detect?
runDev doesn't obfuscate the source so that plugins that hack into internals get what they expect
Either those plugins need to be updated to also work with Mojang mappings or you need to runObf
So my real issue is I want to be able to hotswap my forks code, so far I've been running in dev mode and rebuilding, is this the best way to do that, or is hotswapping unsafe?
Yeah thats my plan, doing it right now
For some odd reason, while running in dev mode, Bukkit.getServer().getClass().getPackage().getName() returns just org.bukkit.craftbukkit, however running in production it returns something like org.bukkit.craftbukkit.v1_19_R3
Yes, dev mode doesn't do relocation and reobfuscation
is it possible to make paperweight userdev use yarn mappings without generating reobf mappings in paperweight core / patcher while publishing the dev bundle?
(or maybe it doesn't use exactly reobf mappings for providing the source?)
oh, I see that it generates mappings in SetupHandler for remapping
but there is still a need for reobf mappings to reobfuscate a jar while building
But why
I am making my own gradle plugin based on paperweight
I am porting the ability of paperweight to provide paper source to fabric loom, and I need to support other mappings than mojang (making mod dev possible for paper sources)
Is there a way to get runMojangMappedServer to use a specific paper version? With runServer you can use build() but this doesn't seem to do anything with runMojangMappedServer
Depends on the Paper version probably. IIRC mojmaps are only recently available.
i was testing it against a version only a couple days old (1.19.4 build 520)
is there any way to get kotlin to work with JVM 20? trying to build a project which targets java 20 and I only get:
> Could not create task ':ignacio-api:compileKotlin'.
> Unknown Kotlin JVM target: 20
need to use a beta version of kotlin iirc
I did find this issue, https://youtrack.jetbrains.com/issue/KT-57669
Which states " The problem was fixed in 1.9.0-Beta, which is not released yet.".
So I'm guessing I need to use 1.9.0-Beta, but that isn't a version on the gradle plugin portal
I think I got it to work, I added this repository to both my build source and projects
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev") // Kotlin Beta
That has version 1.9.0-Beta-104 (the current latest version) of the kotlin plugin and stdlib and whatever
I'm having a really weird issue, I have 3 dependencies axel-common, axel-bukkit and axel-velocity in my common module I have compileOnly(libs.axel.common), which works, in my bukkit module I have
api(projects.malibuCommon) and compileOnly(libs.axel.bukkit), the bukkit module only has access to the axel-common stuff
but my velocity module, which only has compileOnly(libs.axel.velocity)can access the velocity stuff
I'm guessing that somehow axel-bukkit is not getting published right but doesn't make sense why axel-velocity would work
well without see the buildscripts it'll be difficult to tell
dependencies {
// compileOnly(libs.axel.bukkit) // doesnt have access to the bukkit stuff, only the common stuff
// compileOnly(libs.axel.velocity) // has access to velocity stuff & common stuff
}
axel-common = { module = "org.minearcade.axel:axel-common", version.ref = "axel" }
axel-bukkit = { module = "org.minearcade.axel:axel-bukkit", version.ref = "axel" }
axel-velocity = { module = "org.minearcade.axel:axel-velocity", version.ref = "axel" }
i mean of axel-bukkit
i cant find it
private plugin
1 seec
It worked before so idk why it randonmly stopped working now
maybe try (just to debug) publishing to maven local
also, do you see the axel-bukkit module in the repo online?
yes
ok I think I see something?
for velocity .jar is getting published but bukkit not
could be due to paperweight though
hmm okay that works
I think
Yeah local publish works
message.txt by @oak copper: https://pastes.dev/vBdAE83sqk
message.txt by @oak copper: https://pastes.dev/vTRmbiRoXG
Nevermind I fixed that
Anyone got any ideas?
could be an indra bug, or maybe your remote repository is broken
If it's something with my repository that wouldn't explain why the velocity module works
And indra hasn't changed anything with publishing to my knowledge
@smoky violet Would it be ok if I PR'ed a change to expose the lib jars from downloadSpigotDepencencies to forks? Paperweight already exposes the source jars of those libraries, I was thinking it wouldn't hurt to do the same for the lib jars themselves since they can be pretty useful for forks down the line [I also kind of need them too ;-;]
Still can't figure out my issue
Maybe take a look at the decompileMinecraftServerJar.log mentioned in the error, that could contain a more helpful error message
Is there a site where I can find a free towny pack?
what 👀
can I exclude dependencies from being remapped with reobfJar?
could I include a dependency into the jar after reobfJar is done?
Well, yea
It’s gradle, you’d “just” add a task that hooks reobjJar and bundles it in
Is there a way to get all the class files that a dependency has?
I'm not sure how to go about copying the classes into the jar
Can't you just run shadow again but with a different config?
Doesn't reobfjar executes shadowJar automatically? Just define your dependencies as implementation.
they want to include stuff in after reobfJar
guessing from their discussion elsewhere its cos they're using java 20 and the remapper doesn't support that atm
So basically more a xy-problem. Fixing the remapper to support J20 is the better solution.
yes but it's paperweight-userdev which uses tiny-remapper and I have no clue when they would update asm from 9.3 to 9.5, at least not soon enough that I can test my plugin out
so in the meantime I need a workaround
Just, fork, update dependency, see how good it is working out, pr.
If it takes them to long -> deploy plugin to local maven repo and use it for the meantime.
From my perspective the workaround you trying is more complex.
problem is, I did try that, but because I don't know what I'm doing it didn't work
cloned tiny-remapper, updated the asm version and published to maven local; cloned paperweight, updated the asm version, couldn't find where the tiny-remapper version is defined, publised to maven local, and had the same error
where does paperweight get its tiny-remapper version from?
so I got lorenz-tiny working, now denwav/hypo relocates its own version of asm, 9.2, into
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 64
at paper.libs.org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
and I can't update that because it uses some sort of reflection which is illegal in versions above java 17
only tiny remapper version is relevant here
if you modify/build tr locally iirc there's a configuration you could add resolution restrains to in userdev projects
to make it resolve a local version
and hope it doesn't break paper patches applying
do you know what configuration it is?
I think I've found it,
tasks {
reobfJar {
this.remapper.setFrom("$PATH_TO_LOCAL/tiny-remapper/build/libs/tiny-remapper-0.8.6+local-fat.jar")
this.remapper.forEach { println("> file $it") }
}
}
but I don't know if this actually works, since I still get this error:
https://paste.gg/p/anonymous/2d32b801fd5947fa950ae228c6c9a8ce
and this error seems to come from dev.denwav.hypo.asm, which uses a relocated version of asm at paper.libs.org.objectweb.asm
you probably need an older runtime for gradle still
from context i assumed you were shading some dep compiled for java 20 and the remap failed, that error is during mappings gen probably reading jdk classes
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.5.5"
id("xyz.jpenilla.run-paper") version "2.0.1" // Adds runServer and runMojangMappedServer tasks for testing
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "me.godofpro"
version = "1.0.0-SNAPSHOT"
description = "SupperHopper plugin for skyblock"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
implementation("dev.triumphteam:triumph-gui:3.1.2")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
}
tasks {
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.19"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
shadowJar {
fun reloc(pkg: String) = relocate(pkg, "me.godofpro.superhopper.dependency.$pkg")
reloc("dev.triumphteam.gui")
}
}
when i added vault api this happened
exclude bukkit from vault
worked thanks
A project that worked out of the box on my last windows 10 installation no longer seems to work, and I'm not sure why, and I have no clue what to do to fix it.
These are my dependencies, am I doing something wrong?
right okay
that's still very strange but thanks
so you're saying this is unrelated to paper?
I'm saying you're using the wrong class name
BlockPosition is from spigot's mappings
not mojang's
the strange part is that this worked fine literally 1 hour ago
but I'll change it to blockpos, thanks

ong
decompiled plugin that was compiled with BlockPosition & paperdevbundle
Decompiling Moment.....
Makes sense.
no i mean
maybe im just stupid and dont know how compilation works
but going from blockposition -> blockpos worked so thanks guys
With paperweight you're developing against mojang mappings.
Paperweight reobfuscates the nms part of the jar so that it runs on obfuscated/spigot mapped servers.
hey i'm trying to publish my own version of paper to my local maven repo, but it fails every time at the generating java doc section... how can i fix this?
Start by showing the error
That is useless
Show the actual error above it, lol
You have a javadoc error, Most likely introduced via your own changes, the log will tell you what is wrong
i'm stuck on something again
and that is when i manually add the jar file of my modified paper api in intellij, if i try to get my api as a dependency it wont recognize it
this is the error i get when i want to use the build.gradle file
well you should absolutely be adding it as a gradle dependency
did you add your local maven repo as a repository?
yes, this is my build.gradle
i have checked the file path and everything looks right to me
did you specify a valid java version? make sure you are using java 17 in the build.gradle (idk what gradle defaults to)
cause you obv can't include a dependency built on a higher java version
let me try real quik
nope same error
ok, so my next thing, is that you need more repos, cause you don't have all the transitive deps installed into your local maven repo
like adventure for example
would it be possible to just grab them from mavenCentral?
yeah, just add mavenCentral to your repositories in the build.gradle
okok
actually, idk if they are all in central?
you might have to just use paper's maven repo
now make sure its using your modified api
i just added the mavenCentral( ) line and it build the artifact
i think so yeah because i used some things i modified obviously and it still worked
or isnt that a sign its using my modified api
yeah, it should if you used the stuff you modified in the plugin
that was what i was thinking yeah, ok let me start my server haha
now i finally can test
thx a lot!! i've been struggling way to long with this
I've been getting into NMS to modify mob AI, and I feel like I've written a plugin that should work, but after I build it and try to test it on my localhost the server console gets an error saying that it can't find any class from NMS. I've tried following the paperweight/paperweight-test-plugin githubs for what to do, but nothing's changed
Is it a matter of what mapping is being used?
The error does not look like an NMS/mapping issue.
Looks like you registered a custom entity and then try to use the API getEntity method on it. Which won't work because there is no API representation of that entity.
Also why is everything in the io.papermc package 👀
I didn't rename the io.papermc to something else
certainly makes a it a bit confusing. But yeah, its an issue with the way you create your zHorse, not NMS or the paperweight plugin
I fixed that, and now I'm getting the error (I guess two now) I originally got
make sure you're building via the reobfJar task
wtf does this mean https://i.imgur.com/odzugVC.png
nvm I messed up something for a repo
Hello, how can I do that in my plugins the ä is displayed?
use UTF-8
Just the file or the whole plugin?
ideally everything
you have 366 errors and that screenshot shows exactly 0
the full output would be useful
message.txt by @balmy pelican: https://pastes.dev/Ie9nlK7BCL
you cannot randomly yank some patchees and assume it works
it worked when i removed the sand duping patch
but now i removed the sand duping patch + bedrock breaking and it doesnt
how can i enable those things without breaking it
gravity control + setting the config
dont want the plugin, i had this convo the last time i was here
i wanna do it by removing the patch
can you tell me how to do it that way?
how can i figure which depend on it?
by dropping the patch in the right way and resolving any conflicts that may arise
whats the right way
git rebase -i base in the Paper-Server and changing pick to drop
but you really shouldn't care this much about the few kilobytes of ram a single plugin takes, even if you run a "low ram" server
there's a class in the game that allocates 10MB worth of nothing
You will save more ram by unloading one chunk than by not using that plugin
Hey, I've bit problem with building MojangAPI, here's gradle configuration, in attachments is error
plugins {
`java-library`
`maven-publish`
}
java {
withSourcesJar()
withJavadocJar()
}
dependencies {
implementation(project(":paper-api"))
api("com.mojang:brigadier:1.0.18")
compileOnly("it.unimi.dsi:fastutil:8.5.12")
compileOnly("org.jetbrains:annotations:24.0.1")
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:2.2")
testImplementation("org.ow2.asm:asm-tree:9.4")
}
configure<PublishingExtension> {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
repositories {
mavenCentral()
}
tasks.check {
dependsOn(scanJar)
}
Error.gradle by @woeful gate: https://pastes.dev/OMOc0zqwdh
Okay, issue is, C:\Users\James\IdeaProjects\PaperFork\Paper\.gradle\caches\paperweight\taskCache\decompileJar.jar doesn't exist.
How can I fix that?
Run applyPatches first
Okay, seems to work
Hi I'm currently trying to backport my plugin BigDoorsPhysics but I am running into an issue with gradle.
The problem is I use the new teleport flags api whenever possible (I have abstracted my implementation behind an interface depending on the version of mc that is loaded) This works great for versions going back to MC1.17 however since I need to compile the subprojects for J17 I can't go back to MC1.16 because it maxes out its java version at J16. Is there an accepted way to compile different gradle subprojects at higher java versions than the primary project? I have tried messing around with toolchain but it always gives me an error about how a dependency is compiled for a higher version of Java
My project structure is this
- main
- versions
- v1_17
- v1_19
- v1_19_3
Any ideas what I may be missing?
Or does someone know of a project with a similar structure that I can learn from?
There was a disable auto target thing in gradle config for disabling their validation stuff which lets you have more control over the compiler levels iirc
I'm not seeing anything like that in the gradle docs. Do you remember if it was a plugin?
I didn't post the error initially because it is ungodly long, but here it is for more clarity
message.txt by @thin umbra: https://pastes.dev/MWX6qv2ekQ
yeah I thought discord would message.txt it
then it didnt
anyways, main build.gradle is: https://pastes.dev/kRirzipUn6
and the subprojects are: https://pastes.dev/i6ijK88xlt (with differing dep versions depending on their target)
what's your settings.gradle file look like?
I don't think you should change the name like that? doesn't that change the actual name, like the :versions:v17 stuff?
then you are referencing it by the old name
I'm not a gradle expert, but maybe don't change the name of each submodule in the settings file
honestly not sure, I kind of stumbled my way though until it produced a .jar that worked 😛
I'll try to clean up and remove that stuff, but I don't think that is causing my root issue
oh you also seem to have a java version mismatch?
like your root project is java 16
but some versions are java 17
correct that was the issue i was reporting
I'm trying to backport to 1.16, but if running on 1.19 I want to use the new teleport api
but since 1.16 tops out at J16 the root project needs to be J16 compatible
maybe you need to set the compile target version to 16 in the java 17 versions
javac can compile java for a lower version (assuming you don't use any java 17 specific stuff)
tasks.compileJava {
options.targetCompatibility = "16"
}
``` I think
that seems to have moved the problem a bit. Now instead of it complaining my modules are set the wrong version it is compaining about the paper dependency https://pastes.dev/klrZZgxf7y
I know the versions need to be compatible for it to compile, but given it is abstracted behind an interface and will only be loaded if a compatible version of java is present. It feels like it should be possible
maybe set options.sourceCompatibility = "17" too?
I think it should be possible too, just gotta find the right combo of settings
This is the new v1_19 build.gradle https://pastes.dev/Ga9QsUB1yR
But it is still erroring out https://pastes.dev/oP6SREBfPl
intellij wasn't a fan of the options. but I'll try it with it now
yeah options. is def not quite right https://pastes.dev/hqAEnavvsK
yeah I saw that too
yeah using top level still gets us right back to here https://pastes.dev/dFEXy1C8AB
It would be janky, but I'm wondering if I could nuke the subproject depenencies and instead compile them separate, shade them into one jar, then use reflection to discover the implementations of the interface at runtime
Edit: this actually worked #build-tooling-help message
because as much as this feels like something gradle should be able to do, I'm going through a ton of plugins source rn and they all seem to either not use the new api, or cut off support at MC1.17
but I am way too tired to rewrite my entire gradle build sequence rn. So I'll have to pick this back up tomorrow.
Thanks for the help Machine Maker ❤️
I suppose I could also make a separate git branch for 1.16 and just distribute multiple jars, but where is the fun in that
isn't Java 16 just the minimum version for MC 1.16? You can still run MC 1.16 with java 17
in fact, you probably should because java 16 is long out of support
https://paste.helpch.at/tefisubaxe.bash
bad class file: /home/jitpack/.m2/repository/io/papermc/paper/paper-api/1.19.3-R0.1-SNAPSHOT/paper-api-1.19.3-R0.1-SNAPSHOT.jar(/org/bukkit/plugin/java/JavaPlugin.class)
class file has wrong version 61.0, should be 54.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
how can I fix this error?```
I am getting this error while publishing my github repository on jitpack
any solutions?
The easiest would be to not use jitpack but a proper repo
Also the error seems quite clear, use the correct java version to build it with
(As modern Minecraft versions require java 17, not 10 which you try to use)
It is actually the max version, and unfortunatly spigot doesn't seem to let you disable that check (otherwise I would have just included instructions to do that)
i find it hard to believe that spigot locked JVM version support to a non-LTS version... but i'll give it a try later. I can't imagine there isn't some way to get it running on java 17
java 16 hasn't been getting any updates (including security updates) for a few years now
Just incase anyone comes across this later and wants to know if this idea worked, it did! https://github.com/bonn2/BigDoorsPhysics/commit/40990d328312357c2eeb4c53d27070028b7e3039
Just an incredible pain
It is possible to reuse a Paperweight Gradle Module in a other one ?
For ex:
Folia 1.19.4 -> Paper 1.19.4
To override only folia specific stuff
what
apply@paperweight to root project
then use the folia dev bundle for folia module?
@distant mango I do adapter loading in that project where i am working.
Means i have a Interface strcuture and loading different adapters for different NMS code Versions.
Now the plan is to use the Paper 1.19.4 Adapter and override in Folia the changed methods
Basically, no
You can use something like templates to generate source, but, the expectation is generally that one source tree is one source tree
You could maybe try to make the folia project depend on the paper one and exclude the paper dependency, but last I knew ides get weird about that
what is the CI download url? im trying to make a script to auto update paper
We also strongly recommend against auto-updating.
Many builds could be shipped that are incompatible with plugins you have or cause breaking changes. You want to know what you're updating, not do it automatically.
Having issues using gradle to grab the graal js engine, no idea why this is happening, not too experienced with gradle, but i successfully included the libraries
implementation("org.graalvm.js:js:22.3.1")
implementation("org.graalvm.js:js-scriptengine:22.3.1")```
Now i am getting a NoClassDefFoundError when trying to reference the classes (GraalJSScriptEngine), and ScriptEngineManager().getEngineFactories() is not finding the "graal.js" option.
any help appreciated, thanks
You need to shade the libraries into your jar using the shadow plugin
would it be possible to just add it to the classpath instead of shading it?
sure
kk
could potentially use the library loader spigot adds too
sounds good
just to confirm, this is the libraries option in plugin.yml?
https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/#post-4184317
this is the page I'm referencing
man I can't help but get excited and feel like I've missed out by not staying up to date since 1.12 lol
So to get the Bukkit-1.19.4 snapshot downloaded into my local maven repository, what should I do?
I have run ./gradlew publishToMavenLocal
I presume this'll do it
No, no it did not
Whoops
that'll publish a mojang mapped server jar to your local repo
just use paperweight userdev or see if the "how to nms dev" pin in #paper-dev still works if you don't want to use paperweight for some reason
I can't seem to work out the command to just get it to output the remapped jar
I need to compile a plugin that's dependent on the Bukkit remapped jar
holomobhealth
Ignore me worked it out
is there a way for gradle to ignore some modules for a task? like applyPatches on paper... if you have some changes to the Paper-API/build.gradle and the Paper-Server/build.gradle that rely on files in different modules, if those don't exist when you change branches, applyPatches fails until you remove those changes
can also just rm -rf the api and server dirs, but its kind of annoying
There are individual tasks for server and api patches iirc
but they still seem to require gradle to resolve valid api and server modules
like this, I added a line to the paper-api build.gradle to depend on a non-existent-module
this would be fixed by apply patches, or applyApiPatches
but I have to manually remove that line in order to run either task to overwrite that change
What could possibly cause this (in a fork using paperweight):
Caused by: io.papermc.paperweight.PaperweightException: Upstream data file does not exist.
try a clean build
How can i switch my plugin from spigot to paper api?
change the api dependency
Whats the 1.19.3 one?
Couldnt find a list
You want #paper-dev for this stuff BTW.
Alright ill ask there
If you're looking for basic API changes
Cannot set the value of property 'downloadService' of type io.papermc.paperweight.DownloadService using a provider of type io.papermc.paperweight.DownloadService.
send build log with --info and/or --stacktrace
sigh
if you're dealing with a multimodule project, it's generally an idea to like, point that out
due to a gradle limitation, you can only add the paperweight plugin to your project once
so, do it in the root module with apply = false
and then set it up in the relevant children
i mean i only had this issue when updating to 1.20
i was using 1.19.2
also in my root module my gradle kts file is this
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
plugins {
kotlin("jvm") version "1.8.20"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "net.mysterio"
version = "1.0-SNAPSHOT"
allprojects {
apply<KotlinPluginWrapper>()
apply<ShadowPlugin>()
repositories {
mavenCentral()
mavenLocal()
}
kotlin.sourceSets["main"].kotlin.srcDir("./src/")
sourceSets["main"].resources.srcDir("./resources/")
tasks {
shadowJar {
configurations = listOf(project.configurations["shadow"])
destinationDirectory.set(rootProject.file("./jars"))
relocate("kotlin", "net.mysterio.kotlin")
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
}
}```
wdym I'm a bit lost
add paperweight here
what about my other modules?
https://github.com/PaperMC/paperweight-test-plugin#notes-read-these
Due to a gradle bug, independently applying paperweight-userdev to multiple projects in a build can result in errors. To work around this, apply paperweight-userdev to the root project with apply false (i.e., id("...") version "..." apply false in Kotlin DSL), and then when applying paperweight-userdev to subprojects don't include a version specification. A more advanced solution would involve adding paperweight-userdev as a dependency to your build logic, see reflection-remapper and the source-remap branch on this repo for examples of this.
wait so do I have to add paperweight to the other modules if i'm doing the main one
add dit to the root project with apply false
then add it to whatever module you need it in as well
do i put apply false to both id(...) version ... apply false
only apply false on the root project's build.gradle.kts
where do I put it in the root project
then in wherever you need it just do id("io.papermc.paperweight.userdev") or whatever its called
plugins { ... }
i'm lost
under shadow
root
plugins {
kotlin("jvm") version "1.8.20"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.papermc.paperweight.userdev") version "1.5.5" apply false
}
other module:
plugins {
id("io.papermc.paperweight.userdev")
}
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
plugins {
kotlin("jvm") version "1.8.20"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.papermc.paperweight.userdev") version "1.5.5" apply false
id("xyz.jpenilla.run-paper") version "2.0.1" apply false
}
group = "net.mysterio"
version = "1.0-SNAPSHOT"
allprojects {
apply<KotlinPluginWrapper>()
apply<ShadowPlugin>()
repositories {
mavenCentral()
mavenLocal()
}
kotlin.sourceSets["main"].kotlin.srcDir("./src/")
sourceSets["main"].resources.srcDir("./resources/")
tasks {
shadowJar {
configurations = listOf(project.configurations["shadow"])
destinationDirectory.set(rootProject.file("./jars"))
relocate("kotlin", "net.mysterio.kotlin")
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
}
}```
so like so?
I believe yes
and then my other modules would be this
fun DependencyHandler.shadowApi(notation: Any) {
shadow(notation)
api(notation)
}
plugins {
`java-library`
id("io.papermc.paperweight.userdev")
id("xyz.jpenilla.run-paper")
}
group = "net.mysterio"
version = "1.0-SNAPSHOT"
description = "A base module containing FlashAPI"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
archiveFileName.set("FlashAPI.jar")
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
compileOnly(kotlin("stdlib-jdk8"))
shadow(kotlin("stdlib"))
compileOnly("com.mojang:authlib:3.16.29")
paperweight.paperDevBundle("1.20-R0.1-SNAPSHOT")
}
tasks {
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.20"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
}
it's gonna be a while gotta update all my modules before i can update
wait how do I add cmds to the build file like so
bukkit {
....
authors = listOf("devan_mysterio")
commands.create("help") {
aliases = listOf("holohelp")
usage = "/holohelp <args>"
description = "The main command of FlashDisplays Plugin."
}
permissions.create("flash.plugin.holo.admin") {
description = "Allows players to use FlashDisplays Admin Commands"
}
permissions.create("flash.plugin.default") {
description = "Allows players to see the version after using '/holohelp'"
default = BukkitPluginDescription.Permission.Default.TRUE
}
}
I want to change the upstream of a Paper fork from Paper to Purpur. My current solution is to create a normal "GitHub fork", edit the upstream target and then modify the patches so they are compatible with Purpur. Is there any less hacky solution to this problem?
The latter, I didn't find how to change the upstream's upstream from paperweight.
use paperweight patcher
^ For context, I want to change the upstream of AdvancedSlimePaper from Paper to Purpur.
well, that already uses paperweight patcher
so just change the upstream and fix conflicts
I mean yeah, that's what I'm doing
I have a fork of the repo with changed upstream and modified patches
I'm just asking whether there's a way to achieve this with paperweight
no, you cant change the upstream as a downstream
So, back to my current approach. Is there a way I can separate my "compatibility" patches from the ASP patches? If I understand it correctly, if ASP changes anything in their patches, I will have to do my process again.
My only idea was the following:
- Create a literal fork of ASP
- Change the upstream to purpur
- Create a paperweight fork of my fork
- Add patches to fix compatibility
I cant think of a good solution
ikr? It's horrible!
I dont think its worth the effort tbh, but am obiously biased
but yeah, your proposal is prolly the best way, but you gonna get merge conflicts in patch files
but you gonna get merge conflicts in patch files
How so? The patches from ASP and the compatiblity patches should be isolated in this case.
but the ASP patches will not apply on a different upstream
they could
Yeah, they don't merge
gonna try applyPatches and then rebuildPatches on the "literal fork"
But I am aware that I will get conflicts when upstream changes, at least it shouldn't be that hard to fix.
Yeah that won't work at all
Back to the original approach I guess
how can i build folia??
`java-library`
id("xyz.jpenilla.run-paper") version "2.0.1"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "me.godofpro"
version = "1.0.0-SNAPSHOT"
description = "Ranks Plugin"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
implementation("org.mongodb:mongodb-driver-sync:4.9.1")
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.19"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
runServer {
minecraftVersion("1.19.4")
}
shadowJar {
fun reloc(pkg: String) = relocate(pkg, "me.godofpro.ranks.dependency.$pkg")
reloc("org.mongodb")
}
}
``` not sure if it is because i am shading wrong
it happens on this line
statsManager = new StatsManager(this);
which is this
public StatsManager(Ranks plugin) {
Bukkit.getPluginManager().registerEvents(new StatsListener(plugin), plugin);
}
Make sure to restart the server properly
i am using runPaper and even deleted the run folder and ran again from scratch and still get this
Something is messing with the jar
plugins {
`java-library`
id("xyz.jpenilla.run-paper") version "2.0.1"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "me.godofpro"
version = "1.0.0-SNAPSHOT"
description = "Ranks Plugin"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
implementation("org.mongodb:mongodb-driver-sync:4.9.1")
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.19"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
runServer {
minecraftVersion("1.19.4")
}
shadowJar {
fun reloc(pkg: String) = relocate(pkg, "me.godofpro.ranks.dependency.$pkg")
reloc("org.mongodb")
}
}
here is the build file
fixed the issue
any clue why this is output when building my plugin when paper-api is set to 1.20?
tried spigot 1.19.4, paper 1.19.4, spigot 1.20 and paper 1.20
it only appears when paper 1.20 is used
some plugins still build fine, but some fail to build due to it it seems 
post your whole pom
you have something that is broken
but its not related to paper
something to generate the plugin.yml I guess?
that would be true yes, but this happens on projects without it aswell
https://github.com/MineInAbyss/Blocky/tree/develop
for example here
the plugin.yml plugin has always had that error, doesnt seem to be related to the maven provider one
thought it might be because of multi-module projects that it straight up fails to build, but seems not
https://github.com/MineInAbyss/Looty/blob/develop/settings.gradle.kts this project fails to build whilst the one above does not
versionCatalogs {
create("libs"){
from("com.mineinabyss:catalog:$idofrontVersion")
version("minecraft", "1.20-R0.1-SNAPSHOT")
version("nms", "1.20-R0.1-SNAPSHOT")
}
create("myLibs").from(files("gradle/myLibs.versions.toml"))
}
``` changing it to this gives this
Task :compileKotlin FAILED
1 actionable task: 1 executed
[Fatal Error] maven-resolver-provider-3.9.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] maven-resolver-provider-3.9.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] maven-resolver-provider-3.9.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] maven-resolver-provider-3.9.2.pom:2:1: Content is not allowed in prolog.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileKotlin'.
Could not resolve all files for configuration ':compileClasspath'.
Could not resolve org.apache.maven:maven-resolver-provider:3.9.2.
Required by:
project : > io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT:20230611.012227-12
Could not resolve org.apache.maven:maven-resolver-provider:3.9.2.
Could not parse POM https://repo.maven.apache.org/maven2/org/apache/maven/maven-resolver-provider/3.9.2/maven-resolver-provider-3.9.2.pom
Content is not allowed in prolog.
Could not resolve org.apache.maven:maven-resolver-provider:3.9.2.
Could not parse POM https://repo.papermc.io/repository/maven-public/org/apache/maven/maven-resolver-provider/3.9.2/maven-resolver-provider-3.9.2.pom
Content is not allowed in prolog.
Could not resolve org.apache.maven:maven-resolver-provider:3.9.2.
Could not parse POM https://repo.maven.apache.org/maven2/org/apache/maven/maven-resolver-provider/3.9.2/maven-resolver-provider-3.9.2.pom
Content is not allowed in prolog.
Could not resolve org.apache.maven:maven-resolver-provider:3.9.2.
Could not parse POM https://repo.papermc.io/repository/maven-public/org/apache/maven/maven-resolver-provider/3.9.2/maven-resolver-provider-3.9.2.pom
Content is not allowed in prolog.
the actual "Fatal Error" is present on all projects, but doesnt stop the Blocky one I first linked
after nuking this it still spits the error, some projects fail some dont
idk
there is an invlaid xml file somewhere
I thought the comment was the issue, but 1.19.4 used 3.8.5 of that lib and has the same comment
https://repo.papermc.io/repository/maven-public/org/apache/maven/maven-resolver-provider/3.8.5/maven-resolver-provider-3.8.5.pom
vs
https://repo.papermc.io/repository/maven-public/org/apache/maven/maven-resolver-provider/3.9.2/maven-resolver-provider-3.9.2.pom
make sure your maven is up to date I guess?
or gradle?
idk
gradle is at 8.1.1 which seems to be latest judging by https://gradle.org/releases/
oh theres some whitespace
find that pom on your disk and see if you can add a whitespace after the first line
like a empty line
well if im not using mavenLocal as a repo would that matter?
https://pastebin.com/fgaXFyxD this is my local one for 3.9.2
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.
Try running the clean task
Afaik, those files are valid
It’s pretty weird that you have multiple repos reporting the same error
same thing, clean task doesnt fix it
But, I mean, that would in part make sense as we literally just mirror central there
There was an extra flag to tell it to refresh dependencies
Clean and then build with that flag
2 second google is mostly just pointing to a mangled gradle caches dir
Try yeetimg the gradle caches folder
My build always fails when I try to build it on Jenkins:
17:34:40 Execution failed for task ':reobfJar'.
17:34:40 > io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: /var/jenkins_home/workspace/PaperLib/.gradle/caches/paperweight/taskCache/reobfJar.log Classpath: /var/jenkins_home/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.6/a584208ddeebec2eb210aaa2a6f8622052c07132/tiny-remapper-0.8.6-fat.jar
The log file contains the following:
Command: /var/jenkins_home/tools/hudson.model.JDK/Java_17/zulu17.42.21-ca-crac-jdk17.0.7-linux_x64/bin/java -Xmx1G -classpath /var/jenkins_home/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.6/a584208ddeebec2eb210aaa2a6f8622052c07132/tiny-remapper-0.8.6-fat.jar net.fabricmc.tinyremapper.Main /var/jenkins_home/workspace/PaperLib/build/libs/PaperLib-1.20-v1.0.0-dev-all.jar /var/jenkins_home/workspace/PaperLib/build/libs/PaperLib-1.20-v1.0.0.jar /var/jenkins_home/workspace/PaperLib/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/data/mojang+yarn-spigot-reobf.tiny mojang+yarn spigot /var/jenkins_home/workspace/PaperLib/.gradle/caches/paperweight/setupCache/applyMojangMappedPaperclipPatch.jar --threads=1
Can't read input file /var/jenkins_home/workspace/PaperLib/build/libs/PaperLib-1.20-v1.0.0-dev-all.jar.
Does anyone know whats wrong?
No sorry, forgot to add that. The directory is empty :/
But only if I execute it on the jenkins. On my computer everything works fine.
Hi so long story short I asked for help in wrong channel before so I will just re-asked here..
so I am having an issue with importing paperweight dependency to my plugin I am relatively new to gradle so I don't know a lot about it and the example plugin is using .kts on build.gradle "config" so I would need a little bit of help on this part 😅
I mean, what issue?
so I am not sure how to implement paperweight dependencies into "normal" gradle build config ...
Basically, the example plugin iirc notes the required tweaks to the format required for a groovy plugin
the kotlin build scripts are generally replacing the groovy ones within the community, and so you're not going to get too much support using groovy
ohh i see so its low key recommended to switch to kotlin build scripts?
yup
ahhh oki will do that then .. thanks :)
ok so i somehow managed to get project with kotlin build script.. just for referace I took test plugin code for example just to see if I did everything right and code wise it looks like I did but when it comes to loading the plugin on the server I cant manage to get it working...
this is the error I am getting
[21:37:15 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'TestTest-1.0.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.2
at org.bukkit.craftbukkit.v1_20_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:382) ~[paper-1.20.jar:git-Paper-9]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:119) ~[paper-1.20.jar:git-Paper-9]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.jar:git-Paper-9]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.jar:git-Paper-9]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39) ~[paper-1.20.jar:git-Paper-9]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.jar:git-Paper-9]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:431) ~[paper-1.20.jar:git-Paper-9]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:273) ~[paper-1.20.jar:git-Paper-9]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1103) ~[paper-1.20.jar:git-Paper-9]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.20.jar:git-Paper-9]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
quote the api-version in your plugin yaml file
Ok that worked thank you!
why does paperclip still use java 6
it doesnt
its a multi module jar
the java 6 module is onyl fallback, to provide user friendly error messages if you dont use 17+
dont suppose that could be bumped up to 7 or even 8?
since new gradle versions don’t support java 6?
as a release
my pr probably failed to build
could also have been because i set the toolchain to 17
oh it is
How do you choose what repository paper gets paperclip from so i can test a local build of pc?
yeah, just change the version their and add mavenLocal to your repositories I guess?
got it 🙂 https://i.imgur.com/RV197UR.png
6 was just like, the "default" version back when we tried to push for 8, and so having the bootstrap class at 6 allowed us to tell people off
i have 1 of my own plugin running on the server and i am creating another plugin to hook into that. how can i do that ?
Just add a dependency on that plugin, then you can use it's classes
so is this correct ?
plugin.yml :
depend: [Ranks]
build.gradle.kts:
compileOnly(files("libs/Ranks-1.0.0.jar"))
Well, ideally you don't want to use a libs folder
But publish to a proper maven repo, or your local one I guess
alright thanks
Hi, how can I add some plugins to my server?
you... put them in the folder called plugins

and where can you add fashion to the server?
what
wat
modifications
Do you mean fabric?
are you using a machine translator?
im trying to migrate from groovy gradle to kotlin gradle but i have some errors and know nothing about kotlins' gradle anyone can help with the bottom error?
java {
var javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
Val cannot be reassigned
change var to val
change toolchain.languageVersion = to toolchain.languageVersion.set(..)
How do I shade the kotlin stl into my plugin? I use gradle
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
using shadow
https://github.com/johnrengelman/shadow
Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
kotlin-reflect doesn't like being relocated with vanilla shadow tho
any gradle pros here? Is there any way to prioritize the already compiled classes over all dependencies when compiling incrementally? (Other than manually rewriting the javac classpath arg?)
Struggling-
java.lang.NoClassDefFoundError: javax/websocket/DeploymentException
at io.github.haappi.duckvelocity.Chat.SendDiscordHandler.<init>(SendDiscordHandler.java:19) ~[?:?]
at io.github.haappi.duckvelocity.DuckVelocity.onProxyInitialization(DuckVelocity.java:33) ~[?:?]
at io.github.haappi.duckvelocity.Lmbda$1.execute(Unknown Source) ~[?:?]
at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[server.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597) ~[server.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478) ~[server.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException
at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:87) ~[server.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:64) ~[server.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
... 9 more
build.gradle: https://hastebin.com/share/uhipimamew.java
wait its in libs i didnt have that opened oopsie
resolved lol
even though clearing the gradle cache fixed this, seems like spigot just now downgraded again
hello! i just want to stream on tiktok while [playing minecraft and have people control my world. need someone to guide me on how
i know ill do that
but like with java 17
oh
where
thank u
i am confused fr.... installed adoptium java added it in path of user and system variable (also with JAVA_HOME) variable.... but the result... looks like above.
no error but no response too
fixed it nvm..
problem was C:\Program Files (x86)\Common Files\Oracle\Java\javapath
||I'm a bit rusty with building java stuff so please excuse any silly mistakes or misunderstandings 🙈 ||
Is there anything I have to specially consider when working with external dependencies in Velocity plugins?
https://docs.papermc.io/velocity/dev/dependency-management#external-dependencies does not mention anything besides shading & relocating which I've done
But using e.g. StringSerializer.class.getName() I still get a Class me.cryne.common.serialization.StringSerializer could not be found despite it being present in the plugin jar
generally, no
if you're using shade + relocate, only guess would be make sure you grabbed the correct jar, otherwise, provide the logs
Yep, I checked the hashes and the right jar is loaded… which logs would you need? I've also quickly created a git repo at https://gitea.cryne.me/Paddi/VeloTrack with so everyone can see me messing around with kafka
The decompiled JAR seems to be correctly built too 🤔
the log from the proxy where stuff supposibly blew up
There is just the log entry from https://gitea.cryne.me/Paddi/VeloTrack/src/commit/b1b674617692c902f211fb6f007b4d75365fec7d/src/main/java/me/cryne/velotrack/events/ServerJoinEventListener.java#L33
[velotrack]: Failed to write event to Kafka: me.cryne.common.config.ConfigException: Invalid value me.cryne.common.serialization.StringSerializer for configuration key.serializer: Class me.cryne.common.serialization.StringSerializer could not be found.
Removing the try/catch it "blows up completely" but is essentially the same error https://hastebin.cryne.me/lohukeqavecosicusugojezayujagawo
Oh well… this seems to rather be some issue of Kafka for whatever reason not finding the class
VeloTrack.logger.info(Class.forName(StringSerializer.class.getName()).getCanonicalName());
works fine so I guess the class technically is present
Okay, the longer I look at this the less this seems to really be an issue with Velocity/my build setup and more like a quirk of Kafka.
Despite the docs https://kafka.apache.org/35/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html saying that the class name should be put in the props, as far as I was able to tell from the actual source, the actual class should be put there. And when I did put the class in the props it worked the error at least changed to something unrelated to classloading.
Soooo thank you but also sorry for kind of wasting your time?!
After some more adjustments it's working now, so yeah it was no paper/building problem to begin with, sorry
this isn't a marketplace and this wouldn't be the channel if it was
any gradle experts able to help me with something? in build-logic i have a file called extensions.kt with
fun Project.channel(): String {
return if (project.version.toString().endsWith("-SNAPSHOT")) {
"Beta"
} else {
"Release"
}
}
and in my build.gradle.kts I have
channel.set(project.channel())
results in https://i.imgur.com/AIVLVd0.png
nvm
I just reset my PC, and paperweight-userdev is having issues with patches/git, any ideas on how I can fix this?
I'm also using my own paper fork dev bundle
try directly on D:
nope, same issue
that’s not directly on the d drive
shouldn't be an issue... one sec
sadly WSL doesn't work well with our firewall, can't fix it
I have the LongPathsEnabled registry key set to 1
also need to do something in git for that iirc
yup, that command's also done
did both of these - https://github.com/PaperMC/paperweight/issues/50#issuecomment-1256532773
Same thing, now on the root of the drive
building my paper fork works, will test with paper
testing w/ default paper dev bundle
weird... that works
i'll clear my caches so it pulls from the repo, I prob screwed something up
worked
Hi sorry if this is a dumb question, but does anyone know if I can use velocity on java, to add ram from my pc to a hosted server that i own. Its just a small private server with 1GB, its fine most of the time, but when we are 3 people on it, it lags. So it would be usefull if i could then get the server to also use some of my pc's ram.
oh sorry.
it's not possible to do what you're asking and even if it was, RAM is supposed to be extremely fast, having that over the network would break everything
Ok, thanks for the help.
can someone help me with shading my kotlin stdlib
Well, what did you try?
a lot but i starred yesterday with makking mod packs
if i run shade:shade i get the error message
Failed to create shaded artifact, project main artifact does not exist.
Anyone could help me configuring Kotlin KSP on my velocity plugin? I have set up this on build.gradle.kts:
But when I try to build it:
I don’t think we use ksp?
If we did, that would be in the 3.2.0 snapshots if that was merged
It is necessary to use an annotation processor in kotlin to generate the plugin .json file, I thought
I avoided it because of this:
Idk, as said, kapt should work
Ksp was brought up, but, idk if support for it was merged
So, not merged
Just, also, use the 3.2.0 snapshot builds, 3.1.1 is severely outdated
For velocity api? I tried but told me that they were not found on your maven repo
btw: you can also define it as an extension val (if you didn't know):
val Project.channel: String
get {
...
}
I did not, thanks!
I was pointed to this channel, so I'll try to ask a question here. What am I doing wrong here:
#velocity-dev message ? (Link so as not to rewrite all the information again)
idk if children classloaders have their services registered, afaik they don't
you'd need to Class.forName the Driver class from mysql, or use the non registering driver class directly
I tried using Class.forname("com.mysql.cj.jdbc.Driver) and Class.forname("com.mysql.jdbc.Driver"), also tried to go without it and without registration, but the error still appears.. exactly the same code works correctly in the paper plugin, where just a dependency is used in maven, but not in velocity, although I shaded the connector as you said.
are you sure that you're registering the driver before you try to use jdbc?
and, yea, ofc it works perfectly in paper, paper bundles the driver
Yes, the error occurs because of this try-catch, and in it the plugin registration is written "higher" than connection=DriverManager.getConnection(). Sorry for so many questions, I just want to calmly write my db-related plugins, but the errors don't even let me start:(
what error does that return?
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/
And name of db
not too sure, outside of "make sure that you don't have any weird spaces in there or something", idk
I'd need to have a means to test locally and I really don't have the will to
does anyone know if i can configure paper settings to make a string dupe work? on minehut
No such config
anyone know why im getting this error:
:cubed:test: Could not resolve io.papermc.paper:paper-mojangapi:1.20-R0.1-SNAPSHOT.
Required by:
project :cubed
project :cubed > io.papermc.paper:paper-server:userdev-1.20-R0.1-SNAPSHOT
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
my build.gradle.kts
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.
how can I fix this? trying to build a fork of a fork of Paper
had a DNS issue with piston-meta.<something> in the previous build attempt
Did you apply patches?
yes
I already ran createReobfPaperclipJar several times today, it worked, and now it suddenly stopped working
Best guess would be to do a clean build
likely due to outdated jdk
copy the release & toolchain stuff from the test-plugin build.gradle.kts and add the plugin from it's settings.gradle.kts
kk ill try
Also, generally the plugins {} block goes first in the build file, surprised it works with dependencies above it lol
it works now! I appreciate you I've been trying to get this working for the past like 3 days lol.
(Velocity plugin, but really not velocity related ish)
Anyone know why I am failing to find classes when I have declared the lib in my build.gradle?
Error: https://paste.gg/p/Zax71/a41200df4fd549c5933693ad400c35ab
Build.gradle: https://paste.gg/p/Zax71/dd9303124d384b359a23f905099889b
does paperweight-userdev do anything with maven publish?
no
if you want to publish the reobf artifact you need to configure it yourself ```kotlin
publications {
register<MavenPublication>("maven") {
from(components["java"])
artifact(tasks.reobfJar) {
classifier = "reobf"
}
}
}
theres a comment somewhere on the paperweight repo about why doing something automatically is complicated
and if you need the reobf artifact to be resolved by default don't add the java components
alright ty, but I"m a little confused. I have 3 projects, project A and B both use paperweight-userdev, project B depends on project A which works, project C without userdev depends on both B & A but is unable to access any of projects A's classes
Use the unpatch version which is 1.19
Heya i cant seem to get paperweight to work when i build i get this error:
message.txt by @obsidian moat: https://pastes.dev/qH1KDCkBdG
Did you apply patches?
Not yet
That would be why
Dont have any options in my IDEA:
Sorry im not used to gradle. I ussaly use maven. do i execute the gradlew or the one in /gradle/wrapper
./gradlew
Thx
Could someone help me with using shadowJar for HikariCP?
Do you know if there is a dependency for paperweight 1.8.8
no, paperweight wasn't a thing yet back in 1.8
see the pins in #paper-dev for instructions
wait how?
./gradlew shadowjar
wdym
oh waiit
you just do that command and it'll generate the shadowjar jar
there?
yes or in the intellij menu thing
this is that menu?
oh I see
I was always building projects by this menu, sorry
yea I found it
intellij
theme
material darker theme
thank you
mysql?
yes
wait no? I don't have it, I set theme to material darker and I don't have it like you
Idk if you got an answer on this, but this is the new style that you can use for the latest version of intelliJ.
Not a theme, but a complete new reworked UI.
It's pretty neat, unfortunately it kept crashing for me 🤷
Oh, thank you then, I don't know if I have latest version, prob no then
I'm gonna look on it when I will be at home, thank you again
you also have to specifically enable it under "New UI"
Yep I already found if but thanks
Does something like this exist for velocity? https://github.com/Minecrell/plugin-yml
idk how to do that i cant find any tutorials about shading or adding lib can someone help pls ?
Pls help
as I said, it depends on the build system you're using which you've not clarified
using the library loader or shading is a personal choice of which there is documentation for, once agian, depending on the type of plugin, which you've not clarified
its a paper plugin
so, paper-plugin.yml?
plugin.yml
so, not a paper plugin
But wdym ? its paper
plugin.yml is a bukkit plugin
paper-plugin.yml is a paper plugin
I mean, see the link?
you add the kotlin stdlib into that section
you might wanna use the maven central search thingy to get the artifact coords
a bit of googling might help. You need to figure out what the artifact coords for the kotlin standard lib are, and then you need to add those to the section that cat mentioned
artifact coords are something like io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT
yes
With paperweight, how do I fix the error: Unable to resolve class data binding for 'java/lang/Record' which is listed as the super class for 'zl'? (Full error: https://bytebin.lucko.me/cJgxC8MzQB)
Tried with java 17 and 19 ```kt
id("io.papermc.paperweight.userdev") version "1.5.5"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
dependencies {
paperweight.paperDevBundle(getVersionString("1.20.1"))
}
that would scream that your jdk setup is busted
🥲 should I reinstall jdk?
atm using ```
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)
idk, that generally means that theres something weird with the environment
like, it's saying that it can't find the Record class, which is 100% bundled with the jre
wdym environment?
Just tried to reinstall JDK but it won't work
I'll try an IntelliJ-installed JDK
hm
oh I think I might've been using java 8 accidentally?
idk but I removed everything from my build.gradle.kts besides paperweight, and then put it back together and it works now 🥴
also, not an issue or anything but how am I able to do id("io.papermc.paperweight.userdev") version "1.5.5"?
Even though if you look on https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paperweight/userdev/io.papermc.paperweight.userdev.gradle.plugin/, the highest version is 1.5.0
because we now push the plugin to the gradle plugin repo instead
Is it worth it trying to get paperweight (userdev) setup with maven if I prefer maven, or is gradle kind of all that is supported
paperweight userdev doesn't support maven at all
there is a 3rd party maven plugin out there that does, to some extent at least, what userdev does, but it isn't supported here
Thanks, since I'm less familiar with gradle, is it as simple as editing the build.gradle on a regular papermc plugin (eg generated with the minecraft dev plugin for intellij) to switch to using paperweight to start learning lower level parts of plugin dev
You should look at
Specifically the build.gradle(.kts) and settings.gradle(.kts)
Cheers will do
Anyone's ever had an issue where if you have 2 project with a build-logic and libs.versions.toml that it uses the other projects libs instead of it's own?
Hello I have a multiproject gradle and I want import paperweight in my subprojects so I have put this in the main build.gradle:
plugins {
id "org.hidetake.ssh" version "2.10.1"
id 'com.github.johnrengelman.shadow' version '7.1.2'
id("io.papermc.paperweight.userdev") version "1.5.5" apply(false)
id 'idea'
}
and in my subproject:
plugins {
id 'java'
id("io.papermc.paperweight.userdev")
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://repo.kryptonmc.org/releases' }
maven { url 'https://repo.papermc.io/repository/maven-public/' }
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
compileJava.getOptions().setEncoding("UTF-8")
compileJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
implementation project(path: ':UAAPI')
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.2'
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.19.4-R0.1-SNAPSHOT")
compileOnly 'org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT'
compileOnly group: 'redis.clients', name: 'jedis', version: '4.4.3'
compileOnly group: 'com.squareup.okhttp3', name: 'okhttp', version: '5.0.0-alpha.11'
}
But when I refresh the gradle project, I have:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
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.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 3s
with an error Argument for @NotNull parameter 'module' of com/intellij/facet/FacetManager.getInstance must not be null and NMS isn't mapped
try doing apply plugin: “…”
idk if it matters but that’s what I do
also remove your spigot dependency
How do I create multiple projects for a plugin? I would like to have a common library and implementations, however I'm not sure how to create a project like that. I am hoping to use Gradle with Kotlin DSL
So I'd have a common library, then a paper plugin, then a velocity plugin.
yeah, you can have submodules with gradle
you just have to add them in the root settings.gradle.kts
you can use intellij's "add module" thing to see what it does automatically and go from there
you define your seperate modules there
then you create a directory, for example called "paper" and put a build.gradle.kts in there
yeah but say i have no project right now. where do i start? do i just create the folder and put the gradle files in myself?
that um failed
give me a sec
$ gradle init
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().
output of gradle -v
okay great i've got my project
in IDEA can i just right click the root folder and press new module?
provided i've defined it in the settings.gradle.kts
uh
create a directory, put a build.gradle.kts in there
then reload gradle
is what I do
looks good
in terms of naming, for groupId do i just use com.domain.projectname and then for artifact id can i use paper,api,common,velocity
orr?
that's what I usually do, or com.domain,projectname as group then artifact as projectname-submodule
okay
if i want to use the same group for all submodules how do i do that
without having to redefine in every project file
either gradle.properties or put it in the allprojects { block
in the main build.gradle.kts file
okay got it
dm'd you something also
gradle/libs.versions.toml
god i'm so confused as to what i need to set up
well you'll need to apply the "java" or "java-library" plugin
f you want to shade, the shadow plugin
under which gradle files
your main build file
Can someone please link me an example of multimodule gradle project using paperweight-Userdev
getting this error.
you're not properly shading it in
this is me pom.xmlhttps://pastebin.com/fRez6QA2
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.
what do i need to fix?
try without minimizing
?

