Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Move version specifier to root gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
spacecowboy committed Apr 7, 2017
1 parent 892c38d commit 5cc5e6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ allprojects {
jcenter()
}
}

ext {
gitTag = '4.0.1'
gitCommitCount = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
}
6 changes: 0 additions & 6 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ apply plugin: 'com.android.library'
// must be applied after your artifact generating plugin (eg. java / com.android.library)
apply plugin: 'bintray-release'

// query git for the the SHA, Tag and commit count. Use these to automate versioning.
//def gitTag = 'git describe --tags'.execute([], project.rootDir).text.trim()
def gitTag = '4.0.1'
def gitCommitCount =
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())

android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
Expand Down
4 changes: 0 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

apply plugin: 'com.android.application'

def gitTag = 'git describe --tags'.execute([], project.rootDir).text.trim()
def gitCommitCount =
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())

android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
Expand Down

0 comments on commit 5cc5e6a

Please sign in to comment.