gradle-infrastructure
gradle-infrastructure copied to clipboard
detekt: Better type resolution integration
It is not transparent to users how to use detekt tasks with type resolution if it is not listed in ./gradlew tasks.
I think type resolution should be configured from config and not from task name.
API might be like:
redmadrobot {
detekt {
useTypeResolution("release") // Here we can configure variant for android projects
}
}
After this:
- detekt plugin should be applied to all subprojects (where kotlin plugin is applied)
- task
detektAllshould depend on the release detekt tasks with type resolution
Found another problem of current approach. It is impossible to depend task on detekt[BuldVariant]All task because it will not be created if gradle command not includes detekt*All pattern.
So it is impossible to create task like this:
tasks.register("ciCheck") {
// ...
dependsOn("detektReleaseAll")
}