Gradle plugin for remapping mojang-mapped artifact to spigot-mapped
Uses SpecialSource for remapping.
For those seeking for nms & stable remapper, try using userdev
from PaperMC/paperweight project.
I will not (can not) provide any additional help for additional non-spigot features (incl. support for specific spigot fork)
There could be some methods that do not remap properly, so it is required to find some workarounds for those methods.
Using the plugins DSL:
plugins {
id("io.github.patrick.remapper") version "1.4.2"
}
Using legacy plugin application:
Using the plugins DSL:
plugins {
id "io.github.patrick.remapper" version "1.4.2"
}
Using legacy plugin application:
--remapped
option.remap
task to the project.remap
task. Advanced configuration option is available in the below section.
tasks {
remap {
version.set("1.20.5")
}
}
remap
task to remap mojang-mapped jar artifact to spigot-mapped.tasks {
remap {
// Required
// Specify minecraft (spigot) version of your project.
// TODO: Auto-detect library version by default
version.set("1.20.5")
// Use this option to change remapping action.
// Defaults to `RemapTask.Action.MOJANG_TO_SPIGOT`.
action.set(RemapTask.Action.MOJANG_TO_SPIGOT)
// If this option is set to true, the entire task would be skipped.
skip.set(true)
// Use this option to explicitly set the input task.
// Defaults to `jar` task.
inputTask.set(jar)
// If this option is used, instead of overwriting an existing artifact,
// the remap output would be available at file named as `archiveName`.
// Note that `archiveName` has higher priority over `archiveClassifier`.
archiveName.set("${project.name}-${project.version}-remapped.jar")
// If this option is used, instead of overwriting an existing artifact,
// the remap output would be available at "${archiveBaseName}-${archiveVersion}-${archiveClassifier}.jar"
// Note that `archiveName` has higher priority over `archiveClassifier`.
archiveClassifier.set("remapped")
// Use this option to set output directory of remapped archive file.
// Defaults to output directory of input task.
archiveDirectory.set(File(projectDir, "output"))
}
}
All contributions are welcome!
If you encounter any problems, or have suggestions, please leave an issue!
Contact me at