nuhkoca
05/18/2021, 9:21 AMsolidogen
05/18/2021, 9:27 AMnuhkoca
05/18/2021, 9:39 AMmbonnin
05/18/2021, 11:47 AMconfigure<BaseExtension>{}
instead of android {}
. This is the non-generated-accessor equivalentmbonnin
05/18/2021, 11:47 AMnuhkoca
05/18/2021, 2:00 PMmbonnin
05/18/2021, 2:02 PMafterEvaluate {}
. That might or might not worknuhkoca
05/18/2021, 2:04 PMbuild.gradle.kts
mbonnin
05/18/2021, 2:05 PMPlugin.apply()
nuhkoca
05/18/2021, 2:09 PMGradle
plugin using apply
? Sorry this’ been beyond my knowledge a bit 😕mbonnin
05/18/2021, 2:13 PMplugins {
id("com.android.library")
}
But looks like your setup is a bit different so it's hard to tell how to reproduce the exact same behaviour you had beforenuhkoca
05/18/2021, 2:19 PMandroid-defaults.gradle.kts
to be common for both application
and library
scripts. However, I can create another scripts which apply android-defaults
as well as com.android.library
or com.android.application
like so;
android-application.gradle.kts
plugin {
id("com.android.library")
id("android-defaults)
}
As far as I see, this doesn’t seem possible, right?mbonnin
05/18/2021, 2:20 PMmbonnin
05/18/2021, 2:22 PMfun configureAndroidExtension() {
configure<BaseExtension> {
}
}
plugins.withId("com.android.library") {
configureAndroidExtension()
}
plugins.withId("com.android.application") {
configureAndroidExtension()
}
nuhkoca
05/18/2021, 2:24 PMmbonnin
05/18/2021, 2:26 PMmbonnin
05/18/2021, 2:27 PMnuhkoca
05/18/2021, 2:27 PMnuhkoca
05/19/2021, 7:56 AMapply<LibraryCommonPlugin>()
configure<BaseExtension> {
defaultConfig {
...
}
}
I tried adding plugins
block inside BaseExtension
and configuring PluginDependencySpecs
but those didn't work