Bit of a lazy web question: Does anyone have a cus...
# detekt
a
Bit of a lazy web question: Does anyone have a custom gradle task that can run detekt across all modules with type resolution? E.g. it runs
detektDebug
on Android modules and
detektMain
and
detektTest
on JVM modules.
1
b
DetektMain also runs detektDebug on android.
If you don't want to run detektRelease you can disable that build type.
It is on the documentation of detekt with gradle.
This way you can just run
gradle detektMain detektTest
a
Thanks. It wasn't clear between
Main
(and
Test
) vs build type based.
Does
detektTest
also cover the
androidTest
sources in Android modules, or just JVM test sources?
b
If there's something that can be improved in the documentation please open an issue, or even better, a PR with that improvement.
a
Thanks. I'd missed the section within brackets against each type here. They're very clear about both my questions. https://detekt.dev/docs/gettingstarted/gradle#:~:text=Android%3A%20all%20production%20source%20sets)