You can see this link. or Illogical to rename your release|debug.apk with the name you want in the file browser.
this code may be useful to you:
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationVariants.all { variant -> variant.outputs.each { output -> def formattedDate = new Date().format('yyyyMMddHHmmss') def newName = output.outputFile.name newName = newName.replace("app-", "$rootProject.ext.appName-") //"MyAppName" -> I set my app variables in the root project newName = newName.replace("-release", "-release" + formattedDate) //noinspection GroovyAssignabilityCheck output.outputFile = new File(output.outputFile.parent, newName) } } } debug { } }
enjoy the code :)
John smith
source share