-
Notifications
You must be signed in to change notification settings - Fork 0
/
TraceFit.gradle.kts
53 lines (46 loc) · 1.69 KB
/
TraceFit.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
import io.gitlab.arturbosch.detekt.Detekt
plugins {
libs.plugins.apply {
alias(jetbrainsCompose).apply(false)
alias(androidApplication).apply(false)
alias(kotlinMultiplatform).apply(false)
alias(kotlinAndroid).apply(false)
alias(androidLibrary).apply(false)
alias(kover)
alias(detekt)
}
}
allprojects {
apply(plugin = rootProject.libs.plugins.kover.get().pluginId).also {
rootProject.dependencies.add("kover", project(path))
kover.reports.filters.excludes.annotatedBy(
"androidx.compose.ui.tooling.preview.Preview",
"androidx.compose.runtime.Composable"
)
}
apply(plugin = rootProject.libs.plugins.detekt.get().pluginId).also {
detekt {
buildUponDefaultConfig = true
allRules = true
parallel = true
config.from(rootProject.layout.projectDirectory.file("detekt.yml"))
}
tasks.withType<io.gitlab.arturbosch.detekt.Detekt> {
// Use providers to avoid direct project references
val projectDirectory = layout.projectDirectory.asFile
val buildDirectory = layout.buildDirectory.asFile
setSource(projectDirectory)
exclude("**/build/**")
exclude {
val relativePath = it.file.relativeTo(projectDirectory)
relativePath.startsWith(buildDirectory.get().relativeTo(projectDirectory))
}
}
tasks.register("detektAll") {
dependsOn(tasks.withType<io.gitlab.arturbosch.detekt.Detekt>())
}
dependencies {
detektPlugins(rootProject.libs.common.detektFormatting)
}
}
}