-
Notifications
You must be signed in to change notification settings - Fork 0
/
stonecutter.gradle.kts
34 lines (28 loc) · 1.15 KB
/
stonecutter.gradle.kts
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
import org.gradle.configurationcache.extensions.capitalized
plugins {
id("dev.kikugie.stonecutter")
}
stonecutter active "1.21-neoforge" /* [SC] DO NOT EDIT */
fun chiseledTask(task : String, group : String) {
val name = "chiseled${task.capitalized()}"
stonecutter registerChiseled tasks.register(name, stonecutter.chiseled) {
versions = stonecutter.versions.filter { it.project.endsWith("neoforge") }
this.group = group
ofTask(task)
dependsOn("Pre${name.capitalized()}")
}
stonecutter registerChiseled tasks.register("Pre${name.capitalized()}", stonecutter.chiseled) {
versions = stonecutter.versions.filter { it.project.endsWith("fabric") }
this.group = group
ofTask(task)
}
}
chiseledTask("buildAndCollect", "project")
chiseledTask("publishMods", "publishing")
chiseledTask("publishMavenPublicationToMavenLocal", "publishing")
chiseledTask("publishMavenPublicationToBawnortonRepository", "publishing")
stonecutter configureEach {
val current = project.property("loom.platform")
val platforms = listOf("fabric", "neoforge").map { it to (it == current) }
consts(platforms)
}