Larry Garfield
06/25/2024, 7:46 PMbuild.gradle.kts
file? (Which, yes, we have.)Joffrey
06/26/2024, 3:38 AM./gradlew sometask
it will run that task in all projects that have it definedRobert Williams
06/26/2024, 9:02 AMallprojects {
afterEvaluate { project ->
project.apply plugin: "io.gitlab.arturbosch.detekt"
project.detekt {
config = files("$rootDir/detekt-config.yml")
//any other common config
}
}
Robert Williams
06/26/2024, 9:03 AMgradlew detekt
and it'll run for all modulesLarry Garfield
06/26/2024, 1:41 PMdetekt {
config.setFrom("detekt.yml")
baseline = file("detekt-baseline.xml")
buildUponDefaultConfig = true
source.setFrom(
"sub1/src/",
"sub2/src/",
"sub3/src/",
)
}
But then our principle engineer changed it to:
subprojects {
tasks.withType<Detekt> {
config.setFrom("../detekt.yml")
baseline = file("../detekt-baseline.xml")
buildUponDefaultConfig = true
}
}
Larry Garfield
06/26/2024, 1:42 PMRobert Williams
06/26/2024, 2:01 PMRobert Williams
06/26/2024, 2:02 PMLarry Garfield
06/26/2024, 2:08 PMdetekt
from the top level then run it across all projects automatically, or does it need to get run separately for each project?Robert Williams
06/26/2024, 2:09 PMLarry Garfield
06/26/2024, 2:10 PMLarry Garfield
06/26/2024, 2:11 PMmoduleList.forEach { detekt }
or something like that?