How do you differentiate between release and debug builds in your Android development taking into consideration you can't rely on BuildConfig.DEBUG
flag?
I'm using Android Studio with Gradle and prefer to produce release/debug builds using Gradle tasks, I also need it to produce those on TeamCity.
For example, I need to use different String
values for release and debug. What I'm going to do is to store them in main
and debug
folders separately so the proper one is picked up depending on the build. This is kind of okay, but what if I need to have a flag
in if/else
to decide which way to go?