-
Notifications
You must be signed in to change notification settings - Fork 0
Building from Source
git clone https://github.com/yannicksuc/CrazyPhone.git
cd CrazyPhoneThis is a Stonecutter multi-version project: every target listed in
Architecture § Platform support is its own Gradle subproject under
versions/. Prefix every task with its target name:
# Windows
gradlew.bat :1.21.1:build
gradlew.bat :1.21.1:runClient
gradlew.bat :1.21.1-fabric:build
gradlew.bat :1.21.1-fabric:runClient
# Linux / macOS
./gradlew :1.21.1:build
./gradlew :1.21.1:runClient
./gradlew :1.21.1-fabric:build
./gradlew :1.21.1-fabric:runClientSwap 1.21.1 for 1.20.4 or 1.21.10 (NeoForge), or 1.21.1-fabric for 1.20.1-fabric (Fabric).
Useful task variants, same :<target>: prefix pattern:
| Task | What it does |
|---|---|
:<target>:build |
Compile and produce the mod jar |
:<target>:runClient |
Launch a dev client with the mod loaded |
:<target>:runServer |
Launch a dev dedicated server with the mod loaded |
:<target>:test |
Run the test suite (NeoForge only - boots a real, headless game instance so tests can use registries/data components) |
One shared src/main/java tree is preprocessed per target by Stonecutter comment directives -
//? if fabric { ... }, //? if neoforge { ... }, //? if >=1.20.5 { ... } (and combinations) - rather
than separate source sets or an abstraction layer. Most files are identical on every target; only the
files that genuinely differ (registries, networking, attachments, a handful of NeoForge/Fabric API
divergences) carry any gating. See Architecture § Project structure for
the full directory layout.
Two separate Gradle build scripts back the two loader families:
-
build.gradle.kts- default script, used by every NeoForge subproject. -
build.fabric.gradle.kts- used by the two-fabricsubprojects (Fabric Loom).
Both share stonecutter.gradle.kts, which wires up the preprocessor and lists every target/version pin.