From 929c4c811b5b10c0e4af65d488a96849a4859ec3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 22 Jan 2017 15:55:31 -0800 Subject: [PATCH] tweak gradle-built apk name --- xwords4/android/app/build.gradle | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 563812e2d..ea492471a 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -148,12 +148,13 @@ android { abortOnError false } - def gitrev = "git describe --tags".execute().text.trim() + def gitrev = "git describe --tags --dirty".execute().text.trim() applicationVariants.all { variant -> variant.outputs.each { output -> - output.outputFile = - new File(output.outputFile.parent, - output.outputFile.name.replace(".apk", "-${gitrev}.apk")) + def newName = output.outputFile.name + newName = newName.replace(".apk","-${gitrev}.apk") + newName = newName.replace("app-","") + output.outputFile = new File(output.outputFile.parent, newName) } } }