From e9c4f2133beddab05850489a826f970cd6cc01a4 Mon Sep 17 00:00:00 2001 From: n8fr8 Date: Wed, 13 Dec 2017 10:09:01 -0500 Subject: [PATCH] fix bug in gradle --- build.gradle | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 77b43a3e..84b7a8af 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { @@ -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" @@ -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() -} - +} \ No newline at end of file