-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
62 lines (49 loc) · 1.37 KB
/
build.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import com.github.gradle.node.npm.task.NpxTask
plugins {
base
id("com.github.node-gradle.node")
}
repositories {
mavenCentral()
mavenLocal()
google()
gradlePluginPortal()
}
val changesetVersion by tasks.registering(NpxTask::class) {
group = "changesets"
command.set("changeset")
args.set(listOf("version"))
}
val changesetPublish by tasks.registering(NpxTask::class) {
group = "changesets"
mustRunAfter(zipModules, changesetVersion)
command.set("changeset")
args.set(listOf("publish"))
}
val release by tasks.registering {
group = "publishing"
dependsOn(tasks.build, changesetVersion, changesetPublish)
}
val assembleModules by tasks.registering(Copy::class) {
group = "ignition module"
val signModuleTasks = subprojects.flatMap { subproject ->
subproject.tasks.named { it == "signModule" }
}
val signedModules = signModuleTasks.map {
it.outputs.files.singleFile
}
inputs.files(signedModules)
dependsOn(signModuleTasks)
from(signedModules)
destinationDir = file("build/modules")
}
val zipModules by tasks.registering(Zip::class) {
group = "ignition module"
inputs.files(assembleModules.get().outputs)
archiveBaseName.set("modules")
destinationDirectory.set(file("build"))
from(assembleModules.get().destinationDir)
}
tasks.build {
dependsOn(zipModules)
}