Skip to content

Building from Source

unknown edited this page Nov 14, 2026 · 1 revision

🏗️ Building from Source

Requirements

  • JDK 25. Gradle itself runs on Java 25 (gradle/gradle-daemon-jvm.properties), because Fabric Loom needs it. With an older Java on the machine, Gradle downloads a Java 25 for itself (foojay toolchain resolver).
  • Git.
  • Internet access for the first build (Paper, Fabric, NeoForge, Minecraft and the libraries are downloaded).

Build

git clone https://github.com/KAIKOAUGUSTIN/ManhuntStar.git
cd ManhuntStar
./gradlew build

The jars end up in build/libs/ at the root:

Jar What
ManhuntStar-<version>.jar The Paper plugin (one jar for every supported Paper version)
ManhuntStar-fabric-<version>+<minecraft>.jar The Fabric mod, one per Minecraft version
ManhuntStar-neoforge-<version>+<minecraft>.jar The NeoForge mod, one per Minecraft version

The Minecraft versions the mods are built for are minecraftVersions in gradle.properties.

build also runs the tests and compileAgainstLatest, which compiles the plugin against the newest supported Paper API to catch anything it removed or changed.

Useful tasks

Task What it does
./gradlew build Everything: compile, test, jars.
./gradlew test Only the tests.
./gradlew :core:test The core's tests.
./gradlew :paper:shadowJar Only the Paper plugin jar.
./gradlew :fabric:26.3:build Only the Fabric mod for 26.3.
./gradlew :neoforge:26.2:build Only the NeoForge mod for 26.2.
./gradlew :fabric:26.3:runServer A Fabric dev server in fabric/versions/26.3/run/server.
./gradlew :neoforge:26.3:runServer A NeoForge dev server in neoforge/versions/26.3/run/server.
./gradlew clean Removes the builds, including build/libs/.

For the plugin, put build/libs/ManhuntStar-<version>.jar in a Paper 26.2/26.3 test server's plugins/ folder.

Statistics in your own builds

The FastStats project token isn't in the repository. It's put into the jars at build time from the FASTSTATS_TOKEN environment variable or -PfaststatsToken=.... Without it (forks, pull requests, local builds) the jars send no statistics and no error reports. The build fails if a token is given but isn't 32 lowercase letters and digits.

Versions

  • The ManhuntStar version is version in gradle.properties. The release workflow bumps it on every merge into main: don't change it by hand.
  • Dependency versions are in gradle/libs.versions.toml, kept up to date by Dependabot. The oldest supported Paper (paper-api-min) and everything tied to a Minecraft version (mc<version>-...) are updated by hand, on purpose.

Adding a Minecraft version to the mods

  1. Add it to minecraftVersions in gradle.properties.
  2. Add its mc<version>-neoform, mc<version>-fabric-api, mc<version>-neoforge and mc<version>-adventure-platform-mod to gradle/libs.versions.toml.
  3. Put what changed in that Minecraft version in mod-common/versions/<version>/src/main/java/ (for example MinecraftCompat.java).

See Architecture for how the modules fit together.

Clone this wiki locally