Updated on 2026-08-14

This commit is contained in:
Tangem 2018-06-04 13:14:41 +03:00
parent c64fb378ea
commit 1e4cb7b8f8
2 changed files with 6 additions and 19 deletions

Binary file not shown.

View file

@ -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"
}