Skip to content
Permalink
Browse files

Update: Version control

  • Loading branch information...
Omico committed Feb 3, 2017
1 parent 07c9736 commit 96af43e2b8b4cff53020889a6a91f40b0ceb32fe
Showing with 12 additions and 2 deletions.
  1. +12 −2 config.gradle
@@ -6,8 +6,8 @@ ext {
applicationId : "me.omico.currentactivity",
minSdkVersion : 19,
targetSdkVersion: 25,
versionCode : 9,
versionName : "1.0.8"
versionCode : getVersionCode(),
versionName : getVersionName()
]

library = [
@@ -20,4 +20,14 @@ ext {
dependencies = [
supportLibraryVersion: "25.1.1"
]
}

def getVersionCode() {
def cmd = 'git rev-list HEAD --count'
return cmd.execute().text.trim().toInteger()
}

def getVersionName() {
def cmd = 'git describe --tags --dirty'
return cmd.execute().text.trim()
}

0 comments on commit 96af43e

Please sign in to comment.
You can’t perform that action at this time.