I create one android project with Android Studio and the project contains many modules.
I want to use the buildConfigField in the build.gradle file. the following is my script.
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "Mode_NAME", "\"release\""
}
debug {
debuggable true
buildConfigField "String", "Mode_NAME", "\"debug\""
}
}
if I put these script in the app module, I can get the BuildConfig.Mode_NAME value correctly and the value is "debug" when I click run button of the AS.
But when I put the script in the SDK module(one module of my project), I always get the "release" when I click run button.
Can you help me to resolve this issue ? Many thanks!