I'm trying to set the destiantion folder depening on Debug or release mode. But I not really succesfully. For debug and release it always goes to debug folder. And if I remove the debug config then it goes to release folder, but both of them (release and debug).
I guess I have to modify the Running configuration, but I'm not sure how to do it.
Any help?
gradle file:
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 19
versionCode 18
versionName "0.70"
}
signingConfigs {
release {
storeFile file("xxxx")
storePassword "xxxx"
keyAlias "xxx"
keyPassword "xxxx"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
applicationVariants.all { variant ->
def file = variant.outputFile
variant.outputFile = new File("C:\\PATH_TO_FOLDER\\release", "name" + defaultConfig.versionName + ".apk")
}
}
debug {
applicationVariants.all { variant ->
def file = variant.outputFile
variant.outputFile = new File("C:\\PATH_TO_FOLDER\\debug", "name_DEBUG_" + defaultConfig.versionName + ".apk")
}
}
}
}