-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
38 lines (31 loc) · 941 Bytes
/
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
import io.gitlab.arturbosch.detekt.Detekt
plugins {
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.agp) apply false
alias(libs.plugins.detekt)
}
subprojects {
apply {
plugin(rootProject.libs.plugins.detekt.get().pluginId)
}
detekt {
buildUponDefaultConfig = true
config.setFrom(rootProject.files("config/detekt/detekt.yml"))
}
}
tasks.register("clean", Delete::class.java) {
delete(rootProject.layout.buildDirectory)
dependsOn(gradle.includedBuild("methodhook").task(":clean"))
}
tasks.register("detektAll") {
description = "Run detekt in all projects"
dependsOn(":detekt")
dependsOn(gradle.includedBuild("methodhook").task(":detekt"))
}
tasks.withType<Detekt>().configureEach {
reports {
html.required.set(true)
html.outputLocation.set(file("build/reports/detekt.html"))
}
}