Repository navigation
Expand file tree
/
Copy pathstonecutter.gradle.kts
More file actions
48 lines (41 loc) · 1.88 KB
/
Copy pathstonecutter.gradle.kts
File metadata and controls
48 lines (41 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@file:OptIn(dev.kikugie.stonecutter.StonecutterExperimentalAPI::class)
plugins {
alias(libs.plugins.stonecutter)
alias(libs.plugins.loom.back.compat).apply(false)
alias(libs.plugins.architectury.loom).apply(false)
alias(libs.plugins.neoforged.moddev).apply(false)
alias(libs.plugins.jsonlang.postprocess).apply(false)
alias(libs.plugins.mod.publish.plugin).apply(false)
alias(libs.plugins.kotlin.jvm).apply(false)
alias(libs.plugins.devtools.ksp).apply(false)
alias(libs.plugins.fletching.table).apply(false)
alias(libs.plugins.legacyforge.moddev).apply(false)
}
stonecutter active file(".sc_active_version")
tasks.register("runActiveClient") {
group = "stonecutter"
description = "Run client of the active Stonecutter version"
dependsOn(stonecutter.current!!.project + ":runClient")
}
tasks.register("runActiveServer") {
group = "stonecutter"
description = "Run server of the active Stonecutter version"
dependsOn(stonecutter.current!!.project + ":runServer")
}
stonecutter parameters {
constants.match(current.project.substringAfterLast('-'), "fabric", "neoforge", "forge")
swaps["mod_version"] = "\"${properties.get<String>("mod.version")}\";"
swaps["mod_id"] = "\"${properties.get<String>("mod.id")}\";"
swaps["mod_name"] = "\"${properties.get<String>("mod.name")}\";"
swaps["mod_group"] = "\"${properties.get<String>("mod.group")}\";"
swaps["minecraft"] = "\"${current.version}\";"
constants["release"] = properties.get<String>("mod.id") != "modtemplate"
}
for (version in stonecutter.versions.map { it.version }.distinct()) tasks.register("publish$version") {
group = "publishing"
dependsOn(stonecutter.tasks.named("publishMods") { metadata.version == version })
}
for (version in stonecutter.versions.map { it.version }.distinct()) tasks.register("buildAndCollect$version") {
group = "build"
dependsOn(stonecutter.tasks.named("buildAndCollect") { metadata.version == version })
}