Skip to content

Instantly share code, notes, and snippets.

@ronshapiro
Created June 29, 2015 16:25
Show Gist options
  • Save ronshapiro/9699db4a37c191e3b940 to your computer and use it in GitHub Desktop.
Save ronshapiro/9699db4a37c191e3b940 to your computer and use it in GitHub Desktop.
GIT_SHA in crashlytics version
def VERSION_NAME = "1.0.0"
def GIT_SHA = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
android {
defaultConfig {
versionName VERSION_NAME
}
buildTypes {
debug {
versionName "${VERSION_NAME}-${GIT_SHA}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment