efemoney
03/25/2019, 2:46 PMinline fun PluginDependenciesSpec.android(type: String = "application") = id("com.android.$type")
to be used in the plugins
block like
plugins {
android() // OR
android("library")
}
h0tk3y
03/25/2019, 3:03 PMplugins { ... }
blocks are somewhat special, as they are resolved and executed before any other build script parts or plugins, are loaded. Even the buildSrc
declarations are not available in the plugins { ... }
blocks. I believe that's why.efemoney
03/25/2019, 3:38 PMtapchicoma
03/25/2019, 6:07 PMEven theI am using versions object defined indeclarations are not available in thebuildSrc
blocksplugins { ... }
buildSrc
🤔efemoney
03/25/2019, 6:12 PMorg.gradle.kotlin.dsl
? 🤔tapchicoma
03/25/2019, 6:13 PMobject Versions {
val somePlugin = "1.0.0"
}
in buildSrc
and using it in plugins block:
plugins {
id("some.plugin.id") version Versions.somePlugin
}
tapchicoma
03/25/2019, 6:14 PMbuildSrc
and use it in plugins { .. }
block.efemoney
03/25/2019, 6:17 PM