Skip to content

Instantly share code, notes, and snippets.

@hitesh-dhamshaniya
Created September 26, 2020 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitesh-dhamshaniya/f3ba29e4fbf17be8c612b789a31ac995 to your computer and use it in GitHub Desktop.
Save hitesh-dhamshaniya/f3ba29e4fbf17be8c612b789a31ac995 to your computer and use it in GitHub Desktop.
AutoGenerateBuildName add this in application build.gradle and generate apk file name suitable instead of app.apk
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
variant.outputs.all {
outputFileName = archivesBaseName
outputFileName += "-v" + variant.versionName + "-" + variant.buildType.name + "-" + new Date().format('Mddyyyy')
outputFileName += ".apk"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment