-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
151 lines (133 loc) · 3.61 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.gms.googleServices) apply false
alias(libs.plugins.hilt.android) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.jacocoAggregationResults)
alias(libs.plugins.jacocoAggregationCoverage)
alias(libs.plugins.gradleDoctor)
alias(libs.plugins.dependencyAnalysis)
}
doctor {
enableTestCaching.set(false)
failOnEmptyDirectories.set(true)
warnWhenNotUsingParallelGC.set(true)
disallowCleanTaskDependencies.set(true)
}
allprojects {
tasks.withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
}
}
}
val runAndroidTests by tasks.creating {
group = "verification"
description = "Runs Android instrumented tests only in specific modules"
dependsOn(
":app:connectedAndroidTest",
":data:db:connectedAndroidTest",
":feature:settings:ui:connectedAndroidTest",
":data:local-datastorage-impl:connectedAndroidTest"
)
}
subprojects {
apply {
plugin("io.gitlab.arturbosch.detekt")
plugin("org.jlleitschuh.gradle.ktlint")
}
detekt {
parallel = true
config.setFrom(rootProject.files("config/detekt/detekt.yml"))
allRules = false
}
ktlint {
android = true
ignoreFailures = false
reporters {
reporter(ReporterType.HTML)
}
}
tasks.withType<Test> {
failFast = true
reports {
html.required.set(true)
}
testLogging {
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
showStandardStreams = true
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
}
}
}
private val coverageExclusions = listOf(
"**/R.class",
"**/R\$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Module*.*",
"**/*Module",
"**/*Dagger*.*",
"**/*Hilt*.*",
"**/*GeneratedInjector",
"**/*HiltComponents*",
"**/*_HiltModules*",
"**/*_Provide*",
"**/*_Factory*",
"**/*_ComponentTreeDeps",
"**/*_Impl*",
"**/*DefaultImpls*",
"**/*Screen",
"**/*Activity",
"**/*Screen*",
"**/*Application",
"**/*StateProvider",
"**/*Plato*",
"**/*Button*",
"**/TextH*",
"**/*Texts*",
"**/Theme",
"**/Colors",
"**/*HateItOrRateItTheme*",
"**/TypeKt",
"**/LocalDataStorageImpl",
"**/TransactionControllerImpl",
"**/*AnalyticsControllerImpl",
"**/*HateItOrRateItDatabase",
"**/*LoggerInitializer",
"**/*DevelopmentTree",
"**/*ProductionTree",
"**/*RootNavDestinations",
"**/*HomeNavDestination",
"**/*HashUtils",
"**/*NavUtils",
"**/DebugAnalyticsControllerImpl",
"**/RemoteConfigsListenerImpl",
"**/WorkerControllerImpl",
"**/TestUtils",
"**/HioriTestRunner"
).flatMap {
listOf(
"$it.class",
"${it}Kt.class",
"$it\$*.class"
)
}
testAggregation {
coverage {
exclude(coverageExclusions)
}
}