-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.gradle.kts
59 lines (50 loc) · 1.64 KB
/
pipeline.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
open class CopyDestination {
var dest = "appBuilds"
}
class PipelinePlugin : Plugin<Project> {
override fun apply(project: Project) {
project.task("defineCodeCheckBaseline") {
description = "Create white list for code style check for all projects"
group = "pipeline"
project.childProjects.forEach {
dependsOn("${it.value.path}:detektBaseline")
}
doLast {
println("Successfully wrote baseline for projects")
}
}
project.task("runCodeReview") {
description = "Run detekt code style check for all projects"
group = "pipeline"
project.childProjects.forEach {
dependsOn("${it.value.path}:detekt")
}
doLast {
println("Successfully passed code style check")
}
}
project.task("runTests") {
description = "Run tests for all projects"
group = "pipeline"
project.childProjects.forEach {
dependsOn("${it.value.path}:test")
}
doLast {
println("Successfully passed all tests")
}
}
project.task("buildAndAssemble") {
description = "Run assemble process"
group = "pipeline"
project.allprojects.forEach {
if (it.name == "app") {
dependsOn("${it.path}:assemble")
}
}
doLast {
println("Successfully built and assembled all.")
}
}
}
}
apply<PipelinePlugin>()