https://kotlinlang.org logo
#detekt
Title
# detekt
p

PoisonedYouth

10/02/2023, 6:15 AM
I want to enable the rules with type resolution in my Gradle multi-module project. For this I use the
detektMain
task instead of
detekt
. This works when executing it manually, but when running the
build
task still the
detekt
task is executed, or am I wrong? Is it possible to also use the
detektMain
task for this?
m

marschwar

10/02/2023, 6:27 AM
You can configure the build task to depend on detektMain.
p

PoisonedYouth

10/02/2023, 6:27 AM
Is that executing both
detekt
and
detektMain
as a consequence?
m

marschwar

10/02/2023, 6:28 AM
Yes, that would be the case.
p

PoisonedYouth

10/05/2023, 6:38 PM
I manually added the dependency to the detekMain task and removed the detekt task to prevent running multiple detekt tasks. This feels like a workaround. Are there plans for a kind of plugin configuration for this?