Version name (#275)

Add HEAD commit hash to debug version name suffix
multisite^2
Andy Klimczak 9 years ago committed by Florens
parent a013a30d13
commit dd836f7646
  1. 14
      Clover/app/build.gradle

@ -1,5 +1,17 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
/**
* Gets the version name from the latest Git tag
*/
def getCommitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return "-" + stdout.toString().trim()
}
android { android {
compileSdkVersion 24 compileSdkVersion 24
// update the travis config when changing this // update the travis config when changing this
@ -64,7 +76,7 @@ android {
} }
debug { debug {
versionNameSuffix " Debug" versionNameSuffix getCommitHash()
// minifyEnabled true // minifyEnabled true
// proguardFiles 'proguard.cfg' // proguardFiles 'proguard.cfg'
} }

Loading…
Cancel
Save