#build-tooling-help
1 messages · Page 8 of 1
no, just intellij will stop doing InteliSense, automatic workflow, caching, coloring and icons for files
where is thatt
BOTTOM TEXT
can I get a bigger picture
I mean that should do it yes
Basically, you're gonna wanna yeet the pom file
why does it say projectS
you may also wanna basically nuke the project file
I would keep it for some days
i already have backup
just because it can help compare it to gradle
then nuke it
pom.xml and?
.idea i suppose
isnt there gradle files?
The gradle files are fine
anything else?
it's just switching build systems is not a common operation that IJ seems to do well with
nope
tell me about it
it sucked for me
no
r u sure
I got no idea what ends up in the .iml file
ye that might be the problem
btw @dreamy moth Gradle's preffered naming convention is kebab-case
<?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>
i dont know what you have just said
LammaCase or kebab-case
Java is used to lowerCaseCamelCase for vars and UpperCaseCamelCase for classes yes?
this is in iml file
looks like maven
when naming gradle projects its usually reccomended to name them with kebab-case
to me
is it going to be pain updating all of this on git?
how do i do that
processResources {
include '**/file_a.txt'
filter { String line ->
line
.replace("foo", "fool" )
}
}
just use expand
bruh
wdym expand
No
I need to go shower, please read the documentation, idk how you even managed to get that
processResources { val map = mapOf... or something, expand(map)}
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
you mean, the jar?
Like, you literally just download the new one and run that one instead of the old one
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
on the downloads page, right click -> copy URL
I wanna make a script to update all my paper servers to the latest version
Is there a URL linking to the latest version?
No, you would need to query the API
Wdym?
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
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?
in the gradle tool window, tell IJ to download the sources/documentation
if they're properly published onto maven, it will grab them
I can't seem to find that option. When you say "gradle tool window" do you mean the window that defaults to a sidebar on the right side of the screen and has "Tasks", "Dependencies", and "Runtime Configurations" or is there another window I'm unaware of?
Yeah, the sidebar, at the top icon list there should be a download button
dammit you beat me to it https://f.u11.io/IEMkLc
well now you get both old UI and new UI screenshots
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?
Honestly not sure, IJ's gradle integration used to do so automatically, don't know why they changed it
I don't recall it doing that by default unless you added in the gradle build config for it to download that stuff
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
Also thank you for the help yesterday, I was able to make the plugin work by modifying it to extend JavaPlugin rather than PluginBase (I'm still not sure why the original author did that)
any way to not have duplicate libraries because a subproject also uses it (composite build)?

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```
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
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.
i mean
what did you do? what's not working exactly? do you get an error?
I didn't do anything. I just don't want to mess my project up because I'm not familiar with paperweight or NMS. I'm just a little apprehensive about approaching it, and I'm not sure where to start. I don't have much experience in gradle, either.
Do you currently have a gradle project setup oder do you start from scratch?
I currently have a gradle project that I want to add paperweight to
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
what's the difference?
reofJar is the paperweight task that builds ur plugin jar
It will map the mojang stuff into plugin code
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")
}
you should remove the paper-api dependency if you use paperweight. its already included in the dev bundle
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.
Ah, did u add id("io.papermc.paperweight.userdev") version "1.5.11" to
plugin {
}```?
My bad, didnt mention it
thanks for the help
np
Bump 
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 
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
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
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
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
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.
- Get more help at https://help.gradle.org
BUILD FAILED in 1s
PS E:\Desktop\minecraft-nodes-dev\nodes>
any ideas?
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
paste your build.gradle.kts
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
oh
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
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
whatever the latest supported version is, along with the latest version of the paperweight plugin
i mean i have the newest version off both
that project is configured and using gradle 7.3.3
so what paperweight would that be
I mean, the version of paperweight that it was already configured with
you should use the gradle wrapper
i'ma keep it a stack 50 with you. I like knew nothing about gradle or paperweight untill yesterday. what is gradle wrapper 😭
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
alr
yes
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)
Alright, thanks for the help 👍🏼
I'm trying to make a paper fork, and I cloned https://github.com/PaperMC/paperweight-examples/tree/main. The applyPatches command fails on the task paper:patchCraftBukkit
I tried recloning it a few times now, but every time its the same error. Anyone have any idea?
what is the path of the folder you cloned it into
wdym? like the folder that i ran git clone in?
yes
its inside Desktop > another folder > and another folder
wait no
just Desktop > another folder
so rn its like Desktop\Folder\paperweight-example
probably too long of a filepath then?
oh, should I move it to C://paperweight-example
so far so good
got past patchCraftBukkit
once this completes I can move it back to the old folder right?
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
alr I;ll do that
uhm
is the compiled source code supposed to have thousands of errors
compiled source code?
its using 100% of my cpu
Yea, its gonna try to index a giant project
according to my file explorer, NMS is 33mb
👍
cool, tysm
one more question, does the decompiled code include all of NMS itself?
because i've read somewhere that it only includes the files that paper made changes to
yes
to your second statement
we do not include NMS types we do not modifiy in your work tree
they are not decompiled
alright thanks
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
How can I solve this error?
look at the log file as it says?
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
wdym, how do i fix
there is no magical fix
build.gradle.kts ↗
Build Error(s) ↗
how can I fix the error
(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
Pretty sure native minimessage on paper was 1.18.2 or 1.19.X
oh
what's the dependency to minimessage then?
group and artifact
and latest version
https://mvnrepository.com/artifact/net.kyori/adventure-text-minimessage
Adventure Text MiniMessage. A string-based, user-friendly format for representing Minecraft: Java Edition chat components. License ...
ty
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?
https://github.com/PaperMC/codebook might be able to do it?
That could work
Btw the CLI way isnt supported anymore right?
Or it just isnt built automatically
Uhhhhh
Because the repo doesnt contain the CLI thing
yea
Nexus Repository Manager
open issue (know issue)
well, we don't deploy the cli to maven
because why would you
Yeah I will just build it myself
yee
--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
Does it expect json mappings if I want to use my own input
Whatever parchment uses, lol
Oh paper uses parchment mappings?
For params, yes
For method names?
mojang mappings
Are they publicly avaliable
Well if I input my own jar it won't
You can grab them via piston meta, they are also linked on the wiki
Will use those then https://github.com/lucko/spark-mappings/tree/fd258fd8716c3c379c857b00ccc79d33840d8779/dist/1_19_4
Checkout my PR
Any idea about this?
Well, it says right there, your csrg file is invalid
csrg?
What is that?
Oh lol you did give the param mappings via the mappings param
Is that wrong?
Look at the help page
I am looking at it
I see I gave it the wrong mappings
I got the correct ones from piston-data
I ended up using tiny-remapper because the jar included the mapping file
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:
- How can I resolve this dependency?
well, how did you define the dependency in your build config?
After running the second command, I included compileOnly "rocks.gravili.notquests:paper:5.17.1" in the dependencies section of build.gradle
and if you run a build manually, what does it say?
mfw this maven shade plugin issue is open for almost 10 years and I run into it -.- https://issues.apache.org/jira/browse/MSHADE-198
I mean, they set the packaging to pom?
or, hm
I mean, it makes sense why it fails, I guess, kinda
yes, you can't really set a parent pom to jar xD
it generates a jar file with a .pom ending which is insane
close enough
> 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\`
by any remote chance in hell
did you run that inside of the checked out sources for hikaricp?
I had never heard of hikaricp before today
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
When you say "how I'm publishing it" do you mean the way I'm installing it in the local maven repo?
Where is metadata for a project normally stored in a jar? Is it something I could manually add if it's missing? I also tried installing a previous version of the plugin and it picked up the same metadata.
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
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.
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
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
apply the java or java-library plugin for the subprojects
oh that fixed the issue, thanks
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
message.txt by @scenic cargo: https://pastes.dev/eqfgRjIvMc
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)
yes
The file size remains unchanged even after including the 'provided' scope. Any ideas why?
did you do a clean package?
Yep
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
It's 1744 kbs in kotlin and 20 kbs ish in java
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)
That'll decrease the size of my .jar, right?
And how can I do that, are there any docs?
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
theres a bit of docs here for the library loader: https://docs.papermc.io/paper/dev/plugin-yml#libraries
What if I shift to gradle or java?
That wouldn't matter, the resulting JAR size would be the same.
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
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.
message.txt by @oak copper: https://pastes.dev/eHi2JLLMsh
I've reverted to Java, and now the JAR file size is down to 16 KB. Unfortunately, I couldn't resolve the problem with the Kotlin standard library. If you have any further suggestions for a solution, please share.
Cat and Malfrador's suggestions were correct, don't shade the Kotlin standard library, but define it as a library in your plugin.yml.
“the problem”?
Oh
The JAR size gets bigger when shading the Kotlin standard library.
I've added it like this:
I haven't worked with the libraries section or Kotlin before, but that looks reasonable.
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>
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?
last I knew you can attach a folder
Meaning a folder on my local machine?
yes
I will give it a try
IT WORKED
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?
why is it a dumb feature?
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
I'll see if I can open some kind of ticket but these devs haven't been particularly receptive to feedback in the past.
Thanks!
okay @static urchin, thats the core build.gradle.kts where it builds successfully: https://just-paste.it/6pOfIqNM77
thats the project where it depends from the Core and fails: https://just-paste.it/AF1m9q6S0O
......
id("io.papermc.paperweight.userdev") version "1.5.5" ...........................................
I literally asked you this
and you said 1.5.11
no, Im sorry - thats on my machine. on the other one its the right version, just didn't updated my project yet:
how do i exclude kotlin in gradle?
legit nothing working
my build.gradle.kts
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
tried that
tried:
shadowJar {
exclude("org.jetbrains.kotlin")
}```
and
```kts
withType<ShadowJar> {
dependencies {
exclude { it.moduleGroup == "org.jetbrains.kotlin" }
}
}```
neither worked
you'd need to check your dependencies
might be that one of them is shading it into itself
the only dependency that isn't excluding kotlin is reflections
which is java
everything else is excluded or compileOnly
exclusions are irrelevant if they've shaded it themselves
yes, iirc you can also specify a package space/filter or something
i'm trying to remove kotlin from this project because my core plugin has it and is causing a LinkageError
how would i do this?
kotlin.stdlib.default.dependency=false gradle.properties
also tried that
actually no nvm
didn't work
can't you just relocate lol
tried that and it broke it more
relocating would remap the entire plugin, and then it would fail in terms of interacting with the core plugin
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
well, yea, you have the coroutines stuff in both of the jars
as said, pretty sure you can just eclude like "kotlin.*"
my coroutines is compileOnly doe?
in my child pluginj
have you checked your dependency tree
it's that maestro library
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
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
How I can publish to maven central repository?
ask them
Ask Who?
maven central
sonatype have like some thing somewhere on how to request access to be able to publish there
So what does one has to use now instead of their jira?
So now one has to email them?
it seems so
no tell them you want to register a new namespace. for example io.github.yourname
oh ok
and after that what happens?
do i have to wait for them to give me access of something?
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)
yes
after they allow you to use the namespace you can freely publish new artifacts under that namespace
oh so if for example my github repository is https://github.com/Alejomc26/bossLibrary i would have to request io.github.bosslibrary ?
or io.github.alejomc26.bosslibrary
i mean it really depends on how you want it
in the end a namespace is basically just a domain you own backwards
for example if you own alejomc26.github.io
your namespace would be io.github.alejomc26
but how do i can prove that i own that?
they might ask you to create a github repo with a specific name
oh ok
i am not sure if you acutally need to have anything on the github pages thing for them to allow you to use it
so i tell them that i want to create a namespace named io.github.alejomc26
yup
oh, i didn't know that it had a guide, thanks 😄
Please pull your finger out of your ass for once
20 different ways?
i mean not literally
there is the new web interface
ossrh or whatever
it's a confusing mess
ossrh is dead
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
i think i gotta read through the docs again to figure out what is actually going on lol
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.
yeah idk back when i did it i just created a jira ticket, had that accepted and was able to publish using gradle plugins
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
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
what gradle plugin is recommended to publish to maven central?
paste the log with --stacktrace and --info and send it to modmail
there is multiple ways to do it. i have a template on my github that i usually just use when publishing to maven. someone probably has a better way though. https://github.com/notTamion/PublishToCentralTemplate
isn't that for the ossrh?
🤷♂️ idk works for me
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
is it maybe just pulling it from your local repo instead?
i have mavenLocal disabled @main mica
Is using jitpack a bad practice?
it's a crappy solution for a crappy issue
what’s wrong with jitpack?
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
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
it's free for OSS projects but also generally dumb
github or jitpack
github
what’s wrong with that
i personally like it since i don’t have to setup nexus or something else
Because last I knew you have to basically use a token to consume from it
No
unless you’re just using a firewall
I mean, for private stuff, it requiring a token makes sense, that's like, how security works
oh you’re complaining about token use for public
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
Pretty sure it always required one
I mean, I'd generally suggest people look towards maven central if they wanna deploy their libraries
didn’t need a token to pull from this repo but it was 3 years ago
is it hard to get on maven central
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
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
it works for me /shrug. Are you able to go to https://api.papermc.io ?
Yeah
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
It is not in offline mode, It takes a second or two to display the unknown version
If on Offline mode it is instant
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
outside of some wider configuration issue, it's generally hard to say, especially if the exception is supressed
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?
are you running the stuff in WSL or something maybe?
without the exception I have no idea
you could try running gradle --stop or whatever it was
Why though? The daemon is killed when the version is not found
i always had issues with velocity 3.3.0
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)
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
How can I update the version of gradle?
But if I don't shade into the jar, is there another way I can access it externally? (ie another plugin)
either by changing the version in gradle/wrapper/whateverfile
or ./gradlew wrapper --gradle-version iirc
Gradle version comes with the jdk?
no
I dont remember installing it
Is there a way to run ./gradlew rebuildPatches only for Paper-API?
see ./gradlew tasks
rebuildApiPatches
there was a command for, ^
for java 21 should i get gradle 8.4 or 8.5?
no real reason (usually) to stay on old versions
isn't gradle 8.7 for java 22?
you can use it with java 22
you can still run it with whatever java version you want
java is generally backwards compatible
just use the latest gradle version
there's generally 0 reason to stay on a specific version
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
the jar is too large probably for the webserver
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
This is my current setup https://paste.helpch.at/pulujujawa.bash
if I want to add a library should i use implementation or compileOnly?
do you want it to be shaded
if yes, use api or implementation
if no, use compileOnly
what are the benefits of it being shaded?
it's in the jar
?
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?
That is generally down to things like environmental differences
i.e. unexpected java versions
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.
can someone help i dunno why its not copy and pasting the directory
message.txt by @violet mortar: https://pastes.dev/YYRMxFlYUR
you did run the copy task?
Do you have any solution that i can test ? 🙏
There is no general magical solution, generally need to work out why the patch failed
make sure that you're using java 17
Nothing change since friday, i'm using java 17
Don't know what is the problem
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
Delete the paperweight folder helped me, thank you 👍
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
they're not inherited
they apply to that project and its output
chances are you're consuming that project wrong
Yeah I think so, because it is relocated when I add that relocate usage to my plugin instead of library
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")
}
}
How are you consuming that
Wdym by consuming?
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
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
you should relocate the whole of configurate not just yaml
Okay, but it is probably not actually reading the shadow jar from your subproject
True, but when I do it in the plugin it's relocated correctly, so that's not the main issue I think
but, my eye hurts, I'm not going to interrigate you over your configuration
Oh, yeah not sure how I would set that up tbh
Lol yeah it aint pretty
I have keratoconus
you need to override what configuration it's pulling
i get the following error when loading my plugin that depends on an nms module
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
what jar are you using
it's not reobf'd at all
will any libs be shaded into it?
well
i use -all for the bukkit module
for the nms module i use default classifier
and, basically, for your thing using the nms module, you want to grab the reobf config
idk enough about gradle for that, i just switched to gradle from maven like a month or two ago
Oh wait ofc it won't relocate it if I use implements. It wouldn't run the shadowjar task in my library would it?
so would i also want to add userdev to my plugin that is shading the nms module?
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
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
so, those are 2 modules within the same project?
yep
why are you not using project()
i misunderstood your question actually
"recon" is a separate project from "arena"
would "dev-all" be the reobf'ed version
No
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
although once ive fixed that issue i still need to deal with the default jar not being published
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
epictastic thanks
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
Do you have it specifically set somewhere maybe?
Maybe it’s something with the cache
Fixed ^^^^
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?
you don't need to build paper or paperweight
is there a maven repository that publishes velocity proxy module
no
unofficial
No.
why
There just isn't.
is it bad practice to depend on the proxy module
yes
but many plugins do it
that doesn't change the fact that it's bad practice
I also don't think it's that many
there might be a better way to do what you are trying to achieve
well i wanted to try to make a proxy-level anticheat but let's move this to #velocity-dev now
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
Basically that, ye
Don't mind that being part of sculptor actually, as long as it's configurable
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
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
that doesnt look too bad
and no, its sitll a mache block, didnt bother renaming the extension and the task group and stuff
👍
https://github.com/PaperMC/sculptor/blob/9e10ccb8bebb2067b0e5391fb1597636c3a4b769/sculptor-shared/build.gradle.kts#L26
the description for sculptor shared seems copied from root, im guessing thats a mistake?
do you have continuation indent set to 4? idea's formatter wants to add 8 spaces in the multiline dataclasses, which doesnt look right
hmm thats odd
in mache i guess a verson catalog might be useful to keep the mache version in sync between root, and all the versions
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
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
Dont think I am following
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
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
I'll take a look tomorrow
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
Ye, diffpatch doesnt like those
i guess somewhere git binary patch support needs to be added then?
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
Diffpatches ignore pattern functionality is kinda meh
Since the ignore filter is prefix based, I don't think there is a way of doing it without fully ignoring assetS/texture
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.
Windows?
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
@inland snow
did you put stuff in your gradle.propertied
this is my gradle.properties paperVersion=1.19-1.20.2
the api key is in the user gradle.properties
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)
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
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 :)
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
I think I previously assumed differently, as it was slightly more user facing (download and compare multiple versions with this gradle task)
Theres a level of "it's handy for looking at stuff", but, it's designed to produce a starter point for other things
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?)
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
That sounds perfect,
I'll try and keep an eye on it so I can maybe hack client jar support into that one too
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
I want to remove it entirely from configurate though, as I need to relocate it, which didn't work for some reason
read the page
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
Oh I need to separate it into group and module? https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html#sec:excluding-transitive-deps
Didnt change anything
Yeah
you did define it properly?
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
we’ll figure out who’s pulling that one in
How? Not sure where to find that information
It's just this
that just screams like a malformatted message
On my side or Configurate? Which provides the geantyref library
whoever that message is from
also, no idea why you set it to module, it should be artifact last I knew
The message is from configurate
That's what it said on the gradle site
oh, that's the example on that page, no idea
what’s the actual problem
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
send the full class and error
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);
}
I mean, so theres no registered serialiser for TypeToken
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
it already is shaded
or, at the very least, already available
working across jars could potentially create some weird issues, but, idk
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:?]
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);
}
Important part in AbstractConfigurationWrapper is the setLocalReference method I believe
as to the parenthesized question, the answer is likely not, paperweight is not a generic tool like mache, it's very specific to paper
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")
why are you relocating your own thing
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
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"
}
well it’s not magically getting relocated
From api("com.summitrealms:configurate-yaml:4.2.0-SNAPSHOT")
Would that somehow move it to summitlibs?
is the project on github
I mean, why are you forking it in the first place
It's a fork of configurate that adds comment support
relocate relocated files not dependencies
probably doesn’t make sense
did you rename the packages in your fork
Yeah I renamed the packages in the fork, because a configurate dev or support member told me that was the solution lol
they were neither
Oh
Ah community dev, but yeah
Wanted to see the repositories? Would be a huge help
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....
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
show your full build script
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
also (obviously?) it'll be under xxx.xxx.xxx.dejvokep in the jar
so i have to change all my import statements?
No
the entire point of relocate is that it adjusts all that stuff after the jar is packaged
yeah thats what i thought
https://paste.gg/p/anonymous/e3a817d2ef6647b69a7a15e1c1e84737
afaik its the default build script that mc development plugin generates but i pasted in the shadow stuff
you'r enot actually adding the boostedyaml dependency anywhere
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)
whats the error
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
yop
all are lowercase, should be fine
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
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?
@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
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
you can just run without an asset index it seems 😄
yeah i sorta thought of that (my most recent comment before your review on github), i just wanted others thoughts
then you miss sounds iirc, which depending on what you want to test might be a pain
but yeah
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
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
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
ive just resolved the conflict and pushed my changes
@granite valve so if client doesnt include everything, do you think stuff should stay as is?
I want to confirm that to be sure, but if so, then I think we want a BOTH enum right? so it includes everything?
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
yeah I guess we would want to keep using the bundle for consistency between sculptor and paperweight
I'm 99% sure everything in server is in client, it's just client that has unique classes.
I was messing about with neoforges fork of snowblower, which generates the merged vanilla sources between the client and the server.
at the time I greped for the server only annotation and found it wasn't used
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
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?
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
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
[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
BuildTools is Spigot, not Paper?
For Paper you’ll want to use paperweight. We don’t support buildtools/ spigot.
How I run dat shit on maven
Lmk
So polite, wow
My bad gang
You don't.
See this why I use spigot
It’s gradle. We don’t have a maven version of paperweight.
We use gradle for our tooling.
Fawk luh twin
So I can’t use it on my maven plugins
How was I being rude?????
I was showing u respect
You could, you’d just have to do it yourself.
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
@granite valve does this commit assume that versions in order are based (or are most similar too) the previous version?
that isnt always the case, like for april fools snapshots (which was based on 24w12a, even though 24w13a was already released iirc)
(its still better than using the latest version tho, i agree)
Ive thought about this. Not sure how to handle this except by manually putting versions into “tracks” that say which version comes after which in terms of the codebase
The order is just based on the order the versions appear on the manifest
i dont think any metadata includes the previous version it was based on, so the matching needs to be manual :/
(mojang feature request maybe?)
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
#paper-dev message
Can someone help me? Im trying to publish a jar to github packages
share buildscript
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
gimme a min
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
L74 looks suspicious
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
you need to make it consume the output from the reobfJar task if you want to publish the reobfjar
tasks.named("publish") {
dependsOn("reobfJar")
}
like this?
read this one too https://docs.gradle.org/current/userguide/lazy_configuration.html
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
because both runclient and runserver are setup for the same "run/" directory, i think some of the files will get confusing

