Hey :wave: I would like to set up a custom Gradle ...
# detekt
o
Hey 👋 I would like to set up a custom Gradle task that runs Detekt with type resolution, using a single custom rule. This needs to work in a multi-modular project that includes both JVM and Android library modules. I'm currently struggling with setting up the correct classpath (I've read it can be tricky). Has anyone dealt with a similar setup and can share how they configured it? Thanks for any advice.
x
Hey, we have faced this issue and our setup is not a single task but you can get inspiration from it. Take a look at the "printDetektClasspath" task here : https://github.com/DataDog/dd-sdk-android/blob/develop/buildSrc/src/main/kotlin/com/datadog/gradle/config/DetektCustomConfig.kt
We then use the printed ClassPath to invoke Detekt on each module of the project
o
Awesome, thanks for info and link 👍