I am trying to change a properties file entry based on the buildVariant. For instance, I want to set inProduction = true if I am generating a signed APK and inProduction = false otherwise. I can’t seem to figure out how to do this.
I am using productFlavors and I know the task I need to run is:
Absolutely. I wanted to mention I am using Android Studio because I wasn’t sure if it was a different version of Gradle.
The issue is the same, I need to update my build.gradle to change the above mentioned properties file depending on which build variant I use.
For instance, in AS I select the demoDebug variant (demo is one of my product flavors) and I want the inProduction property in the airshipconfig.properties file to be set to false. When I choose the demoRelease variant, I want that property set to true when it builds.
Does this make sense? I really just don’t want to have to remember to change that property before I Generate a Signed APK.