-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
40 lines (34 loc) · 1.36 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
createTasksForGithubActions()
createTasksForSamples()
fun createTasksForGithubActions() {
tasks.register("clean") {
dependsOn(gradle.includedBuild("kotlin-sdk").task(":kotlin:clean"))
dependsOn(gradle.includedBuild("android-sdk").task(":android:clean"))
}
tasks.register("checkCodeStyle") {
dependsOn(gradle.includedBuild("kotlin-sdk").task(":kotlin:detektMain"))
dependsOn(gradle.includedBuild("android-sdk").task(":android:detektMain"))
}
tasks.register("lintAndroid") {
dependsOn(gradle.includedBuild("android-sdk").task(":android:lint"))
}
tasks.register("test") {
dependsOn(gradle.includedBuild("kotlin-sdk").task(":kotlin:test"))
dependsOn(gradle.includedBuild("android-sdk").task(":android:testDebugUnitTest"))
}
tasks.register("testWithReport") {
dependsOn(gradle.includedBuild("kotlin-sdk").task(":kotlin:koverReport"))
dependsOn(gradle.includedBuild("android-sdk").task(":android:koverReport"))
}
}
fun createTasksForSamples() {
val samples = listOf("android-sample-kotlin", "android-sample-java")
samples.forEach {
tasks.register("build-$it") {
dependsOn(gradle.includedBuild(it).task(":app:build"))
}
tasks.register("clean-$it") {
dependsOn(gradle.includedBuild(it).task(":app:clean"))
}
}
}