Skip to content

Commit

Permalink
fix bug in gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Dec 13, 2017
1 parent 63662da commit e9c4f21
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ buildscript {

}



/* gets the version name from the latest Git tag, stripping the leading v off */
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--always', '--abbrev=0'
standardOutput = stdout
}
return stdout.toString().trim()
}



apply plugin: 'com.android.application'

repositories {
Expand All @@ -22,7 +36,7 @@ repositories {
allprojects {
project.ext {
// these are common variables used in */build.gradle
version_number="0.0.18"
version_number=getVersionName()
group_info="haven"
signal_version="2.3.0"
buildToolsVersion="26.0.2"
Expand Down Expand Up @@ -112,15 +126,4 @@ dependencies {
transitive = true
}

}

/* gets the version name from the latest Git tag, stripping the leading v off */
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--always', '--abbrev=0'
standardOutput = stdout
}
return stdout.toString().trim()
}

}

0 comments on commit e9c4f21

Please sign in to comment.