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

Javier

08/12/2021, 3:44 PM
detektPlugins doesn’t exist in commonMain dependencies, how can I add my custom rule to there?
g

gammax

08/12/2021, 3:53 PM
mmm that’s odd. Have you applied the detekt-gradle-plugin?
j

Javier

08/12/2021, 3:54 PM
yep, in jvm project it is appearing
g

gammax

08/12/2021, 4:15 PM
that’s really odd as we create a
configuration
called
detektPlugins
for you. I believe you can manually create one like:
Copy code
configuration {
    detektPlugins
}
(☝️ That’s groovy). Not sure if that would work but worth a try.
j

Javier

08/12/2021, 4:22 PM
kts in my case, I will try btw, thank you :)
g

gammax

08/12/2021, 4:23 PM
kts should be:
Copy code
val detektPlugins by configurations.creating
👍 1
but yeah, I’m unsure if this would even work
j

Javier

08/12/2021, 8:42 PM
if I apply the gradle plugin only in the root, adding there the dependency should be enough to get it working in all kmp modules in the project? I think so when I was using the formatter one but it was long time ago
16 Views