eskatos
02/02/2018, 10:46 AMplugins {}
block should only be at the root scope of the script. Under allprojects {}
it is ignored. It should fail though, see https://github.com/gradle/kotlin-dsl/issues/625
You should do this instead:
allprojects {
apply { plugin("java") }
// ...
}
Another thing is that when doing configuration injection (allprojects {}
, subprojects {}
or project(":path") {}
), you can’t use the static extensions to refer to configuration names, you have to rely on strings:
allprojects {
apply { plugin("java") }
dependencies {
"compile"("g:a:v")
}
}