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

Rodrigo Silva

07/19/2020, 4:13 PM
Hi all. I'm getting this warning:
Copy code
detekt(DetektExtension.() -> Unit): Unit' is deprecated. Either apply detekt plugin to root project
why? gradle version: 6.5 detekt version: 1.10.
g

gammax

07/19/2020, 4:43 PM
Hard to say if you don’t share your project setup 🤔 Anyway, as the error message suggests, you need to either apply the detekt plugin only in the root project or use the
apply false
mechanism to apply the plugin to all the subprojects, as described here
r

Rodrigo Silva

07/19/2020, 6:56 PM
@gammax, here my setup
d

Davide Giuseppe Farella

07/26/2020, 4:34 PM
@Rodrigo Silva you have to remove the wildcard import, otherwise it will import
io.gitlab.arturbosch.detekt.detekt
instead of using the proper gradle extension
👌 1
9 Views