aboutsummaryrefslogtreecommitdiff
path: root/stonecutter.gradle.kts
blob: 79cc121158e1b66f305a0629f27e96d0b8ecb5ff (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
plugins {
    id("dev.kikugie.stonecutter")
    id("dev.architectury.loom") version "1.6.+" 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-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")
}