I am trying to set a buildConfigField in my productFlavor block, and then reference that field elsewhere in my gradle build file so that I can use this value when constructing the name for my apk.
e.g
productFlavors{
flavor1{
buildConfigField "String", "APP_FLAVOR_NAME", '"MyApp-Flavor1"'
}
flavor2{
buildConfigField "String", "APP_FLAVOR_NAME", '"MyApp-Flavor2"'
}
How can I access APP_FLAVOR_NAME elsewhere in my build.gradle script?
I am also struggling to figure out how to just reference the flavor name itself in the buildscript as another option to constructing the apk name. How can I do that as well?