#build-tooling-help
1 messages ยท Page 7 of 1
Guys why do you think I am getting these errors? I am using it as it shows on TAB and oraxen.
Error:
> Could not resolve all files for configuration ':paper:compileClasspath'.
> Could not resolve me.neznamy:tab-api:4.0.2.
Required by:
project :paper
> Could not resolve me.neznamy:tab-api:4.0.2.
> Could not get resource 'https://s01.oss.sonatype.org/content/repositories/snapshots/me/neznamy/tab-api/4.0.2/tab-api-4.0.2.pom'.
> Could not GET 'https://s01.oss.sonatype.org/content/repositories/snapshots/me/neznamy/tab-api/4.0.2/tab-api-4.0.2.pom'. Received status code 503 from server: Service Temporarily Unavailable
> Could not resolve io.th0rgal:oraxen:1.166.0.
Required by:
project :paper
> Could not resolve io.th0rgal:oraxen:1.166.0.
> Could not get resource 'https://s01.oss.sonatype.org/content/repositories/snapshots/io/th0rgal/oraxen/1.166.0/oraxen-1.166.0.pom'.
> Could not GET 'https://s01.oss.sonatype.org/content/repositories/snapshots/io/th0rgal/oraxen/1.166.0/oraxen-1.166.0.pom'. Received status code 503 from server: Service Temporarily Unavailable```
Code:
// config
compileOnly("dev.dejvokep:boosted-yaml:1.3.1")
// team
compileOnly("me.neznamy:tab-api:4.0.2")
compileOnly(files("libs/CMI-API-9.6.5.0.jar"))
// Gson
compileOnly("com.google.code.gson:gson:2.10.1")
// database
compileOnly("org.xerial:sqlite-jdbc:3.43.0.0")
compileOnly("com.h2database:h2:2.2.224")
compileOnly("org.mongodb:mongodb-driver-sync:4.11.1")
compileOnly("com.zaxxer:HikariCP:5.0.1")
compileOnly("redis.clients:jedis:5.1.0")
// others
compileOnly("com.github.LoneDev6:api-itemsadder:3.5.0c-r5")
compileOnly("io.th0rgal:oraxen:1.166.0")```
I understood that but why do I get 503 code for no reason
even when I specify teh latest version of the api's I get the same result
because gradle is exploding as one of the repositories you defined is currently not available ??
Hello, I have a problem with paperweight; it is stuck on:
:executing 'decompile transformed minecraft server jar'
How much memory do you have available ?
16GB
I have been waiting for 2 hours
windows?
Yes
Well that should be long enough 
are you using wsl on windows?
That's right
smells like crossing the network barrier
are you files in the /mnt folder ? e.g. are you using wsl on files that are on the windows drives
No, i don't believe so
Let me check haha
I was able to fix it already. Thank you anyway ^^
what was the issue ? would be great to know if others show up
I'm stupid. I limited the RAM in the environment variables.
Ah okay ๐ thanks for the info ๐
erm
i'm having this issue because intellij is using the paperweight jar? Therefore cant compile my plugin
is there a way to fix this?
using the shared cache experimental feature
shared cache is an experimental feature and is liklely not going to work on windows which is much more egregious vs *nix in terms of file locking
is there a way to disable file locking? I've been meaning too but i can't find anything
and its hella annoying
no
can i set up gradle to publish all modules to maven local?
without configuring maven-publish in every module
how so
could be a problem with windows path length again. regardless of if thats the issue you should disable that limit in git and windows registry. also try pulling from folia repo since leaf updated upstream
can i publish all artifacts with a single task?
Hi, how can I publish my fork api to maven local? When i run ./gradlew fork-api:publishToMavenLocal it executes successfully, however it doesn't publish anything
nvm, fixed i think
hello
could anyone please help with compiling a plugins remappedJar file to a specific output path
tasks.jar{
destinationDirectory.set(file("your/path"))//this works
}
tasks.reobfJar{
destinationDirectory.set(file("your/path"))//this doesnt
}
I am trying to add the paper mappings but I keep having this error
Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\Users\tobyw\IdeaProjects\DupeLifestealCore\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\tobyw\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.8.10\7b6ef88079ac1d0c306c4f243d689357978b5ae5\tiny-remapper-0.8.10-fat.jar
I've looked into it, and it appears that Can't read input file (of the plugin jar). I kind of understand what causes this, it is trying to reobfuscate the jar before it is built - which is why it cannot find it. However, I shadow my jar and I'm not entirely sure to resolve the problem. I did look at the paper documentation but I must be missing something.
share the log file in a paste, that error tells us nothing
Hi,
gradle question:
i'm using the paperwight userdev plugin io.papermc.paperweight.userdev and this plugin does produce a remapped jar and adds the classifier "-dev" to the normal one.
Now I wan't to publish with the maven-publish plugin.
The standart way you find explained online takes meta and jar from the component java:
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
However, this component (only) includes the "-dev" jar file I don't care about. I now I could add an artifact artifact(tasks.jar.get().outputs.getFiles().getSingleFile()) or something like this. However this would miss the meta data like dependencys.
Does the paperweight plugin provide an component or is there a way to replace the artifact / task of a component?
@ festive emily ๐did tell me, "pubishing the mojmapped jar would be correct".
So why does the plugin add the dev classifier and do I simply overwrite it ("dev" to "") in the publishing section to get rid of it then?
The idea of the dev artifact being published is that that is the one which has actually useful references to stuff which won't cause issues if others wanna deal with NMS
the plugin adds the dev classifier because it's the jar used at dev time, it's an intermediatary as such, and not generally what you'd consume outside of dev time
So you mean I should publish both, one to use in production, the other for other plugins to depend on it and they should add the classifier "dev" when declaring my plugin as a dependency?
Basically, publishing both is harmless
if you really only wanna publish one, publish the dev one
and, yes, people would need to explictly state the dev classifier
The remapped one don't need meta so I just can add it via artifact.
Alright, this makes everything so much clearer for me. Dumped way to many hours in this one.
Thanks a lot!
The remapped one is also generally going to be referring to classes which don't exist outside of a paperweighted environment
ideally, if you're using internals, you aim to provide a level of seperation with an API artifact if viable
windows path length limit perhaps?
ill move to c:\
either use wsl (thats the best option) or disable the limit
install gentoo

y it was path issue
can recommend distro hopping
fml
Sure, ideally if I use internals.
Probably overkill in most of my cases. But I will keep it in mind for future projects
no they wouldn't
unless the consumer is using maven
even then I think it might just work
can still remember you just randomly distro hopping while on a pr merge session 
Asking for a friend ๐ is there a difference between NMS paper and NMS builttools from spigot?
Paper allows you to easily use Mojang mappings
No need to touch external tools, no need for anything special in CI
yea, am really asking cause I'm already deep and paper nms requires gradle and am using maven ๐
Time to consider switching ๐
I know, but last time I touched gradle it messed my entire version control and deleted my entire project. my fault, but not good memories ๐
Time to make the switch 
papers stuff is generally integrated into gradle well and is pretty easy to setup for projects as you don't need to go and do things like "step 2) go run buildtools for X versions"
I did it in Arch Linux,same error
hello, I have problem with paperweight.
It does not consider classes that extends classes from another JAR that extends NMS classes. I already had this problem but now I have this one again. I added this code to paperweight config but it didn't work. I attached code after reobf and before
you would need to make sure that it's being passed into the classpath
i'm sure that archive passed to classpath contains needed class
try with java instead of kotlin
actually that looks like it reobfed fine
not sure what your problem is but that config is super cursed
explicit dependsOn is almost always wrong
i have buildSrc gradle plugin for easily passing paperweight to multimodule project
it works fine
i have superclass in passed jar (notmobentity extends PathfinderMob from NMS)
there is not difference between java and kotlin for paperweight because kotlin is compiled to jvm bytecode before reobf
problem is that goalSelector has not reobfed without explicit cast to EntityLiving
i hasn't problem with kotlin and paperweight before
kotlin relies on meta annotations for some features. those will not be remapped.
if the classpath is full and in the correct namespace then there's nothing more to check on the paperweight side, basically
how meta annotation can affect reobfing of this code?? it has not difference with java if it will have not annotation
Sorry for my extremely late response, I can do this but I did say that within the log, it stated that it could not read input file (of the plugin jar). there might be something I could be missing though
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
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.
send your build scripts I guess
Do you mind if I send you it privately? I know that no one would care but would prefer not to share my entire build.gradle on here ๐
To summarise it though, I basically use shadowJar
build {
dependsOn(shadowJar)
}
shadowJar {
dependsOn(jar)
//rest of this is mostly dependencies/relocating
}
tasks.assemble {
dependsOn(reobfJar)
}
it only breaks once I add the tasks.assemble (and the dependsOn(reobfJar)
remove the explicit dependsOn
99% chance that that is breaking how the thing expects that it's hooks will work
(from shadowJar)
so remove the dependsOn from the shadowJar?
yes, try without it
It still seems to give the same error
chances are your build script is breaking the expectations somewhere
i.e. improperly renaming files as part of the build process, etc
but, no idea; can't really see much with what was given
I'd be fine sending the whole thing to your dms but ik that's pretty annoying to do
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
Sorry to bother you guys but I just cannot find the solution to this issue
I've tried removing task.assemble, moving dependsOn(reobfJar) into different places, into the shadow, etc and I just can't get it to work
send your build script here
test {
useJUnitPlatform()
}
compileJava {
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
shadowJar {
dependsOn(jar)
//dependsOn(reobfJar)
archiveFileName = rootProject.name + "-" + rootProject.version + ".jar"
dependencies {
include(dependency('co.aikar:acf-paper'))
}
relocate 'co.aikar.commands', 'dev.dupemc.acf'
// I think we can remove this but I will check that later
zip64 true
subprojects.each { subproject ->
from subproject.sourceSets.main.output.classesDirs
from subproject.sourceSets.main.output.resourcesDir
}
configurations = [project.configurations.getByName("runtimeClasspath")]
}
build {
dependsOn(shadowJar, test)
}
tasks.assemble {
dependsOn(reobfJar)
}
you don't need the build dependsOn
if I remove the tasks.assemble, the jar will compile but won't reobfuscate (which makes sense) but adding assemble just provides the error from earlier
shadowJar depending on jar is also senseless
is that what is causing it to bug out?
I'll try again but will remove the build and the dependsOn in the shadow
also doubt you need the zip64
still getting the error aaaa
Command: C:\Users\tobyw\.jdks\jbr-17.0.7\bin\java.exe -Xmx1G -classpath C:\Users\tobyw\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.8.10\7b6ef88079ac1d0c306c4f243d689357978b5ae5\tiny-remapper-0.8.10-fat.jar net.fabricmc.tinyremapper.Main C:\Users\tobyw\IdeaProjects\DupeCellCore\build\libs\DupeCellCore-1.0-SNAPSHOT.jar C:\Users\tobyw\IdeaProjects\DupeCellCore\build\libs\DupeCellCore-1.0-SNAPSHOT.jar C:\Users\tobyw\IdeaProjects\DupeCellCore\.gradle\caches\paperweight\setupCache\extractDevBundle.dir\data\mojang+yarn-spigot-reobf.tiny mojang+yarn spigot C:\Users\tobyw\IdeaProjects\DupeCellCore\.gradle\caches\paperweight\setupCache\applyMojangMappedPaperclipPatch.jar --threads=1
Can't read input file C:\Users\tobyw\IdeaProjects\DupeCellCore\build\libs\DupeCellCore-1.0-SNAPSHOT.jar.```
wouldn't surprise me if tiny remapper doesn't like zip64
I'll try comment out that section aswell incase
actually it should probably work
idk, worth trying without. after that the next steps for debugging would be clone the paperweight-test-plugin and incrementally change it to be like your build script until it breaks
yeah I tried removing the zip and it still didn't work which is unfortunate
it looks like a permissions issue actually
๐
oh my god it compiled
one of many reasons we advise against changing output locations from the conventions
.
mfw
thank you so much guys, I just couldn't figure it out ๐ญ I do have one more question though
I decompiled the jar as a test and I see this result in the classes. I'm guessing this is nothing to worry about?
I mean, the decompiler blew up
all we can guess is that you used an old decompiler or something, it doesn't mean that the jar is bad though if it can't be decompiled
ah yeah it works fine on the server, guess my version of jd-gui is outdated or it just can't decompile it ๐
thanks for all the help guys!
I've heard good things about that one so might have to give it a whirl
recaf added vineflower the other week
my life is complete now
well, I still need a VF 1.10 release
so its stuck on this: ```gradle
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'dev.s7a.gradle.minecraft.server' version '3.0.0'
}
group = rootProject.group
version = rootProject.version
repositories {
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://nexus.hc.to/content/repositories/pub_releases/' }
maven { url 'https://maven.enginehub.org/repo/' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
}
dependencies {
implementation project(':adminutils-common')
compileOnly "com.google.code.gson:gson:${project.gson_version}"
implementation "org.bstats:bstats-bukkit:${project.bstats_version}"
compileOnly "org.spigotmc:spigot-api:${project.spigotapi_version}"
compileOnly "me.clip:placeholderapi:${project.placeholderapi_version}"
compileOnly "net.milkbowl.vault:VaultAPI:${project.vaultapi_version}"
compileOnly "com.sk89q.worldguard:worldguard-bukkit:${project.worldguard_version}"
}
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
}
}
// Here
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
relocate 'org.bstats', 'electricsteve.adminutils.metrics'
archiveFileName = "AdminUtils-Bukkit-${version}.jar"
}
tasks.build.dependsOn tasks.shadowJar
it just infinitely repeats
i even kept it running
Hey, so I tried to add a repo from github into my project using jitpack and the repo using the LATEST* verison. am looking to use lucko's helper repo but I have only experience using maven dependencies and repo (provided ones). How do I add a repo from github without it being provided?
by provided I mean where they write the dependency and repo to call, and I just paste it in to my pom. that's the limit to my knowledge on that
https://github.com/lucko/helper
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.lucko</groupId>
<artifactId>helper</artifactId>
<version>COMMIT_HASH</version>
</dependency>
``` the repo contains multiple projects
am looking for the helper one specifically, but might utilize more eventually
am trying to access the helper one (the default) https://github.com/lucko/helper/tree/master/helper
<dependency>
<groupId>me.lucko</groupId>
<artifactId>helper</artifactId>
<version>5.6.14</version>
</dependency>
``` think this should work
i dont use pom.xml, i use build.gradle, so i'm not really familiar with it
that worked, does that include the specific dir or all of them?
appreciate it ! ๐ works
@short trench are you using the latest gradle & are you using shadoww
shadow has issues with java 21 or something iirc
so probably use a j17 toolchain
if jackson includes j21 classes then thats fun
J5pLeoy.txt by @short trench: https://pastes.dev/aqWaqpnP5v
might just be jackson .-.
Getting this on runtime
[23:27:19 ERROR]: Could not pass event PlayerResourcePackStatusEvent to AdornTestPlugin v1.0.0
java.lang.NoSuchMethodError: 'void team.unnamed.hephaestus.bukkit.v1_19_R3.MinecraftModelEntity.setPos(double, double, double)'
at team.unnamed.adorn.bukkit.v1_19_R3.ModelElement.update(ModelElement.java:64) ~[adorn-runtime-bukkit-test-0.0.1-SNAPSHOT-all.jar:?]
I have an api that's divided in multiple versions and each version module depends on a specific version of another api
Test plugin build file:
plugins {
id("adorn.runtime-bukkit-conventions")
id("com.github.johnrengelman.shadow") version "7.0.0"
id("xyz.jpenilla.run-paper") version "2.2.0"
}
repositories {
mavenLocal()
}
dependencies {
// server api
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
// resource-pack plugin api
compileOnly("team.unnamed:creative-central-api:0.10.0-SNAPSHOT")
implementation("net.kyori:adventure-platform-bukkit:4.0.1")
//hephaestus-engine dependencies
implementation("team.unnamed:hephaestus-reader-blockbench:0.7.0-dev-SNAPSHOT")
implementation("team.unnamed:hephaestus-runtime-bukkit-api:0.7.0-dev-SNAPSHOT")
implementation("team.unnamed:hephaestus-runtime-bukkit-adapt-v1_19_R3:0.7.0-dev-SNAPSHOT:reobf")
// adorn dependencies
implementation(project(":adorn-api"))
implementation(project(":adorn-runtime-bukkit-api"))
implementation(project(":adorn-runtime-bukkit-v1_19_R3", configuration = "reobf"))
}
Version build file:
plugins {
id("adorn.runtime-bukkit-conventions")
id("adorn.publishing-conventions")
id("io.papermc.paperweight.userdev") version "1.5.11"
}
repositories {
maven("https://libraries.minecraft.net/")
}
tasks {
assemble {
dependsOn(reobfJar)
}
}
dependencies {
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
api(project(":adorn-runtime-bukkit-api"))
implementation("net.kyori:adventure-platform-bukkit:4.0.1")
implementation("team.unnamed:hephaestus-runtime-bukkit-api:0.7.0-dev-SNAPSHOT")
implementation("team.unnamed:hephaestus-runtime-bukkit-adapt-v1_19_R3:0.7.0-dev-SNAPSHOT")
}
publishing {
publications {
getByName<MavenPublication>("maven") {
artifact(tasks.reobfJar) {
classifier = "reobf"
}
}
}
}
And this is what's causing the issue
4.3.2 is current adventure platform bukkit version fyi
make sure to use the reobf jar and not the shadow jar
also publishing the reobf jar is questionable, as I said before it's really only meant to be used for production, anyone wanting to depend on your component would want the mojang mapped variant
Hmm
I'm getting something weird rn
Don't know if I'm wrong but I think the packages here are not reobfuscated?
This is what jd-gui shows on the compiled module
Yeah no coming back to my previous setup works fine except for this scenario where I have an api that overrides the setpos method of the entity
Seems like it's not being reobfuscated
May be a bug?
If youโre building against a library that exposes internal youโll need to include that library as part of the reobfuscator class path
How do I do that?
Oh mb for ping
Should I make a custom repository on my local machine?
Gradle warns against the usage of mavenLocal() which I currently use for my other project's module. I googled a little bit and came up with a few options and need some advice. Should I:
- Create a custom repository,
- Use the module several projects depend on as a root project and then add the projects using it as subprojects,
- Create a composite similiar to the previous paragraph,
- Leave it in
mavenLocal()
?
I assume the main issue is when you try to share the project to others as it makes building it harder
Its just me and my friend who hasn't switched to gradle yet so I wouldn't know
its a new branch, because I'm migrating from Maven
Another option I was thinking about was to just make it a standalone plugin and the other plugins will just use it's API, but a second problem arise, which is that I do not know if I will be able to use the datasource for the db
mavenLocal is funky because it breaks build portabiity & repeatability
ye exactly thats what bugs me about it
like, your stuff should generally be accessible from a maven repo in which can store those types of artifacts in a manner which is accessible to others, etc
Nothing wrong with mavenLocal
that would be ideal, yet I have no idea how to make private repos
so you're saying I should use composite builds
But yeah, don't rely on local deps for distribution
Okay composite build looks like the way to go. Thanks guys.
Just one question about this. Since we both use IntelliJ and the projects are in the same folder, I can't guarantee my friend has the same folder name as me. Is this a problem we can fix by him simply renaming his project folder?
Or does it use the rootProject.name?
A stackoverflow post says so, but the docs don't really say
setting the rootProject name is generally what it will use for the name for gradle
but, do note that there was/is a weird bug with IJ where if the expected name doesn't match the actual name it freaks out
thats the windows only one, right?
no
hmm, i dont think ive ran into that on linux
I certainly did 
Hi I have a question how do I use paperweights userdev and shadowJar I can't figure out how do I customize the gradle build file
https://paste.gg/p/anonymous/e99acabde555498ab0a03fb6c802d526 gradle file
paperweight will automatically hook shadowJar if it's installed
thanks <3
and what should i use?
the first one
is it shaded?
yes
why is jitpack saying this?:
Gradle 'publishToMavenLocal' task not found. Please add the 'maven-publish' or 'maven' plugin.
See the documentation and examples: https://docs.jitpack.io```
here's my `build.gradle`: https://pastes.dev/8kUK2VHwUk
probably because you're registering publications afterEvaluate
jitpack is useless anyways though
If youโre tryna publish a public library I would probably look towards places like codemc which offer free repository hosting
or just... maven central? which is also free
I guess, central used to be more strict around now allowing stuff that references stuff off their repo
so just moving my stuff over to gradle, and have my own 'nexus' plugin that handles database stuff and I am trying to hook into it using : compileOnly 'me.AlbusThepenguin:database:1.0.4.4' and doesn't work. The maven dependency that do work is <dependency> <groupId>me.AlbusThepenguin</groupId> <artifactId>database</artifactId> <version>1.0.4.4</version> <scope>provided</scope> </dependency>
is it in a public web-accessible repo or only installed in your local maven repo?
its my own repo on github
the maven artifacts though.
If you don't know (you would have had to explicitly set up publishing to a remote maven repository), that probably means it's only in your local maven repository - unlike Maven, Gradle does not check it by default. Add whatever the groovy equivelant of mavenLocal() is to your repositories section
is there anyone good with shadowjar and it's configuration with gradle kts dsl?
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
okay so basically what i need to do is to include 1 gradle subproject inside my final project jar, not anything else, like oither dependencies, how can i do it?
this is what i tried but it doesnt work
try project(โฆ)
it contains everything then
what do you mean by nothing else? by default it will include everything that included project has on the runtime classpath
gradle has the compile classpath and the runtime classpath
the compile classpath is the stuff you see in the IDE which you compile against
and the runtime classpath is everything included in the final jar
stuff like the implementation configuration will add a dependency to the runtime and compile classpath
but it will not add it to the inherited compile classpath
for that you need api
you also have runtimeOnly which only adds it to the runtime classpath
in general, the runtime classpath is always inherited, but the compile classpath is not unless explicitly requested
then tell me how to make the final jar include only my subproject files and not the whole gradleApi with it's dependencies, there is written on wiki to use shadow(gradleApi) but that doesnt work
with implementation(gradleApi()) you add the gradleApi to your runtime classpath
use compileOnly then instead
but this really stinks
you are doing something wrong
why are you using the gradle api in a project that you are also building for MC?
it actually has nothing to do with paper, i just want help with knowing that someone here will know hwo to help me xd
did you understand this part?
if you using compileOnly, it won't be added to the runtime classpath
so it wont be included in the jar
also, get rid of the dependency block in the shadowJar config
the DependencyFilter
i see, let me try then
still
with this:
tasks.withType<ShadowJar> {
archiveClassifier = null
}
dependencies {
implementation(project(":amber-platform-util"))
compileOnly(gradleApi())
}
what's amber-platform-util pulling in
it has no dependencies
rule of thumb, have you done a clean build and made sure the JAR is up to date?
nope still same result
Heyyy am i doing something wrong here https://mclo.gs/VughP4E ?
I mean, itโs upset with the Java target
Building with a newer version than itโs happy with?
does somebody know why my classes arent recognized anymore?
thank you for trying to help, i just needed to mark java as the source again
that should be done by the import automatically...
build configuration should be exclusively done by the build tool
intellij just reads the config
aka: you shouldn't have to mark anything as source explicitly
Aw man. That sounds like a good problem to have. Do I have too new of a version of Kotlin?
Oh so I can just downgrade the java version and I should be set?
probably 
it worked. I needed to use java 17.
My plugin that I run with the runserver gradle plugin doesn't apply utf-8 encoding, and I'm not sure why. I use Configurate to load from configs
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
runServer {
minecraftVersion("1.19.4")
defaultCharacterEncoding = Charsets.UTF_8.name()
}
Anyone got an idea?
Can it be because of IntelliJ or something?
try setting the encoding in the process resources task and the encoding on the file itself
On the file itself? As in the plugin or server jar?
don't use the dev file
use the reobfjar task
the dev jar is the dev jar
the one without dev in the name is the final jar, which is reobfuscated, assuming you ran the reobfJar task
what shoul i use
top
Does anyone have any documentation on the nms.
its not documented
are you looking for guides for NMS itself, or for using NMS
i need to write nms api for fake entities and more things
but i write it fisrt time
i used protolc lib but protocol lib doesnt work on 1.20.1
ProtocolLib works on 1.20.1
and 1.20.4 which you probably should use anyways considering 1.20.1 has several crash exploits
Heya, Am i being a bit stupid..?
# BUILD.GRADLE.KTS
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.5.11" apply false
id("com.github.johnrengelman.shadow") version "7.1.2"
}
# BUILD.GRADLE.KTS
subprojects {
println("Reloaded ${project.name}")
apply(plugin = "java")
apply(plugin = "io.papermc.paperweight.userdev")
apply(plugin = "com.github.johnrengelman.shadow")
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
repositories {
mavenCentral()
mavenLocal()
maven(url = "https://repo.papermc.io/repository/maven-public/")
maven(url = "https://mvn.horizonapp.net/releases")
maven(url = "https://jitpack.io")
}
dependencies {
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
}
}
# GRADLE.SETTINGS.KTS
pluginManagement {
repositories {
gradlePluginPortal()
maven ("https://repo.papermc.io/repository/maven-public/")
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0")
}
Gettings this error ProjectUndefined/build.gradle.kts:35:13: Unresolved reference: paperweight
What's your current Gradle version? shadow plugin kinda suggest that you are not on Gradle 8.4+
I Think its 8.4? ๐
Update shadow plugin to 8.2.2 or what the latest 8.x.x version is.
Done, Still gettings Unresolved reference: paperweight
Ah the multi module problem. No clue then, sorry.
All good, I'll wait for someone's help ๐
anyone knows how to work with protocollib? 1.20.1
Instead of configuring the plugin in the subprojects block you should make your own plugin that applies paperweight in the modules you want and there you can configure it without any problem
unsupported version and #paper-help / #general
dependencies {
extensions.getByType(PaperweightUserDependenciesExtension::class).paperDevBundle("...")
}
how i can enable second layer for fake player?
Send the right entity metadata for it.
i have a local dependencie how to add that it will be compiled with my plugin in gradle
First option which isn't the best option:
- add
mavenLocal()to your repos in build file - in dependancies specify the dependancy like others
Second option which is better, but requires you to be the creator of the module which I presume you are and is a gradle built module. Then you can use composite builds
eh...
?
where add mavenLocal()
in repos
So maybe someone can help me... I'm trying to compile PandeLootPlus from github so I can use it for 1.20 support...
I can provide the link if needed, but my big issue is, EVERY version built into ti gives me this error when tryign to compile it:
https://i.imgur.com/oE4w1l4.png
I've tried everything to get these working without issues but I cannot for my life get this sorted, if anyone has the time or is willing to jump in a call or DM with me to help me figure this out, i would GREATLY appreciate it.
Hope i put this in the right section btw, if not sorry about that.
I mean, we're not magicians
It's going to be either a java version thing, but, I doubt that, or down to how the project is setup
This is the project on github: https://github.com/Seyarada/PandeLootPlus
I am using IntelliJ Idea for the project, opening this folder (After downloading ofcourse) as a project.
It does it for "all" java versions so I dont think it's a java version issue.
You'd need to work ou why it can't resolve the internals
like, did you run the applicable versions of buildtools?
I did, but it seems to hate me either way lol.
make sure that you build with maven directly
otherwise, we can't really provide support for spigots tooling
Always using Maven, I don't like Gradle personally haha.
I'm guessing most of my issue is this - https://i.imgur.com/i0IKgdg.png
But i'm lost on that. Maybe i'm asking in the wrong area though and this is more of findind someone that has alot of IntelliJ knowledge.
Because your issue is that for some reason it's not finding the dependency properly
Yeah, and I can't find out why for my life. haha.
Even when i attempt to "Find the jar online" it just scans and says it doesn't exist.
Because the jars do not exist online
they need to come from buildtools
all one could guess is go look into your local maven repo and make sure that the jars aren't corrupted
Any chance you have a link to build tools? I can try to reinstall just to try to cover all the basis.
It's on spigots site
Got it. gonna go through all the options and such again on it and see if maybe i screwed up somewhere.
Since this has 1.17 to 1.20.3 do i need to change "version" in build tool to install ALL those versions?
you would need to run it for all those versions, yes
Okay, maybe that's my issue then, I only ran it for "latest" last time.
spigots build setup also generally makes handling that stuff a headache because they love to do stupid stuff like 1.20.x == 1.20.y in their rev flag
Hence being hell vs bukkit just being all 1.20 together etc etc.
Fixed ALL the issues except this specific package - https://i.imgur.com/02obCkJ.png
So damn close, and i even compiled it lol.
Nope I see an issue in buildtools
1.20.3 builds 1.20.4-R0.1Snapshop
Is there a 1.20.3 somewhere I can download? Since BuildTools isn't creating it?
So I need to rebuild 1.20.3's thing by changing all 1 20 r3 to 1 20 4?
I have it rebuilding the indexes now, HOPEFULLY this fixes the issues...
Nope... I'm actually starting to think i'm ready to just give up on this...
Anyone got a solution for this? Or willing to take a look atthis in a call or somethin? haha.
Just remove 1.20.3 stuff?
Otherwise, ask spigot
We don't support their tooling stack
There is nothing 1.20.3 in it, i just verified, it's NAMED 1_20_3 but it's all 1.20.4
then it's probably fine as-is
that R number is practically meaningless
I can't compile it though
check your classpath, etc
I've checked everything that I could see, I'm not the wisest with intellij by any means, but when i try to "build" this i get this error: https://i.imgur.com/mGPSeQb.png
And I see all this stuff missing from imports: https://i.imgur.com/2lkc9WT.png
Which is because your classpah is broken
an make sure that you're building with maven
then you'd need to check what the external libraries is showing
and look into wha maven has resolved, etc
all one can guess is that the IJ project is mangled or something
gah...
try building from the terminal, as that window really does not look like the maven build one, but, idk
so, you're missing a dependency
Which makes no sense, because I have that dependency in the dependencies already even recached everything and "reloaded all from disk"
you have it in there but it couldn't find it
check your m2 repo to see if its in there, since its spigot you probably have to run buildtools
do note that buildtools does not install that stuff by default, you need to run it with a flag for it to do that
I'll be completely honest, I don't have a clue what you mean Warrior, let alone how the hell to do that ha...
user folder/.m2/
Yeah I'm sorry you lost me..
windows explorer
I'm in explorer.
go to your user folder, find the folder named ".m2"
not in the project, it's in your home directory
Yeah I'm in .m2 right now.
the suggestion was to navigate the folder tree to see if you actually installed the dependency in there or not
Failed to execute goal on project pandeloot-api: Could not resolve dependencies for project net.seyarada:pandeloot-api๐ซAPI: org.spigotmc:spigot๐ซremapped-mojang:1.17.1-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced -> [Help 1]
[ERROR]
This one?
Yes
org.spigotmc:spigot:jar:remapped-mojang:1.17.1-R0.1-SNAPSHOT was not found
org/spigotmc/spigot/1.17....
look inside of it
Yea, that's missing stuff
So ALL versions from buildtools are missing things.
Should probably ask spigot atp
is there a tutorial on making paperweight multi-module?
๐ค
No, but it's generally fairly easy
found this
add paperweight to the root module with apply false, and then add it to the children using the plugin directive
then if you want to eat the output of the reobfuscated jar elsewhere, use the standard project() thingy, but set the configuration to reobf
ah so compileOnly all my modules into the root then just do configuration reobf?
basically, yes
you'd need to combine the outputs somehow, i.e. shadowJar or do it manually
messy ik but this module is the only one that is using paperweight, although i will be making a couple more that will
then just use shadowjar?
and paperweight is applied as false
so then what would the project look like, currently i got:
seems to be correct
ty
(cross post per suggestion; originally #1083871828998635560-help) https://pastes.dev/8wcE4N4rKJ
You must have git installed and available on your PATH in order to use paperweight.
git --version >> git version 2.39.2
echo $PATH >> /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
_,met$$$$$gg. debian@vps-name
,g$$$$$$$$$$$$$$$P. -------------------
,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) x86_64
,$$P' `$$$. Host: OpenStack Nova 19.3.2
',$$P ,ggs. `$$b: Kernel: 6.1.0-17-cloud-amd64
`d$$' ,$P"' . $$$ Uptime: 6 hours, 54 mins
$$P d$' , $$P Packages: 622 (dpkg)
$$: $$. - ,d$$' Shell: bash 5.2.15
$$; Y$b._ _,d$P' Terminal: /dev/pts/1
Y$$. `.`"Y$$$$P"' CPU: Intel (Haswell, no TSX) (4) @ 2.399GHz
`$$b "-.__ GPU: 00:02.0 Cirrus Logic GD 5446
`Y$$ Memory: 1757MiB / 7767MiB
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`"""
With pre-built jars (such as those downloade from the paper CI), everything works just fine.
This only appens with clones and gradlew applypatches.
going to try and build instead of folia, but I suspect the problem will be the same.
Things tried:
- complete restart
- git config --global --add safe.directory '*'
After spending far too long looking into this, I have come to the only sane conclusion:
The entire vps was cursed and will likely be the subject of a future ghostbusters special.
Further investigation revealed a myriad of inexplicable, weird, localised, and circumstantial problems that caused me to question my own sanity.
As such, the entire vps has been abandoned, and on spinning up a new one, all problems have been resolved.
It remains to be seen what demon possessed the old vps, but my hope is that it remains trapped in there.
when in doubt: reset everything
When one experiences this sort of problem, the only sane thing to do is burn everything down with fire.
what other option could there be
I mean... the proper way to deal with this sort of a problem is to get ordained as a priest and preform an exorcism on the relevant hardware.
But burning it down is a good enough shortcut
of course
solution: burn down the entire data center actually the whole building must be cursed
I mean... it is an ovh datacentre, so there's a chance that may already have happened
Would explain some things.
maybe they spam emailed the wrong ghost
I was thinking more about SBG2
Sorry
Leave this/other help channels clear for active help.
I guess this does still pertain to an actual unsolved help question
it sounds like your environment is messed up.
Not really sure how to help further on that, personally.
Makes sense ๐
If you're just trying to build it, try building the jar locally.
You don't really want to run Folia on a VM anyway.
I've tried that
Unless you're just testing the thing to start up.
Using it to generate all the files typical on a folia server
More specifically
java -Xms"$memory"M -Xmx"$memory"M -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:+UseZGC -XX:AllocatePrefetchStyle=1 -XX:-ZProactive -Dcom.mojang.eula.agree=true -jar "$jar_in_folder" --nogui <<< "stop"
literally just generates files and stops
problem is that I can't get it to build in this environment
or more specifically, I can't run java in any folder cloned from the folia or paper github repos for some weird reason.
except under sudo
but even then it breaks in a different way I haven't solved yet
Yeah sounds like more of an env issue than an issue with our build tooling.
Definitely
See if you can do some general troubleshooting stuff.
Or, like I said, build it locally and upload the jar to the VM.
If you're just trying to start Folia and generate the world files/etc you don't need all that in your startup flags.
I mean you don't really need most startup flags at all, really.
Try to simplify everything you're doing to super basic steps.
Did that, which works, but since the entire point of this vm is to build a folia jar and use it to generate the files, my inability to build a folia jar is half of my problem.
Currently, my simplification is as follows:
- wipe everything
- git clone a folia jar
- try to run java in that folder.
- stare in confusion.
- try fixing something
- repeat
Yeah not sure what else to tell you. Something's funky in your VM. Sounds like you're having git/java/linux issues.
Btw, is there any way to get more info on this?
Caused by: org.gradle.internal.UncheckedException: io.papermc.paperweight.PaperweightException: Failed to apply patches
That's my new problem
is there a log or something of that attempt?
Post the entire log/error
ok, going to make a simpler repro case
although repro is probably just local since this VM is somehow borked
even though it's OVH's latest debian image
and I just reset everything
so ๐คทโโ๏ธ
(one min)
... it magically worked this time
for now
I really hate it when things work, and I don't know why.
I think it's actually worse this way; when things don't work and I don't know why, I at least know what to expect.
I'm going to get the system to run this a few hundred times and see what happens
dangit, failed again.
I think this is a new error at least
(decompiler log)
https://pastes.dev/hU1J2LZth0
I'm out of my depth here... I have no idea how to interpret that, and have no idea where to look next for troubleshooting.
If it helps, I am able to run run jars built elsewhere (wget from the ci or ftp'd from my local machine).
I am also able to compile stuff with spigot's buildtools for some reason.
the command I am using to repro is
rm -rf Folia
git clone https://github.com/PaperMC/Folia.git
cd Folia
./gradlew applyPatches --stacktrace
this is the latest version of debian, freshly installed, with jq, git, default-jdk, and wget/curl installed.
Conclusion. It is now confirmed to have been a bug in OpenStack Nova.
Moved from #paper-dev
Hello, how do I add the reobfuscated JAR to a Maven publication? (paperweight-userdev, maven-publish)
I tried this and doesn't work: (and yes, the publication exists)
publishing {
publications {
getByName<MavenPublication>("maven") {
artifact(tasks.reobfJar) {
classifier = "reobf"
}
}
}
}
This is the error I get with that code:
Execution failed for task ':blahblah:publishMavenPublicationToBlahRepository'.
> Failed to publish publication 'maven' to repository 'blah'
> Invalid publication 'maven': artifact file does not exist: 'C:\blahblah\hephaestus-engine\runtime-bukkit\adapt-v1_20_R3\.gradle\caches\paperweight\taskCache\re
obfJar.jar'
It's a multi-project project btw, full code here https://github.com/unnamed/hephaestus-engine/blob/main/runtime-bukkit/adapt-v1_20_R3/build.gradle.kts
I think it might be an issue with signing
cloning
git clone https://github.com/paulzzh/Velocity/ --branch feature/per-server-forwarding-configuration
building
gradlew.bat - perfect
gradlew.bat build - errors
errors here
not like i can
Then ask the author to fix their code
It's not code, I can't help you
The instructions are pretty clear
spotless didn't bloew up due to a code issue, it blew up likely due to an unsupported version of java
If I want to save my work for later but I dont want to commit so I dont have more pathces for one thing how should I do it
I mean, theres git stash
otherwise, only real options are generally to just commit it anyways
But then I have patch for small changes
just fix it up later?
At the end of the day the literal only way in git to store changes is to shove the diff somewhere
the 2 primary mechanisms of that is commits and stash
idk but i tried with java 21,17, and 8 rn
ill get java 11 ig
(all of my javas are jdk's)
cant i just ignore/remove spotless?
what does it do anyway
code style & licensing
?
.
ah okay
can I remove it?
I just dont know how
how to remove spotless?? its breaking compilation
https://github.com/PaperMC/Velocity/pull/1248 would fix the compile problem with Java 21
HEJEEL
hLELP
how TO remove SPOTLESS properly
ay i was able to gradlew.bat :velocity-native:spotlessApply after remove spotless unused modules thing
oh wait now
more violations
time for more ./gradlew.bat :velocity-native:spotlessApply
or gradlew.bat :velocity-proxy:spotlessApply
Question:
Is there any actual documentation for setting up and using paperweight?
I got it working for a 1.20.1 paper server so I can modify some hitboxes but I'm not entirely sure how to update it to 1.20.4
(If this is the wrong channel I'm sorry, it's not really to do with build tools more with paperweight and paper forking in general but I don't see anywhere else to put it ;;)
it should be pretty much the same as for 1.20.1
you just change the version, and if you use any craftbukkit classes you need to rename the package of the imports for those
I'm using Gradle
Does it use the archives base name?
Okay yea it does
I feel like that changed recently
gradle's always used the project name as the default for the jar archive base name
and if you're using userdev, that is left unmodified, it only changes the classifier
Yeah
But something didn't work before and now does
archivesBaseName = "${project.archives_base_name}-paper" didn't work before
Iirc
Oh nm I'm just stupid
Am using this ```gradle
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
from components.java
}
}
any tips for faster builds on windows?
Wsl
honestly, most gradle builds only take a few seconds for me personally
Even with bigger plugins
(Not huge plugins though)
chat
which gradle plugin can decompile a jar and then patch commits to the decompiled code
(idk if i explained that well)
it's not related to paper but i figured i'd ask here cuz of the patch based system
I mean, paper's tooling can xD
if there exists a generic gradle plugin for that I would be surprised
which, paper weight?
well, yes
but the entire set of tooling is setup in order to support our needs
you'd probs need to go through an entire headache in order to genericify it, but, idk
:getPaperUpstreamData >
decompileJar > Resolve dependencies of
decompiler
im getting stuck o this part here, it started happening only a few hours ago
what can i try to debug to see whats happening
this is on applyPatches
the true blocking part is being the getPaperUpstreamData
i wonder if im getting blocked or something like that, it looks like a WSL/my internet issue i think idk for sure
(it started working again out of nowhere) - I think my ISP must have fucked up something yesterday ๐
it would be nice to have some sort of task where you can run to detect connection issues to the URLs
if thats the case, you should be seeing some networking errors in the log
so i'm not sure if a separate task would bring much more value
i mean it might look prettier and give you a full picture of all URLs maybe... but you should usually be able to tell if an error is networking related for any task
i made a new project just now idk why its giving this error
paper - 1.20.4 - azulu 17
gradle
In the left pane, click the top Skyblock [:wapper] ... line, it should show the full Gradle output including more context for that error
the gradle version in wrapper is 8.5 should i use 8.7?
i think changing version its doing something
it worked but bruhh the gradle file doesnt even have paper added
it means i gotta add it all myself
yea no
its hella confusing to add other stuff
i regret starting this project with maven
is there a way to check if my build file is correct
if anyone wnatss to see
i dunno how gradle works
i searched 100 websites and managed to make that
id 'java'
id("io.papermc.paperweight.userdev") version "1.5.11"
id("xyz.jpenilla.run-paper") version "2.2.3"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = 'unjoinable'
version = '1'
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
name = "CodeMC"
url = uri("https://repo.codemc.io/repository/maven-public/")
}
}
shadowJar {
relocate("dev.jorel.commandapi", "unjoinable.skyblock.CommandAPI")
relocate("de.tr7zw.changeme.nbtapi", "unjoinable.skyblock.NBTAPI")
}
dependencies {
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
compileOnly "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT"
implementation("de.tr7zw:item-nbt-api:2.12.2")
implementation "dev.jorel:commandapi-bukkit-shade:9.3.0"
}
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)
}
}
tasks{
assemble{
dependsOn(reobfJar)
dependsOn(shadowJar)
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('paper-plugin.yml') {
expand props
}
}
}
i quit
whys making a gradle file soo hard
nvm^ fixed
if anyone sees something wrong with the file lmk its working but still i may have fed up
@jmp
Am getting a ZIP end header not found on the server when trying to runServer and download plugins
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("xyz.jpenilla.run-paper") version "2.2.3"
}
tasks {
runServer {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.17.1")
downloadPlugins {
github("EssentialsX", "essentials", "2.20.1", "EssentialsX-2.20.1.jar")
github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
// WorldEdit 7.2.19
url("https://dev.bukkit.org/projects/worldedit/files/5077477")
// WorldGuard 7.0.9
url("https://dev.bukkit.org/projects/worldguard/files/4675318")
}
}
i've ran the clearPaperPluginsCache
any ideas why this might be ocurring?
Located Paper 1.17.1 build 411 in local cache.
Downloading github:EssentialsX/essentials:2.20.1/EssentialsX-2.20.1.jar...
Done downloading github:EssentialsX/essentials:2.20.1/EssentialsX-2.20.1.jar, took 0.0539545s.
Downloading github:MilkBowl/Vault:1.7.3/Vault.jar...
Done downloading github:MilkBowl/Vault:1.7.3/Vault.jar, took 0.004167s.
Downloading https://dev.bukkit.org/projects/worldedit/files/5077477...
Done downloading https://dev.bukkit.org/projects/worldedit/files/5077477, took 0.0020004s.
Downloading https://dev.bukkit.org/projects/worldguard/files/4675318...
Done downloading https://dev.bukkit.org/projects/worldguard/files/4675318, took 0.0010021s.
Starting Paper...
it doesn't look like the file corrupted when downloading?
Stacktrace on the server
https://hastebin.com/share/ayojujagib.txt
I mean, it tried to load a jar file which is not a jar file
huh
and many websites are hostile to end users
C:\Users\Andrew\.gradle\caches\run-task-jars\plugins\paper\url\134b0737eb03a4eb615daf6346c93e5d6a77c15b.jar
Placing bets that if you open that file with a text editor it's a html file
that would be very funny
close enough
ah, its served by the cdn
damn
yea, figured out how to get the actual jar url
thanks for the help
does paper/spigot come with guava?
nevermind
i just changed the gradle version and it worked for me
could somebody help explain to me the proper way to build a paper fork? so far I've cloned the paper repository, added the remote as origin and fetched the target branch that I want to build, and then once I run ./build.sh through bash; everything seems to be fine for the first few seconds of building (where it clones the submodules) but once it gets to Downloading unmapped vanilla jar.. it immediately exits with the message The MD5 checksum of the downloaded server jar does not match the BuildData hash.
Considering we having used a build.sh in years, I doubt anybody can help you with such outdated sfuff
For the modern tooling see the paperweight-examples repository, it's an example Paper fork. But yeah, for old versions no idea
How come the wrapper task cannot be found in velocity module when it's in the common module?
They have identical build.gradle files rn
It's for some reason also outside the project
I just unlinked the bottom one, but is that an issue?
I'm getting this error when trying to use the hangar publish
Could not create domain object 'plugin' (HangarPublicationImpl)
> Could not create an instance of type io.papermc.hangarpublishplugin.internal.model.HangarPublicationImpl.
> Could not create an instance of type io.papermc.hangarpublishplugin.internal.model.ProjectPageContainerImpl.
> Could not generate a decorated class for type ProjectPageContainerImpl.
> Cannot have abstract method NamedDomainObjectSet.named().
This is my code
hangarPublish {
publications.register("plugin") {
version.set(project.version as String)
channel.set("Snapshot") // We're using the 'Snapshot' channel
// TODO: Edit the project name to match your Hangar project
id.set("hangar-project")
apiKey.set(System.getenv("HANGAR_API_TOKEN"))
platforms {
// TODO: Use the correct platform(s) for your plugin
register(Platforms.PAPER) {
// TODO: If you're using ShadowJar, replace the jar lines with the appropriate task:
// jar.set(tasks.shadowJar.flatMap { it.archiveFile })
// Set the jar file to upload
jar.set(tasks.jar.flatMap { it.archiveFile })
// Set platform versions from gradle.properties file
val versions: List<String> = (property("paperVersion") as String)
.split(",")
.map { it.trim() }
platformVersions.set(versions)
// TODO: Configure your plugin dependencies, if any
dependencies {
// Example for a dependency found on Hangar
hangar("Maintenance") {
required.set(false)
}
// Example for an external dependency
url("Debuggery", "https://github.com/PaperMC/Debuggery") {
required.set(true)
}
}
}
}
}
}
What do you mean by missing name?
all I know is what it's saying
I'm not sure what to do to fix this though...
try using an up to date version of hangar-publish-plugin
That completely fixed it tysm
I'm having issues when using UserDev saying For input ""
This issue does not come if I don't use paperweight user dev it doesn't say that and works perfectly fine
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Flight'.
> Failed to create service 'paperweight-userdev:setupService:b57ad9f072e255b883e6c24226932d434aa95b3beb178cd3dacaad5b8a70c808'.
> Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
> For input string: ""
* 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 903ms
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.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
message.txt by @finite loom: https://pastes.dev/APmMe8qvdl
paste the log with --stacktrace
also don't set the shadowjar classifier like that
reobfjar is going to have the same path for input and output
which will break things
Hello, I'm still having this problem
why are you trying to publish the reobfJar
it's not useful for anyone as a dependency
well, not to any paperweight consumers
getByName instead of register is sus, but that's basically how you would do it
Yeah but I think it might be an issue with signing plugin
Yeah we are not expecting them to be using paperweight
nothing there is really paperweight specific besides the task in question being a paperweight type
I would check the signing docs
It's not uncommon to publish something other than the java components, I would imagine they document it in some form
I changed archive classifier
message.txt by @finite loom: https://pastes.dev/ne5oxvBhlP
what OS are you using?
Windows 10
Outside of make sure that you're not building in some folder tainted by onedrive, etc, I have no idea how that blew up
No I've not enabled one drive. This is a folder from github and it shouldnt effect this
folder from github means nothing
something in your environment is messed up
that file that it's screaming is empty should have the PID written into it
not be an empty text file
"enabling one drive" also means nothing as it's enabled by default in certain folders (e.g. the Desktop)
Oh no it's in documents
which is tainted by onedrive by default
lmao
I'll see in a new file
god windows sucks
can they place go back to making an operating system instead of a live service?!? -.-
Linux would be my choice if it didn't take so long to install everything again
faster than installing everything on windows again though 
Cloned it to another location and it worked fine. Other files in the Documents folder work fine but just the folder with this project didnt work correctly
somehow it ended up writing an empty lock file when it should contain a pid
if you open an issue I can probably solve this with an atomic write
Hello, I am working on my first actual project with java (I did learn the language) but i was wondering how i can learn more about gradle and building the plugin. I did follow the guide here: https://docs.papermc.io/paper/dev/project-setup but every time i try to build it, i get a number of unresolved reference errors and I'm not sure why, because I followed that guide exactly (I'm not using the minecraft-dev plugin as i want to use the gradle kotlin DSL)
for reference, this is my build.gradle.kts
plugins {
id("java")
}
group = "com.myname"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
what kind of unresolved reference errors?
basically everything in the file:
build.gradle.kts:1:1: error: unresolved reference: plugins
plugins {
^
build.gradle.kts:2:5: error: unresolved reference: id
id("java")
^
build.gradle.kts:5:1: error: unresolved reference: group
group = "com.tommyshoemaker"
^
build.gradle.kts:6:1: error: unresolved reference: version
version = "1.0-SNAPSHOT"
^
build.gradle.kts:8:1: error: unresolved reference: repositories
repositories {
^
build.gradle.kts:9:5: error: unresolved reference: mavenCentral
mavenCentral()
^
build.gradle.kts:10:5: error: unresolved reference: maven
maven("https://repo.papermc.io/repository/maven-public/")
^
build.gradle.kts:13:1: error: unresolved reference: dependencies
dependencies {
^
build.gradle.kts:14:5: error: unresolved reference: compileOnly
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
^
build.gradle.kts:17:1: error: expression 'java' cannot be invoked as a function. The function 'invoke()' is not found
java {
^
build.gradle.kts:17:1: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val <T> KClass<TypeVariable(T)>.java: Class<TypeVariable(T)> defined in kotlin.jvm
java {
^
build.gradle.kts:18:5: error: unresolved reference: toolchain
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
^
build.gradle.kts:18:35: error: unresolved reference: JavaLanguageVersion
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
because i'm not really sure what kind of imports i need to do
or if i even need to import anything
what command are you using to build?
dont hate but i just tried clicking the run on build.gradle.tks
but should i use sth like ./gradlew build.gradle.kts
ahh that's the problem. no worries everyone starts somewhere
just run ./gradlew build
oh ok
that should compile your plugin
oh i see thanks
outputs gonna be in build/libs
a good resource for gradle beginners is https://www.baeldung.com/gradle. though google will give you lots of more resources
thank you!
this is groovy not kotlin
I'm reading Gradle documentation and code, and I think it could be solved (both signing and publishing) by making RemapJar extend AbstractArchiveTask maybe
Is there any reason why RemapJar doesn't extend it already?
I think my error is being caused by this: https://docs.gradle.org/current/dsl/org.gradle.api.publish.maven.MavenPublication.html#org.gradle.api.publish.maven.MavenPublication:artifact(java.lang.Object)
the concept is the same
because it's not an AbstractArchiveTask...
that's like saying why does String not extend from HashMap or something
Hello. I am trying to add the paper api to the build.gradle file in a repo I have forked on github (not updated since 2021). I've followed the instructions on the paper website that detail what to add to build.gradle, but I'm getting an error.
The new Java toolchain feature cannot be used at the project level in combination with source and/or target compatibility I'm not familiar with gradle, but it seems like this is what would happen if I had set sourceCompatibiliy and/or targetCompatibility in the java block in the file. Those properties are not set, so I do not know what to do. Is there another place where these properties would have been set?
why?
* This file was generated by the Gradle 'init' task.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id 'java-library'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "8.1.1"
}
repositories {
mavenLocal()
maven {
url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/')
}
maven {
url = uri('https://oss.sonatype.org/content/groups/public/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
implementation("org.bstats:bstats-bukkit:2.2.1")
implementation "net.kyori:adventure-platform-bukkit:4.3.2"
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}
group = 'Duels'
version = 'v1.25'
description = 'Duels'
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
tasks {
named<ShadowJar>("shadowJar") {
// See https://github.com/johnrengelman/shadow/issues/448
project.configurations.implementation.get().isCanBeResolved = true
configurations = listOf(project.configurations.runtimeClasspath.get())
dependencies { exclude { it.moduleGroup != "org.bstats" } }
relocate("org.bstats", group)
}
}
im trying to add the shadowjar plugin
but it doesnt work
help pls
anyone?
No
kotlin build scripts are the default these days
pretty sure "named" is a kotlin convention too
isnt kotlin different coding language?
Groovy is one language
kotlin is another
groovy has been generally pushed to the side in favour of using kotlin for the build scripts
is kotlin the thing that helps jar file compile or something?
you're writing a build.gradle file
that is in groovy
and, yet, you've copied in code which is only compatible with the kotlin dsl
aaaaa
Duels:main: Could not resolve io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT.
Type mismatch: inferred type is String but KClass<TypeVariable(U)> was expected
i switched to kotlin
its still erroring ^
I mean, that's not showing where the error is, and I'm not going to keep setting up faux gradle projects to look
e: file:///C:/Users/green/IdeaProjects/Duels/build.gradle.kts:49:21: Type mismatch: inferred type is String but KClass<TypeVariable(U)> was expected
sorry
Why did you change it to name?
i recreated the project and copied this code from the bstats
website
ill change it
like this?
idk what name is, but it's clearly upset about what you passed in
just shadowJar {}
I mean, I'm sure that if you actually copied that it might have worked
remove the {}
best guess would be check java version
oh i forgot to copy this
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
wait
it still doesnt work
maybe try java.sourceCompatibility = JavaVersion.VERSION_17
oh shit
that might be a problem
bruh
1.20.4 requires java 17
^
you probably also want to use the java toolchain stuff to set it to 17
oh do i need to switch the option below?
yes
to this right
language level is generally derived from the gradle config
changing it there will basically do nothing
Have you checked the gradle build tools options ?
Settings | Build, Execution, Deployment | Build Tools | Gradle
Gradle JVM must be java 17
oh
And then re-import the project
with reload gradle?
Yes
it still gives a error
Which error ?
Have you pressed apply ?
I mean, what it can resolve is mostly going to boil down to your configuration, but, I'm repeating myself again
i dont really have anything much in gradle configs
i have project backup when it was maven
im just trying to convert it to gradle
have you used gradle init?
yea
how do i check if it is or not
* This file was generated by the Gradle 'init' task.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
`maven-publish`
id ("com.github.johnrengelman.shadow") version "8.1.1"
}
repositories {
mavenLocal()
maven("https://repo.papermc.io/repository/maven-public/")
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
implementation("org.bstats:bstats-bukkit:2.2.1")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
group = "Duels"
version = "v1.25"
description = "Duels"
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
tasks {
shadowJar {
// See https://github.com/johnrengelman/shadow/issues/448
project.configurations.implementation.get().isCanBeResolved = true
configurations = listOf(project.configurations.runtimeClasspath.get())
dependencies { exclude { it.moduleGroup != "org.bstats" } }
relocate("org.bstats", group)
}
}
do a manual build and see what java says
and once aand you've still got the source compat set to 1.8
Because the gradle tool is generally better at showing errors than IJ is good at extracting them
message.txt by @dreamy moth: https://pastes.dev/0XmYMHkUEb
Yes, so, once again, remove the java 8 source directive
from where
from your config, where you're setting the source compat to 1.8
java.sourceCompatibility = JavaVersion.VERSION_17
ah this one?
ok wait
should be 17 instead of 1_8
well ill just remove it
hm no console appears now
i think it worked
thought paper had adventure included?
It does
Yes, but that's not adventure, that's adventure-platform
if you want to support spigot, you'll want to keep using adventure-platform, if you only care about paper+, get rid of it, just use the native methods
implementation("net.kyori:adventure-platform-bukkit:4.3.2")
yea i already found it
isnt gradle supposed to have shadowJar button here?
nvm found it
bstats isnt supposed to be here
is it
wrong package*
how do i relocate it
I would imagine that your group field is pointing towards the wrong thing
project.group
Yes, but you're making an assumption over what group is calling
isnt it supposed to be Duels.**?
You would expect, but, no, because you're assuming that that is what it's calling
so what is it calling
use your IDEs go-to definition feature
I mean, it's calling the one on the Task
no idea why your IDE is cursed
yes, that is what I recommend
yes, your IDE seemingly hasn't imported the scripts properly
e: file:///C:/Users/green/IdeaProjects/Duels/build.gradle.kts:57:32: Type mismatch: inferred type is Any! but String! was expected
oh it said some warning on kts file that some plugins were available
did i need to install them?
if one of those was kotlin, yes
wait, you have been working with a kts file this whole time without the Kotlin plugin?
๐ญ
some pretty colors and InteliSense will now work
do i need to click this
No, basically, it will figure that out when it successfully imports
I am still not omnipotent
is it supposed to be?
because git, I'd image
wdym
do you have git enabled?
yea
you're using git, IJ colors the files to represent certain states
red = unadded, I think
^
because group returns an Object
cast to a string, I guess
or, just use a string, you should generlaly shove them into some space to show that they're shaded
group.thirdparty, shaded, etc
is the group supposed to be package name?
yes
yea it is supposed to be
is this group thing used somewhere else?
it wont break anything if i change it to package name right?
I mean, it's gonna be used for stuff like the maven plugin, etc
wait for your project to finish indexing/setting up
got it working
yea that fixed

decompileJar > Resolve dependencies of