I'm trying to move android {} (individual module) into subprojects {} (root project build.gradle.kts) (to avoid duplicate of same android {} in every module)
I was able to move when using gradle groovy. but in gradle kotlin-dsl. it seems impossible to reference android in subprojects {}
I have tried
subprojects {
afterEvaluate {
if (project.plugins.hasPlugin(Plugins.kotlinAndroidApplication)) {
project.android {
}
}
}
But always getting this error: Unresolved reference: android
Is there any way to access android {} inside subprojects {} for kotlin-dsl?