Created
November 29, 2016 10:20
-
-
Save sigmadeltasoftware/f8c351473841ba570d2b4ab458e35622 to your computer and use it in GitHub Desktop.
Gradle version control
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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