forked from PaulWoitaschek/Voice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
executable file
·55 lines (49 loc) · 1.22 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
@file:Suppress("UnstableApiUsage")
buildscript {
dependencies {
classpath(libs.androidPluginForGradle)
classpath(libs.kotlin.pluginForGradle)
}
}
plugins {
alias(libs.plugins.ktlint)
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
subprojects {
fun addCoreDependencies() {
if (path != ":core") {
dependencies.add("implementation", projects.core)
if (path != ":logging:core") {
dependencies.add("implementation", projects.logging.core)
}
}
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
plugins.withId("kotlin") {
addCoreDependencies()
}
plugins.withId("kotlin-android") {
addCoreDependencies()
}
}
tasks {
register<Exec>("importStrings") {
executable = "sh"
args("-c", "tx pull -af --minimum-perc=5")
finalizedBy(":app:lintDebug")
}
register<TestReport>("allUnitTests") {
val tests = subprojects.mapNotNull { subProject ->
val tasks = subProject.tasks
(
tasks.findByName("testDebugUnitTest")
?: tasks.findByName("test")
) as? Test
}
val artifactFolder = File("${rootDir.absolutePath}/artifacts")
destinationDir = File(artifactFolder, "testResults")
reportOn(tests)
}
}