Using Java variables declared in Gradle
in build.gradle:android { buildTypes { debug { buildConfigField "int", "FOO", "100" buildConfigField "String", "FOO_STRING", "\"foo\"" buildConfigField "boolean", "LOG", "true" } release { buildConfigField "int", "FOO", "200" buildConfigField "String", "FOO_STRING", "\"bar\"" buildConfigField "boolean", "LOG", "false" } } }You can access them with /app/build/generated/source/buildConfig/debug|re..