Skip to content

Instantly share code, notes, and snippets.

@sigmadeltasoftware
Created November 29, 2016 10:20
Show Gist options
  • Save sigmadeltasoftware/f8c351473841ba570d2b4ab458e35622 to your computer and use it in GitHub Desktop.
Save sigmadeltasoftware/f8c351473841ba570d2b4ab458e35622 to your computer and use it in GitHub Desktop.
Gradle version control
defaultConfig {
def gitCommitHash = "git rev-parse --short HEAD".execute().text.trim()
if ("git status -s".execute().text.trim() != "") {
gitCommitHash += "-dirty"
}
applicationId "com.sigmadelta.kiln"
minSdkVersion.apiLevel 21
targetSdkVersion.apiLevel 23
versionCode 1
versionName "1.0.0 - " + gitCommitHash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment