spierce7
12/31/2021, 6:48 PMplugins.withId("com.android.library") {
configure<LibraryPlugin> {
android {
}
}
}
but I can’t resolve android { }
in my build script. What do I need to configure in order to resolve this?spierce7
12/31/2021, 6:58 PMif (plugins.hasPlugin("com.android.library")) {
configure<com.android.build.gradle.LibraryExtension> {
gildor
01/01/2022, 1:02 AMspierce7
01/01/2022, 1:08 AMsubprojects
block. It’s something I’m choosing to opt into for each projectgildor
01/01/2022, 11:16 AMVampire
01/01/2022, 1:12 PMpluginManager.withPlugin
. Actually using plugins.
It's always bad, if you look at the JavaDoc of the getPlugins
method.
And to answer your actual question, accessors are only generated for plugins applied using the plugins
block in normal build scripts and in precompiled script plugins. In all other cases you have to go by name or type as you did now.