#build-tooling-help

1 messages ยท Page 7 of 1

static urchin
#

run the runServer task in debug mode and, when you edited your plugin, right click in your changed file and click "Compile and reload file"

dire wren
#

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")```
static urchin
#

Received status code 503 from server

#

I mean, the repo is not available rn

dire wren
#

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

static urchin
#

because gradle is exploding as one of the repositories you defined is currently not available ??

shadow mural
#

Hello, I have a problem with paperweight; it is stuck on:

:executing 'decompile transformed minecraft server jar'

static urchin
#

How much memory do you have available ?

shadow mural
#

16GB

main mica
#

How long did you wait?

#

That step will take a while

shadow mural
#

I have been waiting for 2 hours

granite valve
#

windows?

shadow mural
#

Yes

main mica
#

Well that should be long enough OMEGALUL

granite valve
#

are you using wsl on windows?

shadow mural
static urchin
#

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

shadow mural
#

Let me check haha

shadow mural
#

I was able to fix it already. Thank you anyway ^^

static urchin
shadow mural
static urchin
#

Ah okay ๐Ÿ‘ thanks for the info ๐Ÿ™‚

north geyser
#

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

lament scarab
#

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

north geyser
#

is there a way to disable file locking? I've been meaning too but i can't find anything

#

and its hella annoying

lament scarab
#

no

north geyser
#

the one thing i miss about linux

#

damn

dire ridge
#

can i set up gradle to publish all modules to maven local?

#

without configuring maven-publish in every module

bronze ember
#

Configure it in the parent

#

In subprojects

dire ridge
distant mango
#

in your root build file

#

subprojects block

urban timber
#

hello everyone

#

I have problem

#

while i was building folia

agile skiff
#

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

dire ridge
sharp trellis
#

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

sharp trellis
#

nvm, fixed i think

scenic breach
#

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
}
echo kilnBOT
silk hill
#

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.

smoky violet
#

share the log file in a paste, that error tells us nothing

open mica
#

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?

lament scarab
#

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

open mica
#

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?

lament scarab
#

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

open mica
#

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!

lament scarab
#

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

agile skiff
#

windows path length limit perhaps?

fluid dove
#

ill move to c:\

agile skiff
#

either use wsl (thats the best option) or disable the limit

fluid dove
#

then install debian kekwhyper

#

wsl?

lament scarab
#

install gentoo

agile skiff
#

windows subsystem for linux

#

or start distro hopping like lynx

static urchin
fluid dove
#

y it was path issue

static urchin
#

can recommend distro hopping

fluid dove
#

fml

open mica
smoky violet
#

unless the consumer is using maven

#

even then I think it might just work

agile skiff
void hill
#

Asking for a friend ๐Ÿ‘€ is there a difference between NMS paper and NMS builttools from spigot?

bronze ember
#

Paper allows you to easily use Mojang mappings

echo kilnBOT
bronze ember
#

No need to touch external tools, no need for anything special in CI

void hill
#

yea, am really asking cause I'm already deep and paper nms requires gradle and am using maven ๐Ÿ˜

bronze ember
#

Time to consider switching ๐Ÿ™‚

void hill
#

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 ๐Ÿ˜‚

rapid fractal
#

Time to make the switch AYAYARie

lament scarab
#

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"

urban timber
quick thicket
#

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

lament scarab
#

you would need to make sure that it's being passed into the classpath

quick thicket
smoky violet
#

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

quick thicket
#

it works fine

quick thicket
quick thicket
smoky violet
#

๐Ÿ™‚ ok

#

please do tell me how paperweight works!

quick thicket
quick thicket
smoky violet
#

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

quick thicket
#

how meta annotation can affect reobfing of this code?? it has not difference with java if it will have not annotation

silk hill
echo kilnBOT
silk hill
smoky violet
#

send your build scripts I guess

silk hill
#

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)

lament scarab
#

remove the explicit dependsOn

#

99% chance that that is breaking how the thing expects that it's hooks will work

#

(from shadowJar)

silk hill
#

so remove the dependsOn from the shadowJar?

lament scarab
#

yes, try without it

silk hill
#

It still seems to give the same error

lament scarab
#

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

silk hill
#

I'd be fine sending the whole thing to your dms but ik that's pretty annoying to do

echo kilnBOT
silk hill
#

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

distant mango
#

send your build script here

silk hill
#

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)
}
distant mango
#

you don't need the build dependsOn

silk hill
#

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

static urchin
#

shadowJar depending on jar is also senseless

silk hill
#

is that what is causing it to bug out?

#

I'll try again but will remove the build and the dependsOn in the shadow

distant mango
#

also doubt you need the zip64

silk hill
# silk hill I'll try again but will remove the build and the dependsOn in the shadow

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.```
smoky violet
#

wouldn't surprise me if tiny remapper doesn't like zip64

silk hill
#

I'll try comment out that section aswell incase

smoky violet
#

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

silk hill
#

yeah I tried removing the zip and it still didn't work which is unfortunate

smoky violet
#

it looks like a permissions issue actually

silk hill
#

I didn't think of that actually

#

how would I be able to check?

smoky violet
#

remove the archive file name setting also

#

idk how I missed that earlier

silk hill
#

๐Ÿ‘

smoky violet
#

that's very likely the problem

#

you have tasks stepping on each others outputs

silk hill
#

oh my god it compiled

smoky violet
#

one of many reasons we advise against changing output locations from the conventions

silk hill
#

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?

lament scarab
#

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

silk hill
#

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!

smoky violet
#

recaf is the go to decompiler gui these days

#

that or run vineflower from cli

silk hill
bronze ember
#

recaf added vineflower the other week

#

my life is complete now

#

well, I still need a VF 1.10 release

ionic yacht
#

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

void hill
#

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

ionic yacht
#

what code do you have currently?

#

also can you send github repo link?

#

@void hill

void hill
# ionic yacht what code do you have currently?

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
GitHub

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins. - GitHub - lucko/helper: A collection of utilities and extended APIs to support the rapid an...

#

am looking for the helper one specifically, but might utilize more eventually

ionic yacht
#

its on maven central

#

and which module do yo uwant

void hill
ionic yacht
#
<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

void hill
#

that worked, does that include the specific dir or all of them?

ionic yacht
#

think it should be all of em

#

yo ucan test

void hill
#

appreciate it ! ๐Ÿ˜„ works

smoky violet
#

@short trench are you using the latest gradle & are you using shadoww

short trench
#

yes im using shadow

#

oh wait i didnt apply shadow for the jackson libray

#

hold on

smoky violet
#

shadow has issues with java 21 or something iirc

#

so probably use a j17 toolchain

#

if jackson includes j21 classes then thats fun

short trench
#

okay i'll go down to 17 now then

brave widgetBOT
short trench
#

might just be jackson .-.

sonic solstice
#

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

torn sonnet
smoky violet
#

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

sonic solstice
#

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

sonic solstice
#

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?

lament scarab
#

If youโ€™re building against a library that exposes internal youโ€™ll need to include that library as part of the reobfuscator class path

fading vapor
#

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:

  1. Create a custom repository,
  2. Use the module several projects depend on as a root project and then add the projects using it as subprojects,
  3. Create a composite similiar to the previous paragraph,
  4. Leave it in mavenLocal()
    ?
glass sable
#

I assume the main issue is when you try to share the project to others as it makes building it harder

fading vapor
#

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

lament scarab
#

mavenLocal is funky because it breaks build portabiity & repeatability

fading vapor
#

ye exactly thats what bugs me about it

lament scarab
#

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

bronze ember
#

Nothing wrong with mavenLocal

fading vapor
#

that would be ideal, yet I have no idea how to make private repos

bronze ember
#

Don't let gradle fear monger you

#

Gradle wants you to use composite builds

fading vapor
#

so you're saying I should use composite builds

bronze ember
#

But yeah, don't rely on local deps for distribution

fading vapor
#

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

lament scarab
#

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

paper kestrel
lament scarab
#

no

paper kestrel
#

hmm, i dont think ive ran into that on linux

static urchin
#

I certainly did skully

fading vapor
#

okay thanks guys

proud sinew
lament scarab
#

paperweight will automatically hook shadowJar if it's installed

proud sinew
#

thanks <3

proud sinew
lament scarab
#

the first one

proud sinew
#

is it shaded?

distant mango
#

yes

north geyser
#

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
smoky violet
#

probably because you're registering publications afterEvaluate

#

jitpack is useless anyways though

lament scarab
#

If youโ€™re tryna publish a public library I would probably look towards places like codemc which offer free repository hosting

verbal skiff
#

or just... maven central? which is also free

lament scarab
#

I guess, central used to be more strict around now allowing stuff that references stuff off their repo

verbal skiff
#

interesting

#

never actually had an issue with that

void hill
#

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>

devout ledge
#

is it in a public web-accessible repo or only installed in your local maven repo?

void hill
#

its my own repo on github

devout ledge
#

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

primal wing
#

is there anyone good with shadowjar and it's configuration with gradle kts dsl?

echo kilnBOT
#
Don't ask to ask.

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.

primal wing
#

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

distant mango
#

try project(โ€ฆ)

primal wing
verbal skiff
#

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

primal wing
verbal skiff
#

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?

primal wing
#

it actually has nothing to do with paper, i just want help with knowing that someone here will know hwo to help me xd

verbal skiff
#

if you using compileOnly, it won't be added to the runtime classpath

#

so it wont be included in the jar

verbal skiff
#

the DependencyFilter

primal wing
#

i see, let me try then

#

with this:

tasks.withType<ShadowJar> {
    archiveClassifier = null
}

dependencies {
    implementation(project(":amber-platform-util"))
    compileOnly(gradleApi())
}
grand niche
#

what's amber-platform-util pulling in

primal wing
grand niche
#

rule of thumb, have you done a clean build and made sure the JAR is up to date?

merry terrace
lament scarab
#

I mean, itโ€™s upset with the Java target

#

Building with a newer version than itโ€™s happy with?

hoary cosmos
#

does somebody know why my classes arent recognized anymore?

bronze ember
#

try a maven/gradle reimport

#

your module/sourceset got nuked

hoary cosmos
#

thank you for trying to help, i just needed to mark java as the source again

verbal skiff
#

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

merry terrace
lament scarab
#

No

#

you probably have a too new version of java, as it says

merry terrace
lament scarab
#

probably Maoshrug

merry terrace
floral whale
#

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?

distant mango
#

try setting the encoding in the process resources task and the encoding on the file itself

floral whale
#

On the file itself? As in the plugin or server jar?

proud sinew
#

who can help with this issue?

#

i use this file

distant mango
#

don't use the dev file

proud sinew
#

i need shaded

#

version

#

of file

#

but dev-all

#

are shaded

distant mango
#

use the reobfjar task

lament scarab
#

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

proud sinew
#

what shoul i use

distant mango
#

top

proud sinew
#

Does anyone have any documentation on the nms.

main mica
#

"on the nms"

#

what do you mean by that?

proud sinew
#

documentation

#

for nms api

main mica
#

there is no API

#

its NMS, internal code

proud sinew
#

i know

#

for nms

main mica
#

its not documented

proud sinew
#

any guides?

#

for 1.20+ version

main mica
#

are you looking for guides for NMS itself, or for using NMS

proud sinew
#

using

#

nms

main mica
proud sinew
#

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

main mica
#

ProtocolLib works on 1.20.1

#

and 1.20.4 which you probably should use anyways considering 1.20.1 has several crash exploits

proud sinew
#

okay

#

ty

calm horizon
#

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

prime cliff
calm horizon
#

I Think its 8.4? ๐Ÿ˜…

prime cliff
calm horizon
prime cliff
calm horizon
proud sinew
#

anyone knows how to work with protocollib? 1.20.1

proud jay
proud jay
smoky violet
#
dependencies {
  extensions.getByType(PaperweightUserDependenciesExtension::class).paperDevBundle("...")
}
proud sinew
#

how i can enable second layer for fake player?

prime cliff
hexed lava
#

i have a local dependencie how to add that it will be compiled with my plugin in gradle

fading vapor
hexed lava
#

eh...

fading vapor
#

?

hexed lava
#

where add mavenLocal()

fading vapor
#

in repos

distant mango
#

dependencies block

#

repositories*

hexed lava
#

wait il try

#

:/

proper jasper
#

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.

lament scarab
#

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

proper jasper
#

It does it for "all" java versions so I dont think it's a java version issue.

lament scarab
#

You'd need to work ou why it can't resolve the internals

#

like, did you run the applicable versions of buildtools?

proper jasper
#

I did, but it seems to hate me either way lol.

lament scarab
#

make sure that you build with maven directly

#

otherwise, we can't really provide support for spigots tooling

proper jasper
#

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.

lament scarab
#

Because your issue is that for some reason it's not finding the dependency properly

proper jasper
#

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.

lament scarab
#

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

proper jasper
#

Any chance you have a link to build tools? I can try to reinstall just to try to cover all the basis.

lament scarab
#

It's on spigots site

proper jasper
#

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?

lament scarab
#

you would need to run it for all those versions, yes

proper jasper
#

Okay, maybe that's my issue then, I only ran it for "latest" last time.

lament scarab
#

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

proper jasper
#

Hence being hell vs bukkit just being all 1.20 together etc etc.

proper jasper
#

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?

static urchin
#

1.20.3 never really existed

#

1.20.4 was released as a hotfix

proper jasper
#

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...

proper jasper
#

Anyone got a solution for this? Or willing to take a look atthis in a call or somethin? haha.

lament scarab
#

Just remove 1.20.3 stuff?

#

Otherwise, ask spigot

#

We don't support their tooling stack

proper jasper
#

There is nothing 1.20.3 in it, i just verified, it's NAMED 1_20_3 but it's all 1.20.4

lament scarab
#

then it's probably fine as-is

proper jasper
lament scarab
#

that R number is practically meaningless

proper jasper
#

I can't compile it though

lament scarab
#

check your classpath, etc

proper jasper
lament scarab
#

Which is because your classpah is broken

#

an make sure that you're building with maven

proper jasper
#

It's Maven

lament scarab
#

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

proper jasper
#

gah...

lament scarab
#

try building from the terminal, as that window really does not look like the maven build one, but, idk

proper jasper
#

That's just using Maven's direct terminal to compile

lament scarab
#

so, you're missing a dependency

proper jasper
#

Which makes no sense, because I have that dependency in the dependencies already even recached everything and "reloaded all from disk"

proud maple
#

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

lament scarab
#

do note that buildtools does not install that stuff by default, you need to run it with a flag for it to do that

proper jasper
#

I'll be completely honest, I don't have a clue what you mean Warrior, let alone how the hell to do that ha...

distant mango
#

user folder/.m2/

proper jasper
#

Yeah I'm sorry you lost me..

distant mango
#

windows explorer

proper jasper
#

I'm in explorer.

distant mango
#

go to your user folder, find the folder named ".m2"

proper jasper
#

In my projects folder

#

ok i'm in here right now.

quaint raven
#

not in the project, it's in your home directory

proper jasper
#

Yeah I'm in .m2 right now.

lament scarab
#

in there is a repo folder

#

look at the dependency, now, follow that path

proper jasper
#

No repo folder though.

lament scarab
#

yes, it's a folder tree

#

you're IN the repo folder

proper jasper
#

oh my mistake yeah...

#

What exactly should I be looking for in here though?

lament scarab
#

the suggestion was to navigate the folder tree to see if you actually installed the dependency in there or not

proper jasper
#

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?

lament scarab
#

Yes

#

org.spigotmc:spigot:jar:remapped-mojang:1.17.1-R0.1-SNAPSHOT was not found

#

org/spigotmc/spigot/1.17....

proper jasper
#

It's there.

lament scarab
#

look inside of it

proper jasper
lament scarab
#

if that's everything in there then you're missing stuff

proper jasper
#

that's how all the spigot folders in here are

lament scarab
#

Yea, that's missing stuff

proper jasper
#

So ALL versions from buildtools are missing things.

lament scarab
#

chances are you didn't run buildtools with the correct flag

proper jasper
#

This is how I ran it.

distant mango
#

Should probably ask spigot atp

lament scarab
#

once again, you'd need to ask spigot

#

We can't provide support for their tooling

north geyser
#

is there a tutorial on making paperweight multi-module?

north geyser
#

๐Ÿค”

lament scarab
#

No, but it's generally fairly easy

lament scarab
#

add paperweight to the root module with apply false, and then add it to the children using the plugin directive

north geyser
#

ah okay

#

what about calling gradle reobfjar

#

is my main issue

lament scarab
#

then if you want to eat the output of the reobfuscated jar elsewhere, use the standard project() thingy, but set the configuration to reobf

north geyser
#

ah so compileOnly all my modules into the root then just do configuration reobf?

lament scarab
#

basically, yes

#

you'd need to combine the outputs somehow, i.e. shadowJar or do it manually

north geyser
#

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

frosty oriole
#

(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 '*'
frosty oriole
#

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.

zinc bobcat
#

when in doubt: reset everything

frosty oriole
#

When one experiences this sort of problem, the only sane thing to do is burn everything down with fire.

zinc bobcat
#

what other option could there be

frosty oriole
#

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

zinc bobcat
#

of course

frosty oriole
#

OH NO ITS BACK

#

IT MADE IT TO THE NEW VPS

#

๐Ÿ˜ฑ

zinc bobcat
#

solution: burn down the entire data center actually the whole building must be cursed

frosty oriole
#

I mean... it is an ovh datacentre, so there's a chance that may already have happened

#

Would explain some things.

zinc bobcat
#

maybe they spam emailed the wrong ghost

frosty oriole
#

I was thinking more about SBG2

glass warren
#

Guys, try to keep casual conversations in #general

frosty oriole
#

Sorry

glass warren
#

Leave this/other help channels clear for active help.

frosty oriole
glass warren
#

it sounds like your environment is messed up.

#

Not really sure how to help further on that, personally.

frosty oriole
#

Makes sense ๐Ÿ™‚

glass warren
#

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.

frosty oriole
#

I've tried that

glass warren
#

Unless you're just testing the thing to start up.

frosty oriole
#

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

glass warren
#

Yeah sounds like more of an env issue than an issue with our build tooling.

frosty oriole
#

Definitely

glass warren
#

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.

frosty oriole
#

Currently, my simplification is as follows:

  1. wipe everything
  2. git clone a folia jar
  3. try to run java in that folder.
  4. stare in confusion.
  5. try fixing something
  6. repeat
glass warren
#

Yeah not sure what else to tell you. Something's funky in your VM. Sounds like you're having git/java/linux issues.

frosty oriole
#

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?

glass warren
#

Post the entire log/error

frosty oriole
#

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

zinc bobcat
#

for now

frosty oriole
#

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

#

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.

frosty oriole
#

Conclusion. It is now confirmed to have been a bug in OpenStack Nova.

whole obsidian
#

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

junior path
bronze ember
#

Well, the code has spotless issues

#

Fix them

junior path
bronze ember
#

Then ask the author to fix their code

#

It's not code, I can't help you

#

The instructions are pretty clear

lament scarab
#

spotless didn't bloew up due to a code issue, it blew up likely due to an unsupported version of java

oak copper
#

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

lament scarab
#

I mean, theres git stash

#

otherwise, only real options are generally to just commit it anyways

oak copper
lament scarab
#

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

junior path
#

ill get java 11 ig

#

(all of my javas are jdk's)

junior path
#

what does it do anyway

distant mango
#

code style & licensing

turbid moon
distant mango
turbid moon
#

ah okay

junior path
distant mango
#

nothings stopping you

#

unless youโ€™re making a pr ofc

junior path
junior path
proud jay
junior path
#

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

high compass
#

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

main mica
#

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

echo kilnBOT
opal verge
#

I'm using Gradle

#

Does it use the archives base name?

#

Okay yea it does

#

I feel like that changed recently

novel knoll
#

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

opal verge
#

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

gentle viper
#

any tips for faster builds on windows?

quaint raven
#

Wsl

turbid moon
#

honestly, most gradle builds only take a few seconds for me personally

#

Even with bigger plugins

#

(Not huge plugins though)

kind garden
#

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

glass sable
#

I mean, paper's tooling can xD

lament scarab
#

if there exists a generic gradle plugin for that I would be surprised

kind garden
#

i've heard of git patcher from forge

#

idk if it can decompile

kind garden
lament scarab
#

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

kind garden
#

yes

#

hm

jagged apex
#

:getPaperUpstreamData > paperdecompileJar > Resolve dependencies of paperdecompiler

#

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

jagged apex
#

(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

verbal skiff
#

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

cinder ember
#

i made a new project just now idk why its giving this error

#

paper - 1.20.4 - azulu 17

#

gradle

devout ledge
#

In the left pane, click the top Skyblock [:wapper] ... line, it should show the full Gradle output including more context for that error

cinder ember
#

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

cinder ember
#

hehe got it working

#

=D

cinder ember
#

yea no

#

its hella confusing to add other stuff

#

i regret starting this project with maven

cinder ember
#

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

finite crow
#

@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?

lament scarab
#

I mean, it tried to load a jar file which is not a jar file

finite crow
#

huh

lament scarab
#

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

finite crow
#

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

cinder ember
dawn hollow
#

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.

bronze ember
#

Considering we having used a build.sh in years, I doubt anybody can help you with such outdated sfuff

main mica
#

For the modern tooling see the paperweight-examples repository, it's an example Paper fork. But yeah, for old versions no idea

floral whale
#

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?

hybrid topaz
#

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)
                    }
                }
            }
        }
    }
}
lament scarab
#

Cannot have abstract method NamedDomainObjectSet.named()

#

er, missing name?

hybrid topaz
#

What do you mean by missing name?

lament scarab
#

all I know is what it's saying

hybrid topaz
#

I'm not sure what to do to fix this though...

smoky violet
#

try using an up to date version of hangar-publish-plugin

hybrid topaz
finite loom
#

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.
brave widgetBOT
smoky violet
#

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

whole obsidian
smoky violet
#

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

whole obsidian
#

Yeah but I think it might be an issue with signing plugin

whole obsidian
smoky violet
#

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

brave widgetBOT
lament scarab
finite loom
#

Windows 10

lament scarab
#

Outside of make sure that you're not building in some folder tainted by onedrive, etc, I have no idea how that blew up

finite loom
#

No I've not enabled one drive. This is a folder from github and it shouldnt effect this

lament scarab
#

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

glass sable
#

"enabling one drive" also means nothing as it's enabled by default in certain folders (e.g. the Desktop)

finite loom
#

Oh no it's in documents

lament scarab
#

which is tainted by onedrive by default

glass sable
#

lmao

finite loom
#

I'll see in a new file

glass sable
#

god windows sucks

#

can they place go back to making an operating system instead of a live service?!? -.-

finite loom
glass sable
#

faster than installing everything on windows again though thinksmart

finite loom
#

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

smoky violet
#

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

terse gyro
#

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))
}
agile skiff
terse gyro
#

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

agile skiff
#

what command are you using to build?

terse gyro
#

dont hate but i just tried clicking the run on build.gradle.tks

#

but should i use sth like ./gradlew build.gradle.kts

agile skiff
#

just run ./gradlew build

terse gyro
#

oh ok

agile skiff
#

that should compile your plugin

terse gyro
#

oh i see thanks

agile skiff
#

outputs gonna be in build/libs

terse gyro
#

i still have a few errors though let me see

#

oh nvm it was something i did

#

thanks!

agile skiff
terse gyro
#

thank you!

whole obsidian
#

Is there any reason why RemapJar doesn't extend it already?

agile skiff
smoky violet
#

that's like saying why does String not extend from HashMap or something

high meteor
#

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?

dreamy moth
#

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

dreamy moth
#

anyone?

lament scarab
#
  1. groovy is dead
#
  1. use shadowJar instead of named
dreamy moth
#

doesnt paper use groovy?

lament scarab
#

No

#

kotlin build scripts are the default these days

#

pretty sure "named" is a kotlin convention too

dreamy moth
#

isnt kotlin different coding language?

lament scarab
#

Groovy is one language

#

kotlin is another

#

groovy has been generally pushed to the side in favour of using kotlin for the build scripts

dreamy moth
#

is kotlin the thing that helps jar file compile or something?

lament scarab
#

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

dreamy moth
#

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 ^

lament scarab
#

I mean, that's not showing where the error is, and I'm not going to keep setting up faux gradle projects to look

dreamy moth
#

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

lament scarab
#

Why did you change it to name?

dreamy moth
#

i recreated the project and copied this code from the bstats

#

website

#

ill change it

lament scarab
#

Yes, but you used the method name()

#

rather than named()

dreamy moth
#

like this?

lament scarab
#

idk what name is, but it's clearly upset about what you passed in

#

just shadowJar {}

dreamy moth
lament scarab
#

I mean, I'm sure that if you actually copied that it might have worked

dreamy moth
#

like this?

#

i copied that

lament scarab
#

remove the {}

dreamy moth
#

it works now thanks

#

what about paper api

lament scarab
#

best guess would be check java version

dreamy moth
#

oh i forgot to copy this

#

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

#

wait

#

it still doesnt work

fading vapor
#

maybe try java.sourceCompatibility = JavaVersion.VERSION_17

dreamy moth
#

oh shit

fading vapor
#

that might be a problem

dreamy moth
#

yea

#

nope

#

still error

#

ill switch back to 1.8

fading vapor
#

bruh

lament scarab
#

1.20.4 requires java 17

fading vapor
#

^

lament scarab
#

you probably also want to use the java toolchain stuff to set it to 17

dreamy moth
#

oh do i need to switch the option below?

fading vapor
#

yes

dreamy moth
#

to this right

lament scarab
#

language level is generally derived from the gradle config

#

changing it there will basically do nothing

shell leaf
#

Have you checked the gradle build tools options ?
Settings | Build, Execution, Deployment | Build Tools | Gradle

dreamy moth
#

what do i need to check

fading vapor
#

Gradle JVM is 1.8

#

it shouldnt be

shell leaf
#

Gradle JVM must be java 17

dreamy moth
#

oh

shell leaf
#

And then re-import the project

dreamy moth
#

with reload gradle?

shell leaf
#

Yes

dreamy moth
#

it still gives a error

shell leaf
#

Which error ?

dreamy moth
shell leaf
#

Have you pressed apply ?

dreamy moth
#

yea

#

when i reopen the setting its like this

#

so it applied

lament scarab
#

I mean, what it can resolve is mostly going to boil down to your configuration, but, I'm repeating myself again

fading vapor
#

perhaps try invalidating caches

#

could be IntelliJ's doing

lament scarab
#

nothing to do with caches

#

their config is probably bad

dreamy moth
#

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

fading vapor
#

have you used gradle init?

dreamy moth
#

yea

dreamy moth
#
 * 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)
    }
}
lament scarab
#

do a manual build and see what java says

#

and once aand you've still got the source compat set to 1.8

dreamy moth
#

how do i build it if paper isnt importing

#

it wont let me

lament scarab
#

Because the gradle tool is generally better at showing errors than IJ is good at extracting them

dreamy moth
brave widgetBOT
lament scarab
#

Yes, so, once again, remove the java 8 source directive

lament scarab
#

from your config, where you're setting the source compat to 1.8

fading vapor
#

java.sourceCompatibility = JavaVersion.VERSION_17

dreamy moth
#

ah this one?

lament scarab
#

Yes

#

remove it

#

the toolchain stuff already sets it

dreamy moth
#

ok wait

fading vapor
#

should be 17 instead of 1_8

dreamy moth
#

well ill just remove it

#

hm no console appears now

#

i think it worked

#

thought paper had adventure included?

fading vapor
#

It does

lament scarab
#

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

fading vapor
#
implementation("net.kyori:adventure-platform-bukkit:4.3.2")
dreamy moth
#

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

lament scarab
#

I would imagine that your group field is pointing towards the wrong thing

#

project.group

dreamy moth
#

well if group is Duels

lament scarab
#

Yes, but you're making an assumption over what group is calling

dreamy moth
#

isnt it supposed to be Duels.**?

lament scarab
#

You would expect, but, no, because you're assuming that that is what it's calling

dreamy moth
#

so what is it calling

lament scarab
#

use your IDEs go-to definition feature

dreamy moth
#

this will work probably

lament scarab
#

I mean, it's calling the one on the Task

#

no idea why your IDE is cursed

#

yes, that is what I recommend

dreamy moth
#

hm this says same thing

#

well

#

ill try it

lament scarab
#

yes, your IDE seemingly hasn't imported the scripts properly

dreamy moth
#

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?

lament scarab
#

if one of those was kotlin, yes

fading vapor
#

wait, you have been working with a kts file this whole time without the Kotlin plugin?

dreamy moth
#

how do i check if i have that installed

#

oh i have to enable that

fading vapor
#

๐Ÿ˜ญ

dreamy moth
#

lol

#

my bad

fading vapor
#

some pretty colors and InteliSense will now work

dreamy moth
dreamy moth
fading vapor
#

no

#

don't add it to standalone

lament scarab
#

No, basically, it will figure that out when it successfully imports

dreamy moth
#

ok

#

what about the error

#

why are these red

lament scarab
#

I am still not omnipotent

dreamy moth
#

is it supposed to be?

lament scarab
#

because git, I'd image

dreamy moth
#

wdym

fading vapor
#

do you have git enabled?

dreamy moth
#

yea

lament scarab
#

you're using git, IJ colors the files to represent certain states

#

red = unadded, I think

fading vapor
#

^

dreamy moth
#

ah

#

ok

#

what about the error

fading vapor
dreamy moth
lament scarab
#

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

fading vapor
#

relocate("org.bstats", project.group.toString())

#

this should do

dreamy moth
#

is the group supposed to be package name?

lament scarab
#

yes

dreamy moth
#

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?

lament scarab
#

I mean, it's gonna be used for stuff like the maven plugin, etc

verbal skiff
dreamy moth
#

got it working

dreamy moth