File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ import io.gitlab.arturbosch.detekt.Detekt
2+ import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
3+
4+ plugins {
5+ .. .
6+ id(" io.gitlab.arturbosch.detekt" ) version " 1.23.8"
7+ }
8+
9+ // ...
10+
11+ dependencies {
12+ // ...
13+
14+ implementation(" io.gitlab.arturbosch.detekt:detekt-api:1.23.8" )
15+ implementation(" io.gitlab.arturbosch.detekt:detekt-core:1.23.8" )
16+ detektPlugins(sourceSets.main.get().output)
17+ }
18+
19+ detekt {
20+ buildUponDefaultConfig = true
21+ allRules = false
22+ config.setFrom(" $projectDir /ci/detekt/detekt.yaml" )
23+ baseline = file(" $projectDir /ci/detekt/baseline.xml" )
24+ }
25+
26+ configurations.all {
27+ resolutionStrategy.eachDependency {
28+ if (requested.group == " org.jetbrains.kotlin" ) {
29+ useVersion(io.gitlab.arturbosch.detekt.getSupportedKotlinVersion())
30+ }
31+ }
32+ }
33+
34+ tasks.withType<Detekt >().configureEach {
35+ reports {
36+ html.required.set(true )
37+ xml.required.set(true )
38+ sarif.required.set(true )
39+ md.required.set(true )
40+ }
41+ }
42+
43+ tasks.withType<Detekt >() {
44+ jvmTarget = " 21"
45+ }
46+ tasks.withType<DetektCreateBaselineTask >() {
47+ jvmTarget = " 21"
48+ }
You can’t perform that action at this time.
0 commit comments