Is there a way to use variables from build.gradle in my code, which is dependent on flavor AND buildType?
In this example here: Is it possible to declare a variable in Gradle usable in Java? the new resource value only depends on if its a debug or release build type.
What I would like to have is one variable for each possible buildVariant.
so something like:
flavor1Debug => resValue "string", "app_name", "App 1 Debug"
flavor1Release => resValue "string", "app_name", "App 1"
flavor2Debug => resValue "string", "app_name", "App 2 Debug"
flavor2Release => resValue "string", "app_name", "App 2"
Is there a nice way to do this either through build.gradle or another way that doesn't included switches or if else statements?