diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 947d8342ac..2bfe4eec8b 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/build.gradle b/app/build.gradle index f3bb3d51b2..3e4a26962e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,24 +2,11 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -//ext { -// git = org.ajoberstar.grgit.Grgit.open() -// gitVersionCode = git.tag.list().size() -// gitVersionName = "${git.describe()}" -//} - -def getVersionCode = { -> - try { - def code = new ByteArrayOutputStream() - exec { - commandLine 'git', 'tag', '--list' - standardOutput = code - } - return code.toString().split("\n").size() - } - catch (ignored) { - return -1; - } +static def generateVersionName() { + def gitCount = "git rev-list HEAD --count".execute().text.trim() +// def gitBranch = "git branch".execute().text.trim() +// return gitCount.toInteger() + 831 + " " + gitBranch + return gitCount.toInteger() + 831 } android { @@ -29,7 +16,7 @@ android { minSdkVersion 21 targetSdkVersion 27 versionCode 26 - versionName "0.85.5.831 " + getVersionCode + versionName "0.85.5." + generateVersionName() testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }