Last active
June 15, 2017 11:22
-
-
Save arthtilva/656684ef0e003e5b833ddf4d76d100ed to your computer and use it in GitHub Desktop.
generate APK as per your required name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildTypes { | |
debug { | |
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
def date = new Date(); | |
def formattedDate = date.format('dd-MM-yyyy') | |
output.outputFile = new File(output.outputFile.parent, | |
output.outputFile.name.replace("-release", "-release_" + formattedDate) | |
//for Debug use output.outputFile = new File(output.outputFile.parent, | |
// output.outputFile.name.replace("-debug", "-" + formattedDate) | |
) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment