aboutsummaryrefslogtreecommitdiff
path: root/stonecutter.gradle.kts
blob: 5d77d3cbede4dc79135d755240aacefaf4a11d83 (plain)
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
plugins {
    id("dev.kikugie.stonecutter")
    id("dev.architectury.loom") version "1.7.+" apply false

    kotlin("jvm") version "1.9.23" apply false

    id("me.modmuss50.mod-publish-plugin") version "0.5.+" apply false
    id("org.ajoberstar.grgit") version "5.0.+" apply false
}
stonecutter active "1.21.2-fabric" /* [SC] DO NOT EDIT */

stonecutter.configureEach {
    val platform = project.property("loom.platform")

    fun String.propDefined() = project.findProperty(this)?.toString()?.isNotBlank() ?: false
    consts(listOf(
        "fabric" to (platform == "fabric"),
        "forge" to (platform == "forge"),
        "neoforge" to (platform == "neoforge"),
        "forge-like" to (platform == "forge" || platform == "neoforge"),
        "controlify" to "deps.controlify".propDefined(),
        "mod-menu" to "deps.modMenu".propDefined(),
    ))
}

stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
    group = "mod"
    ofTask("build")
}

stonecutter registerChiseled tasks.register("chiseledReleaseMod", stonecutter.chiseled) {
    group = "mod"
    ofTask("releaseMod")
}

stonecutter registerChiseled tasks.register("chiseledPublishSnapshots", stonecutter.chiseled) {
    group = "mod"
    ofTask("publishAllPublicationsToXanderSnapshotsRepository")
}

stonecutter registerChiseled tasks.register("chiseledRunTestmod", stonecutter.chiseled) {
    group = "mod"
    ofTask("runTestmodClient")
}