Skip to main content

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​

  1. Applies Gradle's idea plugin to rootProject (required by Cloche).
  2. Applies earth.terrarium.cloche (0.19.13) and com.gradleup.shadow (9.6.1).
  3. Registers Cloche's standard Maven repositories (librariesMinecraft(), main(), mavenFabric(), mavenNeoforgedMeta(), mavenNeoforged()) followed by mavenCentral().
  4. Creates the graft { ... } extension and syncs graft.modId into cloche.metadata.modId.
  5. Disables Cloche's generated fabric.mod.json / neoforge.mods.toml tasks (configurable via staticMetadata = false) and disables the unused default :shadowJar task (configurable via disableDefaultShadowJar = false) so from(components["java"]) stays clean.
  6. Hooks Cloche's AccessWiden and MergeAccessWideners tasks with Fabric's native net.fabricmc:class-tweaker (configurable via interfaceInjection = false).

Next: learn how Graft structures source sets and versions in Project Layout.