Dev Server & Smoke
build-logic gives you two levels of runtime verification: a dev server for
iterating locally, and a compatibility smoke test that boots a real server
per Minecraft version and gates on the runtime diagnostics verdict.
Dev Servers
Opt into a run task from a consumer module with devServer { } (see
Using It In A Mod). Once enabled, the platform run task
is available:
| Task | Runs |
|---|---|
runPaper | A Paper dev server with your plugin. |
runFolia | A Folia dev server with your plugin. |
runFabric | A Fabric dev server with your mod. |
runVelocity | A Velocity proxy with your plugin. |
The server versions default from the active target, so runFabric -Ptarget=mc262
boots the Minecraft version that target declares. motd, port, online-mode,
folia, and Modrinth test dependencies come from the devServer { } block.
Compatibility Smoke
The smoke test is the release gate. For each declared entry it launches the
standalone MagicUtils bundle on a real server, waits for the success line, then
runs the diagnostics export command and checks the verdict. It is declared in
magicMatrix { smoke { } }:
Per-platform smoke options:
| Option | Default | Purpose |
|---|---|---|
runTask | — | Gradle task that boots the server. |
successPattern | Done ( | Log line that marks a successful boot. |
timeoutSeconds | 300 | Max time to wait for the boot line. |
diagnosticsRequired | true | Run diagnostics after boot and gate on it. |
diagnosticsCommand | magicutils diagnostics export | Command executed in the server console. |
diagnosticsTimeoutSeconds | 60 | Max time to wait for the diagnostics result. |
diagnosticsFailOnWarn | false | Treat diagnostic warnings as failures. |
Each entry(id) { } declares the Minecraft versions to launch and the
smokeValues used for the gate; target, primary, and gradleProperties fine-tune
which build target and flags a run uses.
Folia smoke
Folia is a Paper fork with regionised multithreading. It is not a separate
published artifact — folia is just one of the bukkit bundle's Modrinth
loaders — but a plugin must be Folia-aware to actually run on it. So the smoke
matrix declares a folia platform that boots the same bukkit-bundle jar
on a real Folia server via runFolia, backing the folia loader claim with an
actual boot + diagnostics check:
Two details are Folia-specific:
- Folia needs Java 21+, so only the 1.21+/26.x targets are smoked.
- Folia does not publish a build for every patch, so the
smokeValueis a Folia-available version launched on the bundle jar built for a nearby patch (the jar built for+1.21.10runs fine on a 1.21.11 Folia server). UsesmokeGradlePropertiesto pinrunMinecraftVersionto the available patch.
The Modrinth artifact generator skips this platform (there is no folia-bundle
module); it is smoke-only.
Running The Smoke
Server logs are written under build/smoke-logs/. The gate strictness can be
overridden with -Psmoke_gate=, but the default STRICT gate is what makes the
smoke a meaningful release check: a diagnostics failure fails the build.
This is the same two-level model MagicUtils uses for its own releases: unit tests plus a diagnostics-gated server boot per Minecraft version.