I have a gradle build i need to have different configurations based whether it is a release or debug build. The problem is that the gradle build does not distinguish between those two.
for example :
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
buildTypes {
debug {
println 'debug'
}
release {
println 'release'
}
}
}
When i build using 'gradle assembleRelsease' or using 'gradle assembleDebug', it prints both 'release' and 'debug' in both cases or even when i build using debug (from Build Variants) in android studio. It simply does not distinguish it. What i would excpect is when i build release it only prints 'release' and when i build degub it only prints 'debug'. Does any body have a solution to this problem ? am i do doing something wrong?