Skip to content

Commit 17ca07b

Browse files
committed
aaaaa
1 parent 3e85bc6 commit 17ca07b

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

buildSrc/src/main/kotlin/toolkit-detekt.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ detekt {
3636
val javaVersion = project.jvmTarget().get()
3737

3838
tasks.withType<Detekt>().configureEach {
39-
doFirst {
40-
detektFiles.forEach { println(it) }
41-
}
39+
setSource(source.filter { it.walkBottomUp().none { c -> c.name == "build" } })
4240

4341
jvmTarget = javaVersion.majorVersion
4442
dependsOn(":detekt-rules:assemble")
@@ -83,6 +81,5 @@ tasks.create("aaaa") {
8381
tasks.named<Detekt>("detektMain").get().source.forEach { println(it) }
8482
println("files / ======")
8583
println(tasks.named<Detekt>("detektMain").get().source.files)
86-
8784
}
8885
}

buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,3 @@ project.afterEvaluate {
5959
}
6060
}
6161
}
62-
63-
// can't figure out why exclude() doesn't work on the generated source tree, so copy logic from detekt
64-
project.extensions.getByType(KotlinJvmProjectExtension::class.java).target.compilations.configureEach {
65-
val inputSource = kotlinSourceSets
66-
.map { it.kotlin.sourceDirectories.filter { !it.path.contains("build") } }
67-
.fold(project.files() as FileCollection) { collection, next -> collection.plus(next) }
68-
69-
tasks.named<Detekt>(DetektPlugin.DETEKT_TASK_NAME + name.capitalize()).configure {
70-
setSource(inputSource)
71-
}
72-
73-
tasks.named<DetektCreateBaselineTask>(DetektPlugin.BASELINE_TASK_NAME + name.capitalize()).configure {
74-
setSource(inputSource)
75-
}
76-
}

0 commit comments

Comments
 (0)