mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-16 17:25:09 +01:00
- This will allow us to build the library for different Minecraft versions at the same time - Right now, only Fabric and Neoforge 1.21.10 are fully working - As a bonus, the jar is now even smaller!
54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
plugins {
|
|
id("dev.kikugie.stonecutter")
|
|
id("dev.architectury.loom") version "1.11-SNAPSHOT" apply false
|
|
id("architectury-plugin") version "3.4-SNAPSHOT" apply false
|
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
|
id("me.modmuss50.mod-publish-plugin") version "0.8.4" apply false
|
|
}
|
|
stonecutter active "1.21.10-fabric" /* [SC] DO NOT EDIT */
|
|
|
|
// Builds every version into `build/libs/{mod.version}/{loader}`
|
|
//stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
|
|
// group = "project"
|
|
// ofTask("buildAndCollect")
|
|
//}
|
|
//stonecutter registerChiseled tasks.register("chiseledPublishMods", stonecutter.chiseled) {
|
|
// group = "project"
|
|
// ofTask("publishMods")
|
|
//}
|
|
//stonecutter registerChiseled tasks.register("chiseledRunAllClients", stonecutter.chiseled) {
|
|
// group = "project"
|
|
// ofTask("runClient")
|
|
//}
|
|
|
|
|
|
|
|
// Builds loader-specific versions into `build/libs/{mod.version}/{loader}`
|
|
//for (it in stonecutter.tree.branches) {
|
|
// if (it.id.isEmpty()) continue
|
|
// val loader = it.id.upperCaseFirst()
|
|
// stonecutter registerChiseled tasks.register("chiseledBuild$loader", stonecutter.chiseled) {
|
|
// group = "project"
|
|
// versions { branch, _ -> branch == it.id }
|
|
// ofTask("buildAndCollect")
|
|
// }
|
|
//}
|
|
|
|
// Runs active versions for each loader
|
|
for (it in stonecutter.tree.nodes) {
|
|
if (it.metadata != stonecutter.current || it.branch.id.isEmpty()) continue
|
|
val types = listOf("Client", "Server")
|
|
val loader = it.branch.id.upperCaseFirst()
|
|
// for (type in types) it.tasks.register("runActive$type$loader") {
|
|
// group = "project"
|
|
// dependsOn("run$type")
|
|
// }
|
|
}
|
|
|
|
// See https://stonecutter.kikugie.dev/wiki/config/params
|
|
stonecutter parameters {
|
|
swaps["mod_version"] = "\"" + property("mod.version") + "\";"
|
|
swaps["minecraft"] = "\"" + node.metadata.version + "\";"
|
|
constants["release"] = property("mod.id") != "template"
|
|
dependencies["fapi"] = node.project.property("deps.fabric_version") as String
|
|
} |