I’m trying to integrate `detekt` in my project. In...
# detekt
k
I’m trying to integrate
detekt
in my project. In the top level project’s
build.gradle.kts
file I have:
Copy code
apply(plugin = "io.gitlab.arturbosch.detekt")

buildscript {
    repositories.applyDefault()
    dependencies {
        (...)
        classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0")
    }
}
it synchronizes just fine, but when I try to configure it in the
detekt
block I get
Unresolved reference: detekt
error. Is there anything I’m missing? I had very similar integration in another project and it worked as expected. The only difference was that I was using groovy instead of kotlin in gradle files there.
it turned out I need to configure it this way:
Copy code
tasks.withType<io.gitlab.arturbosch.detekt.Detekt> {
}
167 Views