I\'m using Gradle to compile my Android project:
buildTypes {
release {
signingConfig signingConfigs.release
applicationVariants.all { varia
I simplified it by removing one of your lines but essentially you need to change it like so:
android {
buildTypes {
...
}
applicationVariants.all { variant ->
def file = variant.outputFile
def fileName = file.name.replace(".apk", "-renamed".apk")
variant.outputFile = new File(file.parent, fileName)
}
}