forked from jjohannes/idiomatic-gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
37 lines (36 loc) · 1.47 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
// This file is ONLY used to define global lifecycle tasks
val taskGroup = "IG build"
tasks.named<TaskReportTask>("tasks") {
displayGroup = taskGroup
doLast {
println("\nTo work with selected components, run ':<component>:tasks' (e.g. ':ig-data:tasks') for more information")
}
}
// Register lifecycle tasks in this umbrella build.
// A user/CI usually only needs these.
val checkAll = tasks.register("checkAll") {
group = taskGroup
description = "Run all tests and create code coverage report"
dependsOn(gradle.includedBuilds.filter { it.name.startsWith("ig-") }.map { it.task(":checkAll") })
dependsOn(gradle.includedBuild("aggregation").task(":package-server:codeCoverageReport"))
}
val buildServer = tasks.register("buildServer") {
group = taskGroup
description = "Build the Server (executable Jar)"
dependsOn(gradle.includedBuild("aggregation").task(":package-server:assemble"))
}
val buildClientApi = tasks.register("buildClientApi") {
group = taskGroup
description = "Build the Client API"
dependsOn(gradle.includedBuild("aggregation").task(":publish-api:assemble"))
}
tasks.register("publishClientApi") {
group = taskGroup
description = "Publish the Client API"
dependsOn(gradle.includedBuild("aggregation").task(":publish-api:publish"))
}
tasks.register("build") {
group = taskGroup
description = "Run all tests, build Server and Client API (without publishing)"
dependsOn(checkAll, buildServer, buildClientApi)
}