-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
115 lines (98 loc) · 2.78 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
plugins {
id("org.jetbrains.kotlinx.kover") version libs.versions.kover
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.compose.compiler) apply false
}
apply(plugin = "com.github.ben-manes.versions")
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath(libs.build.android.gradlePlugin)
classpath(libs.build.kotlinPlugin)
classpath(libs.build.gradleVersionsPlugin)
classpath(libs.build.detekt.plugin)
classpath(libs.build.detekt.formatting)
classpath(libs.build.paparazzi)
classpath(libs.build.sqldelight)
}
}
allprojects {
repositories {
mavenCentral()
google()
}
}
tasks.register("clean").configure {
delete("build")
}
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
rejectVersionIf {
val version = candidate.version
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
isStable.not()
}
}
task("e2eTests", Exec::class) {
group = "Verification"
description = "Run e2e test on a connected device"
workingDir = file("$projectDir/e2e_tests")
commandLine = listOf("bash", "test_android.sh")
}
task("generateScreenshots", Exec::class) {
group = "Tool"
workingDir = file("$projectDir/e2e_tests")
commandLine = listOf("bash", "generate_screenshots.sh")
}
allprojects {
apply(plugin = "kover")
if (extensions.findByType<kotlinx.kover.api.KoverProjectConfig>() != null) {
extensions.configure<kotlinx.kover.api.KoverProjectConfig> {
isDisabled.set(false)
}
}
}
koverMerged {
enable()
filters {
classes {
excludes += listOf(
"*.ui.components.*",
"*.designsystem.*",
"*.activity.*",
"**Activity",
"**App",
"*Module*",
"*.model.*",
"*.debug.*",
"*.BuildConfig",
"*.R",
"*.mock",
"*.mocks",
)
}
annotations {
excludes += listOf(
"*Generated",
"Composable",
)
}
}
verify {
onCheck.set(true)
rule {
isEnabled = true
target = kotlinx.kover.api.VerificationTarget.ALL
bound {
minValue = 70
counter = kotlinx.kover.api.CounterType.LINE
valueType = kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE
}
}
}
}