-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
103 lines (92 loc) · 2.43 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
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.compiler) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.jacocoAggregationResults)
alias(libs.plugins.jacocoAggregationCoverage)
}
allprojects {
tasks.withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
}
}
}
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
verbose = true
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"
).flatMap {
listOf(
"$it.class",
"${it}Kt.class",
"$it\$*.class"
)
}
testAggregation {
coverage {
exclude(coverageExclusions)
}
}