Installation
Requirements
- Gradle 9.0+ (recommended: Gradle 9.x matching Terrarium Cloche
0.19.13). - Java 21+ to run the Gradle daemon (Minecraft
26.1+targets compile with Java 25).
The latest release of Cloche Graft is 0.1.0.
Plugin repositories
Add the Redlance and Cloche plugin repositories in your settings.gradle.kts (or settings.gradle):
settings.gradle.kts
pluginManagement {
repositories {
maven("https://repo.redlance.org/public")
maven("https://maven.msrandom.net/repository/cloche")
maven("https://maven.msrandom.net/repository/root")
maven("https://maven.fabricmc.net/")
gradlePluginPortal()
mavenCentral()
}
}
settings.gradle
pluginManagement {
repositories {
maven { url = uri("https://repo.redlance.org/public") }
maven { url = uri("https://maven.msrandom.net/repository/cloche") }
maven { url = uri("https://maven.msrandom.net/repository/root") }
maven { url = uri("https://maven.fabricmc.net/") }
gradlePluginPortal()
mavenCentral()
}
}
Applying the plugin
Apply org.redlance.graft to your Minecraft module's build.gradle.kts / build.gradle (you do not need to apply earth.terrarium.cloche, com.gradleup.shadow, or idea separately — Graft applies and wires them automatically):
build.gradle.kts
plugins {
id("org.redlance.graft") version "0.1.0"
}
Or in a multi-project build, declare the version once in the root build.gradle with apply false:
build.gradle (root)
plugins {
id "org.redlance.graft" version "0.1.0" apply false
}
minecraft/build.gradle
plugins {
id "org.redlance.graft"
}
What applying org.redlance.graft does automatically
- Applies Gradle's
ideaplugin torootProject(required by Cloche). - Applies
earth.terrarium.cloche(0.19.13) andcom.gradleup.shadow(9.6.1). - Registers Cloche's standard Maven repositories (
librariesMinecraft(),main(),mavenFabric(),mavenNeoforgedMeta(),mavenNeoforged()) followed bymavenCentral(). - Creates the
graft { ... }extension and syncsgraft.modIdintocloche.metadata.modId. - Disables Cloche's generated
fabric.mod.json/neoforge.mods.tomltasks (configurable viastaticMetadata = false) and disables the unused default:shadowJartask (configurable viadisableDefaultShadowJar = false) sofrom(components["java"])stays clean. - Hooks Cloche's
AccessWidenandMergeAccessWidenerstasks with Fabric's nativenet.fabricmc:class-tweaker(configurable viainterfaceInjection = false).
Next: learn how Graft structures source sets and versions in Project Layout.