Build: show version and tag in about page.

This commit is contained in:
Dennis Guse
2019-11-14 18:04:50 +01:00
parent 2940bf20d8
commit e391e83a00
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.5.2'
}
}
@@ -35,10 +35,14 @@ def getVersionName = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--dirty'
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
exec {
commandLine 'git', 'log', '--format="%h"', '-n 1'
standardOutput = stdout
}
return stdout.toString().replace('\n', '-').replace('"', '').trim()
}
catch (ignored) {
return null
@@ -75,10 +79,6 @@ android {
applicationVariants.all { variant ->
variant.resValue "string", "applicationId", variant.applicationId
}
lintOptions {
disable "AppCompatResource" // TODO Disable complaint to use androidx's SearchView as it is null.
}
}
dependencies {