android - Gradle buildType/productFlavor using unexpected buildConfigField -
given below configuration: productflavors { normal { applicationid "com.app" } mock { applicationid "com.app.mock" } } buildtypes { debug { productflavors.normal.buildconfigfield "boolean", "mockmode", "false" productflavors.mock.buildconfigfield "boolean", "mockmode", "true" } release { productflavors.normal.buildconfigfield "boolean", "mockmode", "false" // release should never point mocks. ever. productflavors.mock.buildconfigfield "boolean", "mockmode", "false" } } i have expected buildconfig.mockmode = true; , however, resultant build config: public final class buildconfig { public static final boolean debug = boolean.parseboolean("true"); public static final string application_id = "*****"; public static final string build_type = "debug"; public s...