In Android Studio I created two configurations:
How can I determine in code which configuration I selected?
I know that there is buildConfigField
in /app/build.gradle
but the names of the buildTypes
do not correspond to the configuration
names, so I wonder how does that all fit together.
android {
...
defaultConfig {
...
}
buildTypes {
debug {
...
buildConfigField 'boolean', 'DEBUG', 'true'
}
release {
...
}
}
}
I assume that in Android Studio a configuration
corresponds to a schema
in Xcode and a buildConfigField
corresponds to the Environment Variable
in Xcode (me coming from iOS world).