-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
72 lines (67 loc) · 2.2 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
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.moko.resources) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.kover)
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory.asFile)
}
ext {
set("appJvmTarget", JavaVersion.VERSION_1_8)
}
dependencies {
kover(project(":androidApp"))
kover(project(":shared"))
}
allprojects {
apply(plugin = rootProject.libs.plugins.kover.get().pluginId)
apply(plugin = rootProject.libs.plugins.detekt.get().pluginId)
detekt {
source.setFrom(
objects.fileCollection().from(
io.gitlab.arturbosch.detekt.extensions.DetektExtension.DEFAULT_SRC_DIR_JAVA,
io.gitlab.arturbosch.detekt.extensions.DetektExtension.DEFAULT_TEST_SRC_DIR_JAVA,
io.gitlab.arturbosch.detekt.extensions.DetektExtension.DEFAULT_SRC_DIR_KOTLIN,
io.gitlab.arturbosch.detekt.extensions.DetektExtension.DEFAULT_TEST_SRC_DIR_KOTLIN,
"src/androidMain",
"src/commonMain",
"src/iosMain",
"src/commonTest",
"src/iosTest",
"src/androidUnitTest",
"src/test",
"src/testDebug",
"src/testRelease",
"build.gradle.kts",
)
)
buildUponDefaultConfig = false
// point to your custom config defining rules to run, overwriting default behavior
config.setFrom(files("$rootDir/config/detekt.yml"))
}
dependencies {
detektPlugins(rootProject.libs.detekt.formatting)
}
koverReport {
defaults {
plugins.withId("com.android.library") {
mergeWith("release")
}
plugins.withId("com.android.application") {
mergeWith("release")
}
}
filters {
excludes {
classes(
"*.MR*",
"*.BuildConfig",
"*.di.*",
)
}
}
}
}