This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
85 lines (75 loc) · 1.97 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
/*
* Designed and developed by 2022 Ji Sungbin.
*
* Licensed under the MIT.
* Please see full license: https://github.com/duckie-team/ApiLibrary/blob/trunk/LICENSE
*/
@file:Suppress("DSL_SCOPE_VIOLATION")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.kover)
alias(libs.plugins.hilt) apply false
}
koverMerged {
enable()
filters {
annotations {
excludes.add("*Generated")
}
classes {
excludes.add("*Dao_Impl")
}
}
xmlReport {
reportFile.set(file("$rootDir/report/test-coverage/report.xml"))
}
htmlReport {
reportDir.set(file("$rootDir/report/test-coverage/html"))
}
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.build.kotlin)
classpath(libs.build.oss.license)
classpath(libs.build.gradle.agp)
}
}
allprojects {
repositories {
google()
mavenCentral()
}
afterEvaluate {
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.OptIn",
"-opt-in=kotlin.RequiresOptIn",
)
freeCompilerArgs = freeCompilerArgs + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$rootDir/report/compose-metrics",
)
freeCompilerArgs = freeCompilerArgs + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$rootDir/report/compose-reports",
)
}
}
}
apply {
plugin(rootProject.libs.plugins.kover.get().pluginId)
}
}
tasks.register(
name = "cleanAll",
type = Delete::class,
) {
allprojects.map { project ->
project.buildDir
}.forEach(::delete)
}