Overview of Stonecraft Gradle plugin
build.gradle.kts code to a single line. It provides sensible defaults for modloader dependencies, data generation, the GameTest framework, and the Mod Publish plugin.website·Indexed 32 days ago
https://stonecraft.meza.ggA configuration Gradle plugin designed to eliminate boilerplate in Minecraft mod setup. It provides features for variable substitution in resources, access widening (since version 1.12.0), and wraps Stonecutter for multi-version workflows. The documentation covers modSettings configuration, clientOptions for options.txt, and migration guides for versions such as 1.7.x to 1.8.x.
build.gradle.kts code to a single line. It provides sensible defaults for modloader dependencies, data generation, the GameTest framework, and the Mod Publish plugin.Stonecraft, when used with Stonecutter, creates submodules for every minecraftVersion-loader pairing defined in the versions list. For example, having 4 Minecraft versions and 3 loaders results in 12 submodules.
In Gradle configuration:
rootProject refers to the build.gradle.kts file in the project root.project refers to the version-specific submodules located in the versions folder..agents/skills/stonecraft/SKILL.md and creates necessary parent directories. If the file already exists, the installer will not overwrite it to avoid losing project-specific edits unless the force flag is used.# Standard installation
./gradlew installStonecraftSkill
# Force overwrite existing skill file
./gradlew installStonecraftSkill --force-overwriteStonecutter 0.7 deprecated the vers() function used in settings.gradle[.kts] to declare project versions. Replace all instances of vers(...) with version(...).
Warning: Ensure you use the singular version() function. The versions() function performs a different operation and is not a replacement for vers().
// Change from:
fun mc(version: String, vararg loaders: String) {
for (it in loaders) vers("$version-$it", version)
}
// To:
fun mc(version: String, vararg loaders: String) {
for (it in loaders) version("$version-$it", version)
}Stonecraft hooks into the ProcessResources task to replace placeholders in resource files with values defined in the build.gradle[.kts] file. Variable substitution is automatically applied to all .json, .toml, and .mcmeta files in the resources directory.
Exception: Language files within the assets folder are excluded from this process because Minecraft's own translation system is incompatible with Gradle's variable substitution.
{
"schemaVersion": 1,
"id": "${id}",
"version": "${version}",
"name": "${name}",
"description": "${description}",
"entrypoints": {
"main": [
"${group}.${id}.ExampleMod"
]
},
"depends": {
"fabricloader": "*",
"fabric-api": ">=${fabricVersion}",
"minecraft": ">=${minecraftVersion}"
}
}build.gradle.kts file. To ensure your custom settings take effect, place them after the modSettings {} block. The recommended order of operations is: plugins, modSettings, repositories, dependencies, Architectury settings (fabricApi, loom), task overrides, and finally mod publishing.plugins {
id("gg.meza.stonecraft")
}
modSettings {}
repositories {}
dependencies {}
// Architectury related settings
fabricApi {}
loom {}
// Task overrides
tasks.processResources {}
// Mod publishing
publishMods {}