How shayf0x/spigotwarden works
Spigot Warden is a Gradle plugin that turns a plugin JAR built against Spigot’s remapped Mojang names into a JAR readable by a Spigot server. A project configures the target Minecraft version and output directory; Gradle’s setup task obtains SpecialSource and checks for BuildTools artifacts, generating them when absent. The remap task depends on setup and the ordinary JAR task, then runs SpecialSource in two mapping passes and writes the compatible JAR. The README also documents adding the remapped Spigot dependency. The task wiring and remapping implementation are sampled; the documented dependency setup is not implemented in the sampled plugin code.
Main entry points: SpigotWarden.java Plugin Entry Point · Manager.java Artifact Manager · RemapJar.java Remap JAR Task · Setup.java Setup Task
Components 16
Plugin Setup
- Plugin Entry Point
src/main/java/io/github/shayf0x/spigotwarden/SpigotWarden.java - Version and Output
src/main/java/io/github/shayf0x/spigotwarden/SpigotWardenExtension.java
Prerequisite Artifacts
- Setup Task
src/main/java/io/github/shayf0x/spigotwarden/tasks/Setup.java - BuildTools Task
src/main/java/io/github/shayf0x/spigotwarden/tasks/BuildTools.java - Artifact Manager
src/main/java/io/github/shayf0x/spigotwarden/Manager.java - Artifact Paths
src/main/java/io/github/shayf0x/spigotwarden/PathBank.java
JAR Remapping
- Remap JAR Task
src/main/java/io/github/shayf0x/spigotwarden/tasks/RemapJar.java - Gradle JAR Task
src/main/java/io/github/shayf0x/spigotwarden/SpigotWarden.java - SpecialSource Process
src/main/java/io/github/shayf0x/spigotwarden/tasks/RemapJar.java - Compatible Plugin JAR
External Dependencies
- SpecialSource JAR
- BuildTools Download
- Local Maven Artifacts
- Remapped Spigot Library
Other components
- Plugin Developer
- Gradle Project
Connections 25
- Plugin Developer → Version and Output: configures
- Plugin Developer → Gradle Project: runs tasks
- Gradle Project → Plugin Entry Point: applies plugin
- Plugin Entry Point → Version and Output: creates extension
- Plugin Entry Point → Setup Task: registers task
- Plugin Entry Point → BuildTools Task: registers task
- Plugin Entry Point → Remap JAR Task: registers task
- Plugin Entry Point → Gradle JAR Task: configures output
- Gradle Project → Setup Task: runs setup
- Gradle Project → BuildTools Task: runs buildTools
- Gradle Project → Remap JAR Task: runs remapJar
- Setup Task → Remap JAR Task: required before
- Remap JAR Task → Gradle JAR Task: depends on
- Setup Task → Artifact Manager: checks and installs
- BuildTools Task → Artifact Manager: requests generation
- Artifact Manager → SpecialSource JAR: downloads if absent
- Artifact Manager → BuildTools Download: downloads BuildTools
- Artifact Manager → Artifact Paths: checks artifact paths
- Local Maven Artifacts → Artifact Paths: stores mapped artifacts
- Remap JAR Task → Artifact Manager: checks SpecialSource
- Remap JAR Task → SpecialSource Process: runs two mapping passes
- SpecialSource Process → Local Maven Artifacts: reads mapping inputs
- SpecialSource Process → Gradle JAR Task: reads built JAR
- SpecialSource Process → Compatible Plugin JAR: writes remapped JAR
- Plugin Developer → Remapped Spigot Library: adds dependency