I want to execute some code depending on the type of assembly (release, debug). in particular, I want to change the name of the APK depending on the type of assembly ... something like this,
if (buildType.name == 'release') {
project.archiveBaseName = 'blah';
} else if (buildType.name == ...) {
...
}
I do not know where to place this code. I can iterate over assembly types,
android.buildTypes.each{ type ->
print type.name
}
but this, of course, gives me all assembly types, not the current assembly type.
thanks.
source
share