nuhkoca
11/01/2022, 12:40 AMCommonExtension
in a precompiled script plugin? I am getting
Extension of type 'CommonExtension<?, ?, ?, ?>' does not exist.
configure<CommonExtension<*, *, *, *>> {
defaultConfig {
...
}
}
Vampire
11/01/2022, 9:13 AMpluginManager.withPlugin(...) { ... }
callnuhkoca
11/01/2022, 12:32 PMCommonExtension
and I am getting the above exception
apply<LibraryCommonPlugin>()
configure<CommonExtension<*, *, *, *>> {
defaultConfig {
...
}
testOptions {
unitTests {
isReturnDefaultValues = true
}
}
buildTypes {
getByName(TYPE_DEBUG) {
isMinifyEnabled = false
}
maybeCreate(TYPE_INTERNAL).apply {
isMinifyEnabled = true
}
getByName(TYPE_RELEASE) {
isMinifyEnabled = true
}
}
}
Vampire
11/01/2022, 7:11 PMLibraryCommonPlugin
is.
But I guess it is another convention plugin of yours that applies the plugin that should add the CommonExtension
whatever that it, right?
Then it should actually work from the information you showed.
The error might be in the details you are not showing.
Btw. from the syntax and the Slack you are asking from, I'd say you are using Kotlin DSL.
So I'd recommend you do not use the legacy apply method, but properly use the plugins { ... }
block, which also works to apply sibling precompiled script plugins.
Because if you do, then you also get the type-safe accessors generated and can use the whateverExtensionThatIs { ... }
syntax instead of configure<CommonExtension<*, *, *, *>> { ... }
.