x80486
04/29/2020, 2:31 PMdetekt
plugin in the subprojects
block. This is what I have so far: https://gist.github.com/x80486/52d5b8f1d584f90732e7d1881df423a7, but Gradle tells me that detekt
is not recognizable. I would like to avoid to configure detekt
in all subprojects, that's what I'm really trying to do. Anyone have done this before?araqnid
04/29/2020, 4:03 PMapply
, the Kotlin code for the build file doesn’t have the helper for the detekt extension available. You’ll have to replace the detekt {
bit with an explicit reference to the class to configure, e.g. the<DetektExtension>().apply {
araqnid
04/29/2020, 4:08 PMplugins{}
bit, and uses that to figure out which plugins to load and generates some “glue” for the Kotlin DSL - you can see this generated code for any project with sth like ./gradlew subproject:kotlinDslAccessorsReport
— if you manually add the plugins block to a subproject and run that, you should be able to see what the implementation of the Project.detekt { }
extension would bex80486
04/29/2020, 4:13 PMdetekt
behaves strange, it reports the issues for every module in all modules 🤷♂️x80486
04/29/2020, 5:01 PM./gradlew subproject:kotlinDslAccessorsReport
is the thing to visualize that! 👌