tweak gradle-built apk name

This commit is contained in:
Eric House 2017-01-22 15:55:31 -08:00
parent 83fed4da91
commit 929c4c811b

View file

@ -148,12 +148,13 @@ android {
abortOnError false abortOnError false
} }
def gitrev = "git describe --tags".execute().text.trim() def gitrev = "git describe --tags --dirty".execute().text.trim()
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.each { output -> variant.outputs.each { output ->
output.outputFile = def newName = output.outputFile.name
new File(output.outputFile.parent, newName = newName.replace(".apk","-${gitrev}.apk")
output.outputFile.name.replace(".apk", "-${gitrev}.apk")) newName = newName.replace("app-","")
output.outputFile = new File(output.outputFile.parent, newName)
} }
} }
} }