#build-tooling-help

1 messages · Page 8 of 1

dreamy moth
#

how do i remove maven?

#

im no longer using it

#

is it going to be scrambled in my project folder?

fading vapor
#

unlink it

#

click on the project in the maven tab and click unlink

fading vapor
dreamy moth
fading vapor
#

BOTTOM TEXT

dreamy moth
#

this one?

#

projectS?

fading vapor
#

can I get a bigger picture

dreamy moth
fading vapor
#

I mean that should do it yes

lament scarab
#

Basically, you're gonna wanna yeet the pom file

dreamy moth
#

why does it say projectS

lament scarab
#

you may also wanna basically nuke the project file

fading vapor
dreamy moth
#

i already have backup

fading vapor
#

just because it can help compare it to gradle

dreamy moth
#

for it

#

what files do i need to remove?

fading vapor
#

then nuke it

dreamy moth
#

pom.xml and?

fading vapor
#

.idea i suppose

dreamy moth
#

isnt there gradle files?

fading vapor
#

gradle has .gradle

#

.idea is IntelliJ's cache

lament scarab
#

The gradle files are fine

dreamy moth
#

anything else?

lament scarab
#

it's just switching build systems is not a common operation that IJ seems to do well with

fading vapor
#

nope

fading vapor
#

it sucked for me

dreamy moth
#

so there is some maven files left

#

wheere

fading vapor
#

no

dreamy moth
#

r u sure

lament scarab
#

I got no idea what ends up in the .iml file

fading vapor
#

ye that might be the problem

#

btw @dreamy moth Gradle's preffered naming convention is kebab-case

dreamy moth
#

<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>SPIGOT</platformType>
</autoDetectTypes>
</configuration>
</facet>
</component>
</module>

dreamy moth
fading vapor
#

LammaCase or kebab-case

#

Java is used to lowerCaseCamelCase for vars and UpperCaseCamelCase for classes yes?

dreamy moth
#

looks like maven

fading vapor
#

when naming gradle projects its usually reccomended to name them with kebab-case

dreamy moth
#

to me

fading vapor
#

thats just xml

#

just because maven uses doesn't mean its maven

dreamy moth
#

is it going to be pain updating all of this on git?

fading vapor
#

no

#

git doesn't have problems like IJ does

dreamy moth
#

version: '${project.version}'

#

what is project version variable for gradle?

lament scarab
#

it doesn't have one, basically

#

you'd use the processResources thingy

dreamy moth
#

what

#

i cant use this in plugin.yml?

dreamy moth
lament scarab
#

google

#

processResources expand

dreamy moth
#

processResources {
include '**/file_a.txt'
filter { String line ->
line
.replace("foo", "fool" )
}
}

lament scarab
#

just use expand

dreamy moth
dreamy moth
lament scarab
#

I mean, it's a task,

#

expand is a method on the process resources task

dreamy moth
#

so like this?

lament scarab
#

No

#

I need to go shower, please read the documentation, idk how you even managed to get that

dreamy moth
#

BRUH

#

whats wrong with the code

lament scarab
#

processResources { val map = mapOf... or something, expand(map)}

thorny pewter
#

is there anything on the docs on how to update paper through linux? Is it the same as downloading any other files or is there another way

lament scarab
#

you mean, the jar?

#

Like, you literally just download the new one and run that one instead of the old one

thorny pewter
#

I mean through my SSH

#

This is what I had a few years back: https://papermc.io/api/v2/projects/paper/versions/1.18.1/builds/100/downloads/paper-1.18.1-100.jar

#

Though I don't really remember how I got that or where or how

lament scarab
#

on the downloads page, right click -> copy URL

thorny pewter
#

I wanna make a script to update all my paper servers to the latest version

lament scarab
thorny pewter
lament scarab
#

No, you would need to query the API

thorny pewter
#

Wdym?

lament scarab
#

we don't have a magical latest endpoint, if you want the latest jar you would need to figure out what it is by using the API

#

jq is a nice little tool for parsing the responses from the API

high meteor
#

I have included a dependency from maven central in my build.gradle. When I do "right click -> go to -> declaration or usages" on something from this dependency, Intellij decompiles the class which often means the class is very hard to understand. The source code of this dependency is on github. Is there any way I can associate the source code with the dependency in build.gradle?

lament scarab
#

in the gradle tool window, tell IJ to download the sources/documentation

#

if they're properly published onto maven, it will grab them

high meteor
devout ledge
#

Yeah, the sidebar, at the top icon list there should be a download button

lament scarab
devout ledge
#

well now you get both old UI and new UI screenshots

high meteor
#

Thank you both! it seems to have worked. Is there a reason this isn't done by default other than that (I think) it would mean storing both source and compiled version of each file that is in the dependencies?

devout ledge
#

Honestly not sure, IJ's gradle integration used to do so automatically, don't know why they changed it

lament scarab
#

I don't recall it doing that by default unless you added in the gradle build config for it to download that stuff

devout ledge
#

idk it downloaded dep sources automatically for me across at least 3 devices over several years prior to the last major update so I don't think it was a setting I had, and I definitely didn't explicitly download deps sources in my buildscripts

high meteor
fading vapor
#

any way to not have duplicate libraries because a subproject also uses it (composite build)?

smoky violet
fading vapor
#

Am I the reason for this kekw

static urchin
dark storm
#

some1 body works with maven, know solve this problem:

Errors running builder 'Maven Project Builder' on project 'VoxyPhysics'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1
Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1
Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1```
boreal mortar
#

Hello there, lately I'm experiencing issues with the building process of Gradle/Paperweight. Whenever I try to build my the jar, I get this error: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\Users\Fyreum\IdeaProjects\Aergia\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\Fyreum\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.8.10\7b6ef88079ac1d0c306c4f243d689357978b5ae5\tiny-remapper-0.8.10-fat.jar

IDE: IntelliJ
Project JDK: 17
Gradle JVM: 17
Task: reobfJar

The gradle build file and the full error log:

build.gradle.kts: https://pastes.dev/eISZDN5QId
reobfJar.log: https://pastes.dev/RcNnRRDMFN

#

I already tried following things:

  • delete all local caches
  • update my dependencies
  • building with Java 21
#

Help would be appreciated

golden mulch
#

Hey, can anyone help me add paperweight userdev to a current project? I'm not able to start a new project from the paperweight-test-plugin and I'm a bit new to gradle.

limpid heart
#

i mean
what did you do? what's not working exactly? do you get an error?

golden mulch
boreal mortar
#

Do you currently have a gradle project setup oder do you start from scratch?

golden mulch
boreal mortar
#

Well, then you just need to add paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT") inside your dependencies and assemble { dependsOn(reobfJar) } inside of tasks

#

And instead of building with jar you use reofJar

golden mulch
boreal mortar
#

reofJar is the paperweight task that builds ur plugin jar

#

It will map the mojang stuff into plugin code

golden mulch
# boreal mortar `reofJar` is the paperweight task that builds ur plugin jar

could not get unknown property 'reobfJar' for task ':assemble' of type org.gradle.api.DefaultTask.

Do I have to do anything other than throw paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT") into dependencies and add assemble?

assemble {
    dependsOn(reobfJar)
}

dependencies {
    compileOnly "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT"
    // https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
    implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.44.1.0'
    // https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc
    implementation group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '6.1'
    paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")


}
main mica
#

you should remove the paper-api dependency if you use paperweight. its already included in the dev bundle

boreal mortar
#

And the assemble part has to be inside of

tasks {

}```
golden mulch
# boreal mortar And the `assemble` part has to be inside of ``` tasks { }```

Like this? I have to be doing something wrong lol.

dependencies {
    //compileOnly "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT"
    // https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
    implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.44.1.0'
    // https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc
    implementation group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '6.1'
    paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
}

tasks {
    // Configure reobfJar to run when invoking the build task
    assemble {
        dependsOn(reobfJar)
    }
}
#

> Could not get unknown property 'paperweight' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

boreal mortar
#

Ah, did u add id("io.papermc.paperweight.userdev") version "1.5.11" to

plugin {

}```?
golden mulch
#

oop

#

lmao yeah that was the issue

boreal mortar
#

My bad, didnt mention it

golden mulch
#

thanks for the help

boreal mortar
#

np

lament scarab
#

maybe try with a shorter path, but, otherwise, the remapper is update with something, though, it was just updated, so, try with the newer one MahiruShrug

main mica
#

broken for me too, and its directly in Z:/project/. Tried the new remapper version already.
and it started happening after changing Vault to compileOnly which is just odd

lament scarab
#

I mean, that would maybe scream that the thing is upset with vaults jar

#

or, wait, does that stuff even end up on the reobf classpath? eeeer

main mica
#

same issue with just Paper instead of our fork too, I was initially thinking I just messed up something with the dev bundle, but it happens with paper too

lament scarab
#

I mean, the remapper shit the bed

#

I can't reproduce

main mica
#

hmm. could it be related to one of the shaded dependencies (bedrock) using preview features? iirc it uses pattern matching for switch somewhere, and java/lang/runtime/SwitchBootstraps/typeSwitch sounds like that.
But idk why that would suddenly break after having worked fine for like more than a year, lol

#

other projects using userdev & bedrock work fine too. I'm just confused at this point tbh

cinder ember
#

FAILURE: Build failed with an exception.

  • Where:
    Build file 'E:\Desktop\minecraft-nodes-dev\nodes\build.gradle.kts' line: 80

  • What went wrong:
    Script compilation error:

    Line 80: paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
    ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
    public fun DependencyHandlerScope.paperDevBundle(version: String? = ..., group: String = ..., artifactId: String = ..., configuration: String? = ..., classifier: String? = ..., ext: String? = ..., devBundleConfigurationName: String = ..., configurationAction: ExternalModuleDependency.() -> Unit = ...): ExternalModuleDependency defined in root package

1 error

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

BUILD FAILED in 1s
PS E:\Desktop\minecraft-nodes-dev\nodes>

#

any ideas?

echo kilnBOT
#

Please send large files/logs to a pastebin

static urchin
#

paste your build.gradle.kts

lament scarab
#

it's not their project, they're tryna build some github project which looks to be using some old af build of gradle, 7.3.3

static urchin
#

oh

cinder ember
#

yeah its for 1.18.2

#

i'm tryna compile a plugin

#

[the plugin is really good but the dev quit]

#

so i have to figure this shit out by myself

lament scarab
#

I mean, the build script that they've got is fine here

#

you're probably using the wrong version of gradle

#

but, you probably wanna invest in actually updating that stuff, but, eeer

cinder ember
#

well what version of gradle do you recommend

#

should i down-grade

lament scarab
#

whatever the latest supported version is, along with the latest version of the paperweight plugin

cinder ember
#

i mean i have the newest version off both

lament scarab
#

that project is configured and using gradle 7.3.3

cinder ember
#

so what paperweight would that be

lament scarab
#

I mean, the version of paperweight that it was already configured with

cinder ember
#

oh so i don't have to download anything paperweight related?

#

just downgrade gradle

lament scarab
#

you should use the gradle wrapper

cinder ember
#

i'ma keep it a stack 50 with you. I like knew nothing about gradle or paperweight untill yesterday. what is gradle wrapper 😭

lament scarab
#

I mean, use the gradle scripts that the project comes with, and make sure that your IDE or whatever tool is using them

#

but, this is a rabbit hole I'm too dead for

cinder ember
#

alr

smoky violet
#
  reobfJar {
    val f = layout.buildDirectory.file("tmp/$name/knownIndyBsm.txt")
    doFirst {
      f.get().asFile.parentFile.mkdirs()
      f.get().asFile.delete()
      f.get().asFile.writeText("java/lang/runtime/SwitchBootstraps/typeSwitch")
    }
    remapperArgs.append("--knownindybsm=${f.get().asFile.absolutePath}")
  }
#

you might be able to get it to work with something like that if the types switched on don't need remapping

#

but you should ask in fabricord for anything further

#

(.append is from gradle 8.7-rc-2, it's needed to not overwrite the convention args)

boreal mortar
#

Alright, thanks for the help 👍🏼

sinful summit
proud maple
#

what is the path of the folder you cloned it into

sinful summit
proud maple
#

yes

sinful summit
#

its inside Desktop > another folder > and another folder

#

wait no

#

just Desktop > another folder

#

so rn its like Desktop\Folder\paperweight-example

static urchin
#

probably too long of a filepath then?

sinful summit
static urchin
#

Yea, try that

#

or look into enabling long paths on windows

#

(or use WSL)

sinful summit
#

got past patchCraftBukkit

#

once this completes I can move it back to the old folder right?

static urchin
#

Well

#

its gonna fail on every upstream update

#

which is why you should look into "long paths" on windows

#

there is both a registry option and a git system config iirc

#

or WSL to not deal with the windows bs

sinful summit
#

uhm

#

is the compiled source code supposed to have thousands of errors

static urchin
#

compiled source code?

sinful summit
#

I clicked into a random file

static urchin
#

no, reload gradle

#

your ide is dying xD

sinful summit
static urchin
#

Yea, its gonna try to index a giant project

sinful summit
static urchin
#

okay?

#

give it some time

sinful summit
#

and error gone aswell

static urchin
#

👍

sinful summit
#

cool, tysm

sinful summit
#

because i've read somewhere that it only includes the files that paper made changes to

static urchin
#

yes

#

to your second statement

#

we do not include NMS types we do not modifiy in your work tree

#

they are not decompiled

sinful summit
austere ore
#

How can I solve this error?

lament scarab
#

look at the log file as it says?

austere ore
#

I don't understand much

lament scarab
#

so, the patch failed for some reason

#

outside of "make sure that you're using a short path" because of filesystem limitations, you'd generally need to try to isolate why the patch failed to apply

austere ore
#

wdym, how do i fix

lament scarab
#

there is no magical fix

austere ore
#

it fixed

#

Thank you anyway

strong quest
#

(i have no idea why it's happening)

#

do i need to shade/relocate MiniMessage

#

on 1.17.1 dependency

#

1.17.1 might not actually have minimessage

devout ledge
#

Pretty sure native minimessage on paper was 1.18.2 or 1.19.X

strong quest
#

oh

#

what's the dependency to minimessage then?

#

group and artifact

#

and latest version

brave widgetBOT
strong quest
#

ty

oak copper
#

Btw does paperweight allow deobfuscating JARs too?

#

Basically I have 1.19.4 fork that I still have jar access to

#

And i want to port patches

#

Can I remap the method names of it?

static urchin
oak copper
#

That could work

#

Btw the CLI way isnt supported anymore right?

#

Or it just isnt built automatically

static urchin
#

Uhhhhh

oak copper
#

Because the repo doesnt contain the CLI thing

static urchin
#

the cli is certainly there

oak copper
static urchin
#

yea

static urchin
#

open issue (know issue)

#

well, we don't deploy the cli to maven

#

because why would you

oak copper
#

Yeah I will just build it myself

static urchin
#

yee

oak copper
#

Btw do you have any sample usage

#

It is kinda confusing for me

bronze ember
#

--output=run/output.jar --force --mc-version=1.20.4 --remapper-coords=net.neoforged:AutoRenamingTool:1.0.7 --params-coords=org.parchmentmc.data:parchment-1.20.3:2023.12.31

oak copper
bronze ember
#

Whatever parchment uses, lol

oak copper
bronze ember
#

For params, in the future, yes

#

Codebook isn't in prod, it's our new tooling

oak copper
#

Yarn?

bronze ember
#

For params, yes

oak copper
#

For method names?

static urchin
#

mojang mappings

oak copper
#

Are they publicly avaliable

bronze ember
#

Yes

#

Codebook will auto download them for you

oak copper
#

Well if I input my own jar it won't

bronze ember
#

You can grab them via piston meta, they are also linked on the wiki

oak copper
bronze ember
#

Checkout my PR

oak copper
#

I see

oak copper
bronze ember
#

Well, it says right there, your csrg file is invalid

oak copper
#

What is that?

bronze ember
#

Oh lol you did give the param mappings via the mappings param

bronze ember
#

Look at the help page

oak copper
#

I see I gave it the wrong mappings

#

I got the correct ones from piston-data

oak copper
#

I ended up using tiny-remapper because the jar included the mapping file

high meteor
#

I'm trying to write a plugin that uses the NotQuests API, but the plugin is no longer hosted on any remote repositories. I attempted to install a downloaded jar file of the plugin in my local maven repo instead using the command ./mvn install:install-file -Dfile=C:/users/main/desktop/NotQuests-5.17.1.jar, but it installed under the path com/zaxxer/HikariCP for some reason instead of the expected rocks/gravili/notquests. So I used this command ./mvn install:install-file -Dfile=C:/users/main/desktop/NotQuests-5.17.1.jar -DgroupId=rocks.gravili.notquests -DartifactId=paper -Dversion=5.17.1 -Dpackaging=jar. It seemed to install in the correct directory, but even after including mavenLocal() in the repositories section of build.gradle I can't seem to resolve the dependency.

#

I have three questions:

#
  1. How can I resolve this dependency?
lament scarab
#

well, how did you define the dependency in your build config?

high meteor
lament scarab
#

and if you run a build manually, what does it say?

glass sable
lament scarab
#

I mean, they set the packaging to pom?

#

or, hm

#

I mean, it makes sense why it fails, I guess, kinda

glass sable
#

yes, you can't really set a parent pom to jar xD

#

it generates a jar file with a .pom ending which is insane

lament scarab
#

close enough

high meteor
# lament scarab and if you run a build manually, what does it say?
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve rocks.gravili.notquests:paper:5.17.1.
     Required by:
         project :
      > Could not resolve rocks.gravili.notquests:paper:5.17.1.
         > inconsistent module metadata found. Descriptor: com.zaxxer:HikariCP:5.0.1 Errors: bad group: expected='rocks.gravili.notquests' found='com.zaxxer'
           bad module name: expected='paper' found='HikariCP'
           bad version: expected='5.17.1' found='5.0.1'``` I opened the jar with 7zip and there is a pom.xml located at `META-INF\maven\com.zaxxer\HikariCP\`
lament scarab
#

by any remote chance in hell

#

did you run that inside of the checked out sources for hikaricp?

high meteor
lament scarab
#

I mean, there is clearly something wrong with how you're publishing it if it's picking up that metadata

#

I can't really say what, though

high meteor
lament scarab
#

Yes

#

for some reason it is picking up the metadafor another library

high meteor
lament scarab
#

Well, if it's stored in there it's generally in the META_INF/maven folder as like you can see above

#

but, usually the pom you care about is plopped in the folder with the jar in the repo

high meteor
# lament scarab but, usually the pom you care about is plopped in the folder with the jar in the...

Thank you for answering all of my questions! I think fixing this issue is probably beyond me at my current level and the plugins's dev is inactive so I doubt it will be fixed in the future. My other question is hopefully a bit simpler: The plugin's source code is on github and there appear to be some javadocs in the same repo. is there a way that I can attach those to the jar file I've downloaded so I can see souce code and documentation in intellij? I am being stopped by the fact that the jar does not appear in the Libraries section of the Project Structure window.

lament scarab
#

The thing expects that stuff to be available in a maven repo

#

iirc, there was a thing that can let you attach stuff manually, but, if it's not showing up as a library in general then something is wrong with your setup

feral wedge
#

it's my first time making a multi-platform plugin and I honestly have no idea how to manage that using gradle.
Can someone tell me how to to manage that? Like how to distribute the gradle configurations and how to properly set it up?

#

because this doesn't seem like at all

distant mango
#

apply the java or java-library plugin for the subprojects

feral wedge
scenic cargo
#

I'm working on a Paper plugin using Spigot in IntelliJ IDEA. I want to use Kotlin for coding. But when I convert my Java code to Kotlin and compile the JAR file, the output file size is in megabytes (MB) instead of kilobytes (KB). However, when I compile the same plugin in Java, the output is in KB. I'm using Maven for this project. Can anyone help me with this issue?

Here's my pom.xml

brave widgetBOT
lament scarab
#

Because using kotlin means that you're going to also be pulling in the kotlin stdlib

#

(you'd also want to set the scope of the paper dependency to provided in order to prevent it from being shaded)

scenic cargo
#

How can I set that?

#

Like this?

brisk belfry
#

yes

scenic cargo
#

The file size remains unchanged even after including the 'provided' scope. Any ideas why?

brisk belfry
#

did you do a clean package?

scenic cargo
#

Yep

lament scarab
#

well, that will just ensure that you don't shade paper-api

#

idk how big your jar is, but, once again, you're bundling the kotlin stdlib now

scenic cargo
#

It's 1744 kbs in kotlin and 20 kbs ish in java

lament scarab
#

Yes

#

that's expected

#

when you use java, the standard library which comes with all of the things like HashMaps, ArrayLists, etc, are bundled with the JVM

#

when you use kotlin, any of the standard classes, etc, that they provide, are not shipped with the JVM, and so you have to bundle them yourself

#

Now, you generally have 2 options, you can shade them, or, you can use the library loader stuff to load them at runtime (but, that is a fairly modern feature)

scenic cargo
#

That'll decrease the size of my .jar, right?

#

And how can I do that, are there any docs?

lament scarab
#

I wanna say that we might have docs on it, not 100%

#

otherwise it would be on spigots site somewhere

#

but, yea, if you did that you wouldn't have to bundle it in your jar

main mica
scenic cargo
#

What if I shift to gradle or java?

final viper
#

That wouldn't matter, the resulting JAR size would be the same.

lament scarab
#

I mean, if you don't use kotlin then you don't need the kotlin stdlib

#

but, it's not like the size of the jar is relevant

final viper
#

Gradle or Java? What do you mean with that? Do you mean Groovy or Java?

#

Java is a language, Gradle is a build tool. They are not interchangeable.

brave widgetBOT
scenic cargo
final viper
#

Cat and Malfrador's suggestions were correct, don't shade the Kotlin standard library, but define it as a library in your plugin.yml.

distant mango
#

“the problem”?

scenic cargo
#

Oh

final viper
scenic cargo
#

I've added it like this:

final viper
#

I haven't worked with the libraries section or Kotlin before, but that looks reasonable.

scenic cargo
#

After removing this specified section from my pom.xml and incorporating the stdlib into the plugins.yml, the size reduction was successful. Thank you very much for your assistance.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <shadedArtifactAttached>false</shadedArtifactAttached>
                </configuration>
            </plugin>
high meteor
#

I'd like to attach some source code to one of my dependencies, but it seems like there isn't a -sources jar on the repo they've provided. The source code is available on gitlab, is there any way I can attach it using a gitlab link?

lament scarab
#

last I knew you can attach a folder

high meteor
#

Meaning a folder on my local machine?

lament scarab
#

yes

high meteor
#

I will give it a try

lament scarab
#

oh, that function might be broken

#

or maybe not, idk

high meteor
#

Thanks for the help!

#

I wish there was a way to import source from github/gitlab rather than manually downloading source code

#

Ok one more question: How can I make my comments look like this in my own code? Is displaying comments like this exclusive to dependency source code?

lament scarab
#

I mean, it's a dum feature

#

that's reader mode

high meteor
lament scarab
#

attaching folders generally means that somebody screwed up or failed to use proper dependency management

#

chances are if they have a custom repo they likely just forgot to setup publishing sources jars, maybe worth giving them a kind prod if you want it

high meteor
#

I'll see if I can open some kind of ticket but these devs haven't been particularly receptive to feedback in the past.

high meteor
sturdy plover
static urchin
#

......

#

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

#

I literally asked you this

#

and you said 1.5.11

sturdy plover
#

no, Im sorry - thats on my machine. on the other one its the right version, just didn't updated my project yet:

north geyser
#

how do i exclude kotlin in gradle?

#

legit nothing working

#

my build.gradle.kts

lament scarab
#

I mean, you have a whole bunch of stuff that could be pulling in kotlin, you'd need to check the dependency tree

#

or add an exclusion to the shadowJar task

north geyser
#

tried:

    shadowJar {
        exclude("org.jetbrains.kotlin")
    }```
and
```kts
withType<ShadowJar> {
  dependencies {
    exclude { it.moduleGroup == "org.jetbrains.kotlin" }
  }
}```
#

neither worked

lament scarab
#

you'd need to check your dependencies

#

might be that one of them is shading it into itself

north geyser
#

the only dependency that isn't excluding kotlin is reflections

#

which is java

#

everything else is excluded or compileOnly

lament scarab
#

exclusions are irrelevant if they've shaded it themselves

north geyser
#

O

#

is there a way to remove them tho?

lament scarab
#

yes, iirc you can also specify a package space/filter or something

north geyser
#

i'm trying to remove kotlin from this project because my core plugin has it and is causing a LinkageError

north geyser
lament scarab
#

I don't remember the exact stanza

#

see the docs

distant mango
#

kotlin.stdlib.default.dependency=false gradle.properties

north geyser
#

also tried that

distant mango
#

actually no nvm

north geyser
#

didn't work

distant mango
#

can't you just relocate lol

north geyser
#

tried that and it broke it more

lament scarab
#

relocating would remap the entire plugin, and then it would fail in terms of interacting with the core plugin

north geyser
#

why is this so difficult, why couldn't i just do compileOnly and be done with it 😭

#

sadness

#

well ig its from another dependency so

#

might as well keep it in 1 plugin still

#

been at this for a day and tried basically everything

#

like is this 100% kotlin: Caused by: java.lang.LinkageError: loader constraint violation for class me.outspending.invoice.mining.pmines.data.PmineDataManager: when selecting overriding method 'java.lang.Object me.outspending.invoice.mining.pmines.data.PmineDataManager.loadData(java.lang.Object, kotlin.coroutines.Continuation)' the class loader 'InvoiceMining.jar' @2ae7bf2a of the selected method's type me.outspending.invoice.mining.pmines.data.PmineDataManager, and the class loader 'InvoiceCore.jar' @52c3292c for its super type me.outspending.invoice.core.data.DataManager have different Class objects for the type kotlin.coroutines.Continuation used in the signature (me.outspending.invoice.mining.pmines.data.PmineDataManager is in unnamed module of loader 'InvoiceMining.jar' @2ae7bf2a, parent loader java.net.URLClassLoader @4e515669; me.outspending.invoice.core.data.DataManager is in unnamed module of loader 'InvoiceCore.jar' @52c3292c, parent loader java.net.URLClassLoader @4e515669)

#

cuz idk

lament scarab
#

well, yea, you have the coroutines stuff in both of the jars

#

as said, pretty sure you can just eclude like "kotlin.*"

distant mango
#

coroutines is under another depdendency iirc

#

kotlinx

north geyser
#

in my child pluginj

distant mango
#

have you checked your dependency tree

lament scarab
#

it's that maestro library

north geyser
#

but im excluding kotlin from that dependency?

#

so confused

lament scarab
#

We went over this

#

adding an exclusion for a transitive dependency will do nothing if they literally already shaded it into the jar

#

you'd need a package filter

north geyser
#

doesn't show kotlin here doe?

lament scarab
#

Yes

#

because it's not a transitive

#

it is literally embedded into the jar

north geyser
#

O

#

might as well use another command api then

#

too lazy to figure out filters

inland snow
#

Code MC is still active?

#

The last accepted request there was from 2022

lament scarab
#

No idea, not really something I deal with

#

apparently central has long laxed their "dependenencies must be on central" rules, so, probs worth looking there

inland snow
#

How I can publish to maven central repository?

lament scarab
#

ask them

inland snow
#

Ask Who?

lament scarab
#

maven central

#

sonatype have like some thing somewhere on how to request access to be able to publish there

bronze ember
#

They changed the process recently

#

You no longer need to use their Jira, lol

inland snow
#

So what does one has to use now instead of their jira?

agile skiff
inland snow
#

So now one has to email them?

agile skiff
#

it seems so

inland snow
#

and what do i tell them?

#

hello I would want to open a repository in your platform?

agile skiff
#

no tell them you want to register a new namespace. for example io.github.yourname

inland snow
#

oh ok

#

and after that what happens?

#

do i have to wait for them to give me access of something?

agile skiff
#

they may require you to prove that you actually own the address. for the io.github namespace they might ask you to create a new empty public github repo with a specific name (you can delete that one after some time)

agile skiff
#

after they allow you to use the namespace you can freely publish new artifacts under that namespace

inland snow
#

or io.github.alejomc26.bosslibrary

agile skiff
#

i mean it really depends on how you want it

#

in the end a namespace is basically just a domain you own backwards

#

your namespace would be io.github.alejomc26

inland snow
#

but how do i can prove that i own that?

agile skiff
inland snow
#

oh ok

agile skiff
#

i am not sure if you acutally need to have anything on the github pages thing for them to allow you to use it

inland snow
#

so i tell them that i want to create a namespace named io.github.alejomc26

agile skiff
#

yup

lament scarab
inland snow
lament scarab
#

Please pull your finger out of your ass for once

agile skiff
#

lol

#

why does sonatype need 20 different ways to publish shit

lament scarab
#

20 different ways?

agile skiff
#

i mean not literally

#

there is the new web interface

#

ossrh or whatever

#

it's a confusing mess

lament scarab
#

ossrh is dead

agile skiff
#

ah

#

tbh i don't even know where the fucking difference is kekw

lament scarab
#

at least, I think that's what it was

#

general gist is that they're shuffling stuff around and are likely just keeping the old docs around for existing users of that service before they're pushed over

agile skiff
#

i think i gotta read through the docs again to figure out what is actually going on lol

lament scarab
#

From March 12th, 2024, all registration will be via the Central Portal. This page is intended primarily for users who need to publish with legacy OSSRH.

agile skiff
#

yeah idk back when i did it i just created a jira ticket, had that accepted and was able to publish using gradle plugins

lament scarab
#

Yea, they moved from that as mini said

#

I mean, I've honestly yet to have anything worthy to publish to central

#

I'm just sooooooomewhat losely unaware of it all

agile skiff
#

i published like 1 shitty command api to it and thats it (though that was kind of only to test how the system works)

#

doesn't help that the docs for central portal and ossrh look the same or something. idk i can't think anymore

inland snow
#

what gradle plugin is recommended to publish to maven central?

timid mauve
smoky violet
#

paste the log with --stacktrace and --info and send it to modmail

agile skiff
agile skiff
sterile hill
#

how do i force gradle to pull a new dependency? ive tried refresh dependencies but it keeps grabbing an older version

#

snapshot versioning

#

ive even deleted the gradle cache

#

deleted the .idea folder many times due to intellij being hot garbage

main mica
#

is it maybe just pulling it from your local repo instead?

sterile hill
#

i have mavenLocal disabled @main mica

inland snow
#

Is using jitpack a bad practice?

lament scarab
#

it's a crappy solution for a crappy issue

sterile hill
#

what’s wrong with jitpack?

lament scarab
#

you're relying on a platform not exactly known for stability in order to handle reproducable builds with shoddy defaults in which people have to pretty much go out of their way to configure for in order to even build on said platform

sterile hill
#

i think i’ve only seen it used for free repo hosting although i think github can do that too

#

idk if it’s free for public projects tho

lament scarab
#

it's free for OSS projects but also generally dumb

sterile hill
#

github or jitpack

lament scarab
#

github

sterile hill
#

what’s wrong with that

#

i personally like it since i don’t have to setup nexus or something else

lament scarab
#

Because last I knew you have to basically use a token to consume from it

sterile hill
#

yeah

#

u have to do the same for anything else though right

lament scarab
#

No

sterile hill
#

unless you’re just using a firewall

lament scarab
#

I mean, for private stuff, it requiring a token makes sense, that's like, how security works

sterile hill
#

oh you’re complaining about token use for public

lament scarab
#

Yes

#

it's stupid

sterile hill
#

yeah that’s pretty dumb

#

probably just for api abuse or something

#

it used to not require a token right

#

when it first came out

#

and was only exposed via api

lament scarab
#

Pretty sure it always required one

#

I mean, I'd generally suggest people look towards maven central if they wanna deploy their libraries

sterile hill
#

didn’t need a token to pull from this repo but it was 3 years ago

#

is it hard to get on maven central

lament scarab
#

last I saw it's a bit of a PITA especially if you're new to stuff, but, it's the most univeral way to get your libraries out there to people in a reproducable manner

empty ledge
#

I am running into an issue in jpenilla's run-velocity. It can't fetch velocity, always throws an error saying the version is unknown.

Unknown Velocity Version: 3.3.0-SNAPSHOT
Unknown Velocity Version: 3.3.0
Unknown Velocity Version: 3.3.0-SNAPSHOT-371

Am I doing something wrong or is the plugin currently broken?

My build.gradle.kts
https://pastes.dev/AEXVfaIHy8

There are no logs, only unknown version. This is the stacktrace
https://pastes.dev/cN0Pqmp4l9

distant mango
empty ledge
#

Yeah

distant mango
#

can you give the full output log of it? might need --info for it

#

Also make sure you don't have offline mode enabled in IJ

empty ledge
#

It is not in offline mode, It takes a second or two to display the unknown version

#

If on Offline mode it is instant

distant mango
#

Idk, it's not actually logging the exception so I can't really say much besides make sure your internet connection is working and that you can download velocity from the website etc

https://i.imgur.com/jLAdLYS.png

lament scarab
#

outside of some wider configuration issue, it's generally hard to say, especially if the exception is supressed

empty ledge
#

Weird, I am currently talking to you on the same computer as I am running intellij, And I've just downloaded velocity from their website and it worked fine. Can I manually install?

lament scarab
#

are you running the stuff in WSL or something maybe?

empty ledge
#

Nop, just normal intellij in my windows filesystem

#

I can ping it

lament scarab
#

without the exception I have no idea

#

you could try running gradle --stop or whatever it was

empty ledge
lament scarab
#

hm, no idea then

#

you'd need to figure out a way to get that exception, I guess

kind garden
short trench
#

Is there some sort of way I can shade a database library into my plugin, but having another jar contain the necessary files?

#

like instead of adding the library into my plugins it’s in some sort of shared place instead (to reduce file size a little)

lament scarab
#

The entire concept of shading is that you shade those in

#

if you don't want the files in that jar, then you don't shade it into that jar

inland snow
#

How can I update the version of gradle?

short trench
distant mango
#

either by changing the version in gradle/wrapper/whateverfile

#

or ./gradlew wrapper --gradle-version iirc

inland snow
#

Gradle version comes with the jdk?

distant mango
#

no

inland snow
#

I dont remember installing it

distant mango
#

you don't need it installed on your pc

#

thats why the wrapper exists

pallid chasm
#

Is there a way to run ./gradlew rebuildPatches only for Paper-API?

lament scarab
#

see ./gradlew tasks

golden seal
#

rebuildApiPatches

lament scarab
#

there was a command for, ^

inland snow
#

for java 21 should i get gradle 8.4 or 8.5?

golden seal
#

8.6 is the minimum afaik

#

8.7 is out by now though

distant mango
#

no real reason (usually) to stay on old versions

inland snow
#

isn't gradle 8.7 for java 22?

distant mango
#

you can use it with java 22

#

you can still run it with whatever java version you want

bronze ember
#

java is generally backwards compatible

golden seal
#

just use the latest gradle version

#

there's generally 0 reason to stay on a specific version

floral whale
#

Does someone have a publishing function setup for a project with submodules? I'm wondering how to structure it

#

Rn I just use this

    publishing {
        repositories {
            maven {
                name = "summitPrivate"
                url = uri("https://maven.summitrealms.com/private")
                credentials(PasswordCredentials::class)
                authentication {
                    create<BasicAuthentication>("basic")
                }
            }
        }

        publications.create<MavenPublication>("maven") {
            from(components["java"])
        }

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

But it was made for projects with just 1 root module

#

I'm asking because I'm getting this error Received status code 413 from server: Payload Too Large

distant mango
#

the jar is too large probably for the webserver

floral whale
#

But I think it's trying to add more than it should

#

For example the top jar shouldn't be a thing

#

But not sure how to not build it. It's just an empty jar at root

inland snow
#

if I want to add a library should i use implementation or compileOnly?

distant mango
#

do you want it to be shaded

#

if yes, use api or implementation
if no, use compileOnly

inland snow
#

what are the benefits of it being shaded?

distant mango
#

it's in the jar

inland snow
#

?

distant mango
rancid oak
#

Hey
I currently have this problem while compiling
Operation has non zero exit code: 1
The patch failure is on

 Hunk 0: EXACT: @@ -1,3 +1,4 @@
 Hunk 1: EXACT: @@ -10,6 +11,7 @@
 Hunk 2: FAILURE: @@ -23,12 +25,35 @@
 Hunk 3: FAILURE: @@ -40,111 +65,286 @@
 Hunk 4: EXACT: @@ -163,41 +363,44 @@```
i tried  ./gradlew reobfJar --refresh-dependencies  but it did nothing
Does anyone have a solution?
lament scarab
#

That is generally down to things like environmental differences

#

i.e. unexpected java versions

rancid oak
#

It's not my plugin, so I don't know everything about it, but the devs don't have any problems.
Friday everything was fine, but when I went back to the dev on Monday it displayed this error
I've tried several clean options, checked the project structure, but I can't find it.

cinder ember
#

can someone help i dunno why its not copy and pasting the directory

brave widgetBOT
lament scarab
#

you did run the copy task?

cinder ember
#

how do u run it?

#

i am sorry i am not familiar with groovy or gradle at all

lament scarab
#

eeerr

#

I don't windows, but, the goal should show up in the gradle tool window

rancid oak
lament scarab
#

There is no general magical solution, generally need to work out why the patch failed

#

make sure that you're using java 17

rancid oak
#

Nothing change since friday, i'm using java 17
Don't know what is the problem

lament scarab
#

you would basically need to look at the file that it decompiled and see why the patch failed

#

either that or basically yeet the folder and try again

#

otherwise, we have no means to diagnose what is going on

rancid oak
#

Delete the paperweight folder helped me, thank you 👍

floral whale
#

Are shadow relocations not inherited through dependencies?

For example I have a plugin that implements a library which relocates relocate("org.spongepowered.configurate.yaml", "com.summitrealms.summitlibs.yaml")
but in my plugin the configurate dependency isn't relocated, and is in the original namespace

lament scarab
#

they're not inherited

#

they apply to that project and its output

#

chances are you're consuming that project wrong

floral whale
#

Forgot to remove ping sorry

#

The library is just used like this tho implementation("com.summitrealms.summitlibs:bukkit:1.1.0-SNAPSHOT")

#

bukkit is a subproject from the root

#

But the root makes the relocation in the subprojects section, so it should work

#
subprojects {
        shadowJar {
            relocate("org.spongepowered.configurate.yaml", "com.summitrealms.summitlibs.yaml")
    }
}
lament scarab
#

How are you consuming that

floral whale
#

Wdym by consuming?

lament scarab
#

because chances are you are not consuming the shadow configuration, you're consuming the standard default configuration whatever it's called which doesn't even have shadowJar applied at all

floral whale
#

I mean this is the entire configuration

        shadowJar {
            relocate("org.spongepowered.configurate.yaml", "com.summitrealms.summitlibs.yaml")

            archiveFileName.set("SummitLibs-" +
                    "${project.name
                        .replaceFirstChar {
                            if (it.isLowerCase()) it.titlecase(Locale.getDefault())
                            else it.toString()
                        }
                    }-${project.version}.jar"
            )

            destinationDirectory.set(rootProject.layout.buildDirectory.dir("libs"))
        }

        build {
            dependsOn(shadowJar)
        }
#

The file name is changed properly

distant mango
#

you should relocate the whole of configurate not just yaml

lament scarab
#

Okay, but it is probably not actually reading the shadow jar from your subproject

floral whale
lament scarab
#

but, my eye hurts, I'm not going to interrigate you over your configuration

floral whale
lament scarab
#

I have keratoconus

floral whale
#

Lol

#

But how would I consume it differently?

lament scarab
#

you need to override what configuration it's pulling

floral whale
#

Override in root or subproject?

#

Not sure what you mean

sterile hill
#

i get the following error when loading my plugin that depends on an nms module

https://mclo.gs/niL5JEv

and below is the gradle file for the module

/*
 * This file was generated by the Gradle 'init' task.
 */

plugins {
    id 'io.papermc.paperweight.userdev' version '1.5.10'
}

dependencies {
    compileOnly project(':bukkit')
    paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
}

tasks.assemble {
    dependsOn(reobfJar)
}

description = 'nms-120'
#

i assume im having a shading issue or its not properly reobf'ed?

#

the project is built using ./gradlew publissh

distant mango
#

what jar are you using

lament scarab
#

it's not reobf'd at all

sterile hill
#

should be using -all

#

let me check

lament scarab
#

no, use the jar without any classifiers

#

or, well

sterile hill
#

will any libs be shaded into it?

lament scarab
#

module

#

project() takes an argument called configuration

sterile hill
#

well

#

i use -all for the bukkit module

#

for the nms module i use default classifier

lament scarab
#

and, basically, for your thing using the nms module, you want to grab the reobf config

sterile hill
#

idk enough about gradle for that, i just switched to gradle from maven like a month or two ago

floral whale
sterile hill
lament scarab
#

if your module is in an entirely different project then you'll need to make sure that you're publishing the obfuscated artifact

#

I have no idea of your setup

sterile hill
#

bukkit and nms are two separate modules, nms has the bukkit module shaded into it. then, any plugin should be able to shade in the project using nms

#

i had hoped that it would be reobf'ed and then i could just shade in the reoobf'ed version

lament scarab
#

so, those are 2 modules within the same project?

sterile hill
#

yep

lament scarab
#

why are you not using project()

sterile hill
#

i misunderstood your question actually

#

"recon" is a separate project from "arena"

#

would "dev-all" be the reobf'ed version

lament scarab
#

No

sterile hill
#

this gradle file is from the project meant to implement the nms module

#

i think my issue is that the reobf'ed jar just isnt being published

#
    publishing {
        repositories {
            maven {
                name = "GitHubPackages"
                url = uri("")
                credentials {
                    username = System.getenv("GITHUB_ACTOR")
                    password = System.getenv("GITHUB_TOKEN")
                }
            }
        }

        publications {
            library(MavenPublication) {
                groupId project.group
                artifactId project.name
                version project.version.toString()

                from components.java
            }
        }
    }
#

this iss what i do for publishing

#

but i only get

#

sources, dev-all, and -all

#

no non classified jar

#
> Task :nms-120:generateEffectiveLombokConfig
> Task :nms-120:compileJava
> Task :nms-120:classes
> Task :nms-120:jar
> Task :nms-120:shadowJar
> Task :nms-120:generateMetadataFileForLibraryPublication
> Task :nms-120:publishLibraryPublicationToGitHubPackagesRepository
> Task :nms-120:publish
#

yeah its skipping

sterile hill
#

although once ive fixed that issue i still need to deal with the default jar not being published

sterile hill
#

is there a way to completely disable dependency caching in gradle? getting tired of having to increment version just for it to update with snapshot versioning

sterile hill
floral whale
#

I'm so confused why these would have different versions. Their version is applied from allProjects section in the root build.gradle file

#

This only happens when using it in another project btw

brisk belfry
#

Do you have it specifically set somewhere maybe?

#

Maybe it’s something with the cache

floral whale
#

Fixed ^^^^

distant mango
#

deleting messages is annoying

#

and toxic

void hill
#

heyo, so am new to the way paper is using nms, has cloned the git and opened up the project. Do I need to build the plugin inside that project, am a bit confused. my current setup experience is the Minecraft plugin in IntelliJ >.<

#

the plugin is not runnable to compile, so I assume I need to setup all that?

echo kilnBOT
smoky violet
#

you don't need to build paper or paperweight

kind garden
#

is there a maven repository that publishes velocity proxy module

distant mango
#

no

kind garden
glass warren
#

No.

kind garden
#

why

glass warren
#

There just isn't.

kind garden
#

is it bad practice to depend on the proxy module

kind garden
verbal skiff
#

I also don't think it's that many

kind garden
#

isn't it the only way to process packets..

#

that's such a basic feature

verbal skiff
kind garden
#

well i wanted to try to make a proxy-level anticheat but let's move this to #velocity-dev now

paper kestrel
#

I guess ive got to migrate my mache client fork from build script changes to sculpter now?

Idk if there is any interest to it being upstreamed, but I've found it partly useful (as genning source through neoforge etc adds the side marker annotations etc even though the client includes everything the server does)

#

Idk if sculpter is anything other than the previous in-repo build script migrated to a separate repo, I haven't looked that far

bronze ember
#

Basically that, ye

#

Don't mind that being part of sculptor actually, as long as it's configurable

paper kestrel
#

this is the current state of it, https://github.com/456dev/paper-mache/commit/f5e3a9dbd942e7b6a2c33624a39ea74f3407ff02
at the moment, it needs to specify specific handling in the mache block, with a default to server (im guessing thats now a scuplter block? havent looked at the migration yet)
https://github.com/456dev/paper-mache/blob/bca3f61abd3849292a39c5bb7c203f52c347063b/versions/client-demo/build.gradle.kts#L9

the same jar logic (skipping double extracting iirc) should also work for older server jars too, but i havent tested it, and currently setting it to client also changes the jar source

GitHub

to use, set minecraftJarType = MinecraftSide.CLIENT in your build.gradle.kts

lament scarab
#

it would be nice to have, just for the sake of using mache-client was so much nicer than tryna get enigma to not suck for navigating around

bronze ember
#

that doesnt look too bad

#

and no, its sitll a mache block, didnt bother renaming the extension and the task group and stuff

paper kestrel
#

👍

bronze ember
#

oh that whole block can be nuked

#

that project isnt published

paper kestrel
#

do you have continuation indent set to 4? idea's formatter wants to add 8 spaces in the multiline dataclasses, which doesnt look right

bronze ember
#

looks like I am using my companies scheme

#

its set to 8

paper kestrel
#

hmm thats odd

paper kestrel
#

in mache i guess a verson catalog might be useful to keep the mache version in sync between root, and all the versions

bronze ember
#

We talked about and explicitly didn't want that, since there could be incompatibilities

#

Same reason why sculptor doesn't depend on codebook directly anymore

paper kestrel
#

right ok

#

yeah that makes sense and iirc i ran into that when i was contributing to normal upstream mache, the branches swapped away my build changes and caused errors lol

#

iirc i had to manually change what versions were included from versions/* to versions/<version i was editing> so it didnt try to load the buildscript of the others

bronze ember
#

Dont think I am following

paper kestrel
#

when i was previously developing mache-client, alongside updating mainline mache's versions, i was swapping between changes.
when i swapped away from mache-client, i couldnt build anymore, as my local client versions (which had a side property, which doesnt exist on the standard verison),
i had to exclude that version from being built

bronze ember
#

Just don't swap between changes then?

#

Only one version per branch is tracked by git

#

But git will also not touch the other folders

bronze ember
#

I'll take a look tomorrow

paper kestrel
#

looks like the current version has an issue with png files

#

im guessing binary files in general, judging by the ignore for data/minecraft/structures

bronze ember
#

Ye, diffpatch doesnt like those

paper kestrel
#

i guess somewhere git binary patch support needs to be added then?

bronze ember
#

Why

#

Do we need to patch them? In mache? Mache only wants decomp fixes

paper kestrel
#

Uh true I guess, my use of mache client sometimes was making slight changes without a mod loader to test (fully) vanilla behaviour, and I can potentially see the use to batch binary structures etc

#

But currently not having png files excluded generates an error line for each one

bronze ember
#

Diffpatches ignore pattern functionality is kinda meh

paper kestrel
#

Since the ignore filter is prefix based, I don't think there is a way of doing it without fully ignoring assetS/texture

magic hearth
#

does anyone know how to fix this?

#
A problem occurred configuring root project 'CytonicLobby'.
> Failed to create service 'paperweight-userdev:setupService:77817400c2c3673336db9b3e7929ef79786e7bc50ffbde219e5f6bfad4852231'.
   > Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.

prime cliff
echo kilnBOT
#

Please send large files/logs to a pastebin

distant mango
#

@inland snow

distant mango
#

did you put stuff in your gradle.propertied

inland snow
#

this is my gradle.properties paperVersion=1.19-1.20.2

#

the api key is in the user gradle.properties

paper kestrel
#

looks like maches resource editing is fully broken, as any built jars dont include resources by default, until running copyResources, which copys it from the downloaded jar, not the patched jar

#

(or the source files)

granite valve
#

well that's not really the point of mache

#

it's to fix decompile errors. there won't be any of those in the resources

paper kestrel
#

yeah i know my use is non-standard, but if i get it working for me i'll pr it so you can patch anything :)

merry terrace
#

What channel is general now?

#

🥺

granite valve
lament scarab
#

I mean, patching resource files is not a usecase for mache, and so it's very unlikely that we'd want to maintain such a featureset as part parthe pipeline

#

The entire point is that it poops out a package of the compilable source code which you can consume and deal with patching, etc, elsewhere

paper kestrel
#

I think I previously assumed differently, as it was slightly more user facing (download and compare multiple versions with this gradle task)

lament scarab
#

Theres a level of "it's handy for looking at stuff", but, it's designed to produce a starter point for other things

paper kestrel
#

Im guessing paperweight hardfork itself is going to be the one that patches resources etc itself on top of mache, and it probably makes sense for me to do it that way too when it's released
(it should be easy enough to create an empty paperweight project patching mache without paper, right?)

lament scarab
#

yes, paperweight will consume mache as like the source, rather than us having decomp fixes inside of paper itself, they will exist in the mache bundle

paper kestrel
#

That sounds perfect,
I'll try and keep an eye on it so I can maybe hack client jar support into that one too

floral whale
#

How can I avoid this conflict?

    api("org.spongepowered:configurate-core:4.2.0-SNAPSHOT") {
        exclude("geantyref")
    }
    implementation("io.leangen.geantyref:geantyref:1.3.15")
#

I also tried to exclude the entire package, didnt change anything

floral whale
#

I want to remove it entirely from configurate though, as I need to relocate it, which didn't work for some reason

distant mango
#

read the page

lament scarab
#

then one would guess that you're defining it improperly for the exclude

#

I'm not aware of gradle just taking an artifact id there, that would be kinda dum to implictly do

floral whale
#

Didnt change anything

lament scarab
#

that is one of the notations that it accepts

#

you did hit reimport?

floral whale
#

Yeah

lament scarab
#

you did define it properly?

floral whale
#

I believe so

    api("org.spongepowered:configurate-core:4.2.0-SNAPSHOT") {
        exclude(group = "io.leangen.geantyref", module = "geantyref")
    }
    implementation("io.leangen.geantyref:geantyref:1.3.15")
#

Weird thing is that the error had a different package tho typeio.leangen.geantyref.TypeToken$1@2493e1cd

#

typeio instead of io

#

Changing it doesn't work tho

distant mango
#

we’ll figure out who’s pulling that one in

floral whale
#

How? Not sure where to find that information

distant mango
#

should tell you if you hover over it

#

in the ide

floral whale
#

It's just this

lament scarab
#

that just screams like a malformatted message

floral whale
#

On my side or Configurate? Which provides the geantyref library

distant mango
#

whoever that message is from

lament scarab
#

also, no idea why you set it to module, it should be artifact last I knew

floral whale
#

The message is from configurate

floral whale
lament scarab
#

oh, that's the example on that page, no idea

distant mango
#

what’s the actual problem

floral whale
#

Serializing this simple class, which worked before I shaded and relocated the configurate library I use.

@ConfigSerializable
public class Test implements LocaleReference {
    @Setting
    @Comment("Whatever")
    private final int num = 2;
}
#

LocaleReference is just an empty interface that I use to define which classes should be serializable

distant mango
#

send the full class and error

floral whale
#

It's thrown from this in configurate

        TypeSerializer<T> serializer = root.node().options().serializers().get(type);
        if (serializer == null) {
            throw new SerializationException(this.path, type.getType(), "Unsupported type" + type);
        }
lament scarab
#

I mean, so theres no registered serialiser for TypeToken

floral whale
#

Yeah, not sure why tho, as it worked before I shaded and relocated

#

Therefore I just assumed I had to also shade and relocate the geantyref library

lament scarab
#

it already is shaded

#

or, at the very least, already available

#

working across jars could potentially create some weird issues, but, idk

floral whale
#

Which means it's unfixable or?

#

Just seems weird

distant mango
#

where are you getting The test class

#
at com.summitrealms.summitlibs.common.config.AbstractConfigurationWrapper.setLocaleReference(AbstractConfigurationWrapper.java:79) ~[SummitLibs-Bukkit-1.1.1.jar:?]
at com.summitrealms.summitlibs.common.config.AbstractConfigurationWrapper.<init>(AbstractConfigurationWrapper.java:42) ~[SummitLibs-Bukkit-1.1.1.jar:?]
at com.summitrealms.summitlibs.bukkit.config.BukkitConfigurationWrapper.<init>(BukkitConfigurationWrapper.java:16) ~[SummitLibs-Bukkit-1.1.1.jar:?]
at com.summitrealms.cosmetics.cosmetic.attributes.managers.Particles.loadParticleTypes(Particles.java:38) ~[SummitCosmetics-Bukkit-2.7.2-DEV.jar:?]
at com.summitrealms.cosmetics.cosmetic.attributes.managers.Particles.<init>(Particles.java:34) ~[SummitCosmetics-Bukkit-2.7.2-DEV.jar:?]
at com.summitrealms.cosmetics.SummitCosmeticsPlugin.onStart(SummitCosmeticsPlugin.java:114) ~[SummitCosmetics-Bukkit-2.7.2-DEV.jar:?]
floral whale
#

From here new BukkitConfigurationWrapper(Test.class, plugin, plugin.getDataFolder().toPath(), "tests/test.yml")

public class BukkitConfigurationWrapper extends AbstractConfigurationWrapper {
    public BukkitConfigurationWrapper(Class<? extends LocaleReference> reference, JavaPlugin plugin, Path dataPath, String resourcePath) {
        super(reference, plugin.getClass().getClassLoader(), dataPath, resourcePath);
    }

super: https://paste.helpch.at/wirinefivo.csharp

#

Important part in AbstractConfigurationWrapper is the setLocalReference method I believe

smoky violet
floral whale
#

Can someone explain how this is at Caused by: com.summitrealms.summitlibs.configurate.serialize.SerializationException
And not Caused by: com.summitrealms.configurate.serialize.SerializationException (summitlibs removed)

When I relocate it with relocate("com.summitrealms.summitlibs.configurate", "com.summitrealms.configurate")

distant mango
#

why are you relocating your own thing

floral whale
#

Well it's supposed to not be in the summitlibs package, and I can't figure out why it is

#

I think it's the cause of the serializer issue

distant mango
#

because something is already relocating it

#

figure that out

floral whale
#

Nothing is relocating it, I checked the lib project, and the project where I use the lib

#

I have this, but that wouldn't move the configurate dependency to there would it?

allprojects {
    group = "com.summitrealms.summitlibs"
    version = findProperty("projectVersion").toString()
    description = "A Library made for SummitRealms"
}
distant mango
#

well it’s not magically getting relocated

floral whale
#

From api("com.summitrealms:configurate-yaml:4.2.0-SNAPSHOT")

#

Would that somehow move it to summitlibs?

distant mango
#

is the project on github

floral whale
#

No, I can upload it tho

#

Can I make it private and add you?

grand niche
#

I mean, why are you forking it in the first place

floral whale
#

It's a fork of configurate that adds comment support

distant mango
#

relocate relocated files not dependencies

#

probably doesn’t make sense

#

did you rename the packages in your fork

floral whale
#

Yeah I renamed the packages in the fork, because a configurate dev or support member told me that was the solution lol

distant mango
#

they were neither

floral whale
#

Oh

#

Ah community dev, but yeah

#

Wanted to see the repositories? Would be a huge help

floral whale
#

I'm so fkn dumb

#

It's fixed....

#

Been spending hours and hours and it was because I had a different version in the server directory....

late moon
#
plugins {
    id 'java'
    id 'eclipse'
    id 'com.github.johnrengelman.shadow' version '8.1.1'
    id "org.jetbrains.gradle.plugin.idea-ext" version "1.0.1"
}

// ....

shadowJar {
    relocate 'dev.dejvokep.boostedyaml', 'xxx.xxx.xxx.dejvokep.boostedyaml' 
}
#

no matter if i do use relocate or not, dev.dejvokep.boostedyaml just disappears

distant mango
#

show your full build script

echo kilnBOT
#

Please send large files/logs to a pastebin

distant mango
#

also (obviously?) it'll be under xxx.xxx.xxx.dejvokep in the jar

late moon
#

so i have to change all my import statements?

lament scarab
#

No

#

the entire point of relocate is that it adjusts all that stuff after the jar is packaged

late moon
#

yeah thats what i thought

distant mango
#

you'r enot actually adding the boostedyaml dependency anywhere

late moon
#

guh

#

i ctrl-z'ed too much

#

now its not finding my main class

#

(yes, i am running the shadowJar task, and used the -all.jar)

distant mango
#

whats the error

late moon
#
 Can't create module for plugin playtimev2
java.lang.ClassNotFoundException: xx.xxxxx.playtimev2.Playtimev2```
#

also sorry for the stupid redacting stuff, its under someone else's domain and i dont know if they want it to be known or not

distant mango
#

is it in the src/main/java directory

#

also make sure casing etc match ig

late moon
late moon
lament scarab
#

We can't comment on what we can't see

#

all we can advise is that you check the contents of the jar and double check your config

bronze ember
#

@paper kestrel 👀

#

didnt bother downloading sounds and shit

#

but it works

median pulsar
#

im trying to setup publishing of a module using userdev with indra. before using indra i used to do this which worked fine:

publishing {
  publications.create<MavenPublication>("maven") {
    artifact(tasks.reobfJar)
  }
}

but now indra automatically creates that publication so im assuming i need to do something like this:

indra {
  includeJavaSoftwareComponentInPublications(false)
  configurePublications {
    artifact(tasks.reobfJar)
  }
}

but that gives the error > Invalid publication 'maven': artifact file does not exist: '/home/vytautas/Projects/Minecraft/scoreboard-library/versions/modern/.gradle/caches/paperweight/taskCache/reobfJar.jar'
how do i fix that?

bronze ember
#

@paper kestrel client always includes server, right? thoughts on, instead of that enum, using an "includeClient" boolean instead, which will then do the stuff, but still allow server to work? is that possible?

#

like, having one project where both runServer and runClient can work

paper kestrel
# bronze ember didnt bother downloading sounds and shit

yeah thats why i didnt bother with a runClient task, i didnt want to mess with vanilla assets.
while i was using it in a completly unintended way (client patch modding), i had an intellij main task set up pointing to my main prism launcher assets directory, using (roughly) the same args they do

bronze ember
#

you can just run without an asset index it seems 😄

paper kestrel
paper kestrel
#

but yeah

bronze ember
#

I am def not missing sounds, I always turn them off anyways 😛

#

but yeah, I am in favor of a simple "includeClient" toggle which will then download client libs and sources instead of server and adds an additional runClient task, while runServer still works

#

dont have time anymore for today, only used the time when oss was down for maintinance, lol

#

but I dont see why we couldn't merge that PR

#

its super simple and can be useful even to us

paper kestrel
#

what ill do is revert the changes to run server, so its always registered again

#

then we can maybe conditionally add runclient in the after evaluate, if the jar is the right type

#

but yeah i dont want to implement that atm

bronze ember
#

do you have time for that in the next days? else ill try making time

#

just checked with the team, nothing against merging that, we are even debating if we should have the compile fix patches for client in mache too

paper kestrel
#

ive just resolved the conflict and pushed my changes

bronze ember
#

@granite valve so if client doesnt include everything, do you think stuff should stay as is?

granite valve
#

I want to confirm that to be sure, but if so, then I think we want a BOTH enum right? so it includes everything?

paper kestrel
#

the enum atm is named that way because its the jar the files are from, as downloaded by mojang

#

and because of the bundler, the server needs slightly different handling

#

rather than the sourceset it pulls from

bronze ember
#

yeah I guess we would want to keep using the bundle for consistency between sculptor and paperweight

paper kestrel
#

So the only thing special with the server jar is that all the dependencies are bundled I think

#

so when is paper going to start distributing modified client jars with the bundler

granite valve
#

yeah, you might be right that its all on the client. I thought maybe the net.minecraft.server.dedicated package wasn't included on the client, but looking at the client jar, it seems that it is

#

I feel like other tools have 3, a CLIENT, SERVER and JOINED type tho, maybe in the past that didn't use to be the case?

paper kestrel
#

it does feel that way, im guessing its either future-proof in case mojang does add something like that, or yeah that was an (old?) version where thats not the case

smoky violet
#

there used to be some classes that had differences between the distributions

#

that's why older tools have a joined mode

#

or, tools supporting older versions

#

at one point they were obfuscated differently too, iirc

dark ingot
#
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.6.3:jar (default-cli) on project spigot-api: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The javadoc executable '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javadoc' doesn't exist or is not a file. Verify the JAVA_HOME environment variable. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/simon/Documents/BuildTools/apache-maven-3.9.6/bin/mvn, -Dbt.name=1.8, javadoc:jar]
    at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
    at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
    at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
    at org.spigotmc.builder.Builder.runMavenAPI(Builder.java:900)
    at org.spigotmc.builder.Builder.startBuilder(Builder.java:688)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)

#

any fix

#

java -jar BuildTools.jar --rev 1.8 --remapped --generate-source --generate-docs

ornate prawn
#

BuildTools is Spigot, not Paper?

glass warren
dark ingot
#

Lmk

ornate prawn
dark ingot
#

My bad gang

ornate prawn
dark ingot
glass warren
dark ingot
#

Can u make one

#

Can u make it work

glass warren
#

We use gradle for our tooling.

dark ingot
#

Fawk luh twin

#

So I can’t use it on my maven plugins

#

How was I being rude?????

#

I was showing u respect

glass warren
#

You could, you’d just have to do it yourself.

dark ingot
#

Wdf

#

That’s crazy

#

I’m showing u respect and u sending warnings

#

Aight mam

#

Man*

primal wing
#

Maven is shit lol

#

We are not spigot

lament scarab
#

Maven is okay for stuff, just not really 1st choice and is entirely irrelevant to their thing

#

Their entire issue is build tools blew up, likely missing the idk or something, but, we don’t provide suppprt for spigots tooling

paper kestrel
#

(its still better than using the latest version tho, i agree)

granite valve
#

The order is just based on the order the versions appear on the manifest

paper kestrel
#

i dont think any metadata includes the previous version it was based on, so the matching needs to be manual :/
(mojang feature request maybe?)

bronze ember
#

doesnt really matter, it will be close enough and there are only 66 patches anyways

#

so even doing them from scratch does take long

#

VF is sooooooooooooooo amazing

bronze willow
distant mango
#

share buildscript

echo kilnBOT
#

Please send large files/logs to a pastebin

bronze willow
#

gimme a min

echo kilnBOT
#

Please send large files/logs to a pastebin

bronze willow
#

no

#

wait wrong one

distant mango
#

L74 looks suspicious

bronze willow
#

Yeah i added to make sure to publish the right jar

#

But idk if its working right

#

Without that its working, but the issue with the wrong jar is still there

#

Caused by: java.lang.NoSuchMethodError: 'net.minecraft.commands.Commands net.minecraft.server.dedicated.DedicatedServer.getCommands()'
at de.derioo.chals.timer.PluginBrigadierCommand.tabComplete(PluginBrigadierCommand.java:54) ~[timer.jar:?]
at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:240) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
... 21 more

lament scarab
#

you need to make it consume the output from the reobfJar task if you want to publish the reobfjar

bronze willow
#

But how?

#

isnt that done through artifact("build/libs/Timer.jar")?

lament scarab
#

no, basically

#

Like, gradle literally told you that that was an issue

bronze willow
#

tasks.named("publish") {
dependsOn("reobfJar")
}
like this?

smoky violet
#

no...

#

read the docs page it linked you in the error

bronze willow
#

Where exactly?

#

Please just say it

smoky violet
bronze willow
#

I dont know what that helps me

#

got it

#

tasks {
assemble {
dependsOn(reobfJar)
}

compileJava {
options.encoding = Charsets.UTF_8.name()

options.release = 17

}
javadoc {
options.encoding = Charsets.UTF_8.name()
}

reobfJar {
outputJar = layout.buildDirectory.file("libs/Timer.jar")
}

publish {
mustRunAfter("reobfJar")
}

}
added the publish thing there

paper kestrel
#

because both runclient and runserver are setup for the same "run/" directory, i think some of the files will get confusing