Lilly
10/30/2020, 1:02 PMandroid
block in my app/build.gradle.kts
. The project is just a fresh android project with the default :app
module/sub project. All I do is:
// app/build.gradle.kts
plugins {
id("com.myplugin.configuration-plugin")
}
In my plugin I apply the android gradle plugin, the kotlin gradle plugin and another plugin called detekt. This is working, but what I don't understand: when I apply the detekt
plugin in my root build.gradle.kts
I get an error and the build fails, see picture. I got rid of the buildscript
block because my plugin handles the sub projects configuration, so the classpath of my root build script is empty.
// root build.gradle.kts
plugins {
id("io.gitlab.arturbosch.detekt") version "1.14.2"
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven(url = "<https://jitpack.io>")
}
}
task<Delete>("clean") {
delete(rootProject.buildDir)
}
I would expect that I can use the plugin in my root build script, so I can configure the detekt
block.
Can someone explain me, why this does not work?
EDIT: When I don't apply detekt
plugin in my plugin it works