#Mapping problem with SpecialSource (using gradle and spigot 1.18.1)
1 messages · Page 1 of 1 (latest)
How are you remapping it
Probably is an issue with the gradlesource plugin then. I can send you the way that I remap with gradle if you'd like? It's quite a bit longer though since it's not a plugin.
note : already did this btw : (using SpecialSource directly) #help-development message
(bringing back the old messages)
Ah, yeah you're probably missing something. Hang on let me check.
Why are you using SpecialSource 1.10
Try 1.11.0 and see if that works.
i used both 1.10 and 1.11 same thing
yes
Ah, found the issue then. It's really dumb. Lol
and as stated in my message i've already replaced the vars
Replace the : before $HOME with ;
oh rly
Yep. In Linux, which is what md_5 uses, : is correct. On Windows it requires ;.
(╯°□°)╯︵ ┻━┻
Yeah I ran into the same issue. I facepalmed pretty hard when I noticed lol
why is this a thing since it's arguments given to an app, i mean why does java changes this on windows lol
oh yeah that bad design idea thing x')
kay lemme check the result then now
okay, yeah it's wroking correctly, so this has something to do with the gradle plugin
Yeah most likely
it's annoying there are no official gradle plugins cuse i'm more familiar with gradle than maven
Yeah, I agree. I just made a task to run the commands when I build.
if your method using cli or a custom gradle java task?
yeah that's what i'm trying to avoid
It's using a task that just runs the CLI commands lol
Yeah, it's long but it works
So 🤷♂️
cuse i could make a task that uses directly the methods from the SpecialSource jar using java tasks
I mean if you know how to make gradle plugins you should definitely try lol
I'd use it
actually never made a gradle plugin but java task, i already did one at some point
but at least for now, I would take your task using the cli
if you don't mind
https://github.com/Dessie0/DessieLib/blob/master/build.gradle#L38
This is the task I use
so you're overwriting the built jar with the remapped one like md5 does?
Yep, the initial input file will be the finalized remapped one at the end.
cuse i was keeping the original built jar and renaming the remapped one xxxxx-spigot.jar
yeah just trying to make my habits
cuse yeah at some point i saw this one and was like, dude, that's a lot for so much x')
https://github.com/Shopkeepers/Shopkeepers/blob/master/modules/shared/specialSource.gradle
That's pretty much what mine does lol
well, i can confirm that it is a success
this is what i came up with (note i'm using the shadow plugin, so if not using, replace shadowJar with jar)
task remapJar {
group = 'build'
String home_dir = project.gradle.gradleUserHomeDir.parent
String maven_repo = "${home_dir}/.m2/repository/org/spigotmc/"
String mc_ver = project.mc_version + "-R0.1-SNAPSHOT"
dependencies {
compileOnly "net.md-5:SpecialSource:${project.specialsource_version}:shaded"
}
doLast {
String tooling_path = project.configurations.compileClasspath.find {
it.name.startsWith("SpecialSource-${project.specialsource_version}-shaded")
}
String jar_basename = "${jar.archiveBaseName.get()}-${jar.archiveVersion.get()}"
// remap to obf
exec {
commandLine 'java',
'-cp', "${tooling_path};${maven_repo}/spigot/${mc_ver}/spigot-${mc_ver}-remapped-mojang.jar", 'net.md_5.specialsource.SpecialSource',
'-l', // --live
'-i', "${buildDir}/libs/${shadowJar.archiveFileName.get()}",
'-o', "${buildDir}/libs/${jar_basename}-obf.jar",
'-m', "${maven_repo}/minecraft-server/${mc_ver}/minecraft-server-${mc_ver}-maps-mojang.txt",
'-r', '-q' // --reverse, --quiet
}
// remap to Spigot
exec {
commandLine 'java',
'-cp', "${tooling_path};${maven_repo}/spigot/${mc_ver}/spigot-${mc_ver}-remapped-obf.jar", 'net.md_5.specialsource.SpecialSource',
'-l',
'-i', "${buildDir}/libs/${jar_basename}-obf.jar",
'-o', "${buildDir}/libs/${jar_basename}-spigot.jar",
'-m', "${maven_repo}/minecraft-server/${mc_ver}/minecraft-server-${mc_ver}-maps-spigot.csrg",
'-q'
}
}
}
assemble.dependsOn(remapJar)