/shuttle

A gradle plugin managing dependencies syncing to fabric.mod.json

Primary LanguageKotlin

🧵 shuttle

shuttle is a gradle plugin for generating mod dependencies to write fabric.mod.json from gradle dependency settings.

Features

  • Auto generate fabric.mod.json from gradle dependencies
  • Specify suggests or recommends or ignore dependencies

Installation

Kotlin DSL
plugins {
    id("fabric-loom") version "1.7-SNAPSHOT"
    id("net.turtton.shuttle") version "VERSION" // Add
}
Groovy DSL
plugins {
    id 'fabric-loom' version '1.7-SNAPSHOT'
    id 'net.turtton.shuttle' version 'VERSION'// Add
}

Example

build.gradle.kts

dependencies {
    ...
    modImplementation("net.fabricmc:fabric-language-kotlin:1.11.0+kotlin.2.0.0")
    modApi("me.shedaniel.cloth:cloth-config-fabric:15.0.127") {
        exclude(group = "net.fabricmc.fabric-api")
    }
    modImplementation(include("dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric"))
    modCompileOnly("com.terraformersmc:modmenu:11.0.1")
}

build/libs/XXX-1.0.0.jar/fabric.mod.json

{
  ...
  "depends": {
    ...
    "fabric-language-kotlin": "1.11.0+kotlin.2.0.0",
    "cloth-config": "15.0.127"
  }
, // This is not bug
  "recommends": {
    "modmenu": "11.0.1"
  }
}