-
Notifications
You must be signed in to change notification settings - Fork 0
/
stonecutter.gradle
46 lines (40 loc) · 1.23 KB
/
stonecutter.gradle
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
plugins {
id "dev.kikugie.stonecutter"
}
stonecutter.active "1.21.4" /* [SC] DO NOT EDIT */
stonecutter.registerChiseled tasks.register("chiseledBuildAndCollectAll", stonecutter.chiseled) {
setGroup("project")
ofTask("buildAndCollect")
}
stonecutter.registerChiseled tasks.register("chiseledPublishAll", stonecutter.chiseled) {
setGroup("project")
ofTask("publishMods")
}
stonecutter.registerChiseled tasks.register("chiseledPublishSpecified", stonecutter.chiseled) {
def list = getPublicationVersions()
versions = stonecutter.versions.findAll { list.contains(it.project) }
setGroup("project")
ofTask("publishMods")
}
for (ver in stonecutter.versions) {
def current = ver
stonecutter.registerChiseled tasks.register("chiseledBuildAndCollect+${current.project}", stonecutter.chiseled) {
versions = [current]
setGroup("project")
ofTask("buildAndCollect")
}
stonecutter.registerChiseled tasks.register("chiseledPublish+${current.project}", stonecutter.chiseled) {
versions = [current]
setGroup("project")
ofTask("publishMods")
}
}
String[] getPublicationVersions() {
return publication_versions.toString().split(" ").collect { s ->
def index = s.indexOf("[")
if (index == -1) {
return s
}
return s.substring(0, index)
}
}