I am able to create flavors for my Android application, however I want to move the code in a custom gradle file. Doing this, it gives me this error: "Unresolved reference: android". Why?
flavor-config.gradle.kts:
android {
flavorDimensions += "version"
productFlavors {
create("remote") {
dimension = "version"
isDefault = true
}
create("local") {
dimension = "version"
versionNameSuffix = ".local"
}
}
}
build.gradle.kts:
android {
...
}
apply(from = "flavor-config.gradle.kts")