diff --git a/app/build.gradle b/app/build.gradle index 303045455..d668052a5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,16 @@ apply plugin: 'witness' apply plugin: 'checkstyle' apply plugin: 'pmd' +/* 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' + standardOutput = stdout + } + return stdout.toString().trim().substring(1) +} + repositories { jcenter() } @@ -150,6 +160,7 @@ android { } defaultConfig { + versionName getVersionName() testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4551f1095..7978e0807 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,9 +2,7 @@ + android:versionCode="100007">