1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-09-10 18:59:42 +02:00

Fix secondlion BuildConfig, githash

This commit is contained in:
Gregor Santner 2018-03-05 23:37:24 +01:00
parent 07acb6bd02
commit 5921549a9c
7 changed files with 48 additions and 23 deletions

View file

@ -63,7 +63,7 @@ task copyRepoFiles(type: Copy) {
@SuppressWarnings(["UnnecessaryQualifiedReference", "SpellCheckingInspection", "GroovyUnusedDeclaration"])
// Returns used android languages as a buildConfig array: {'de', 'it', ..}"
static String getUsedAndroidLanguages() {
static String findUsedAndroidLocales() {
Set<String> langs = new HashSet<>()
new File('.').eachFileRecurse(groovy.io.FileType.DIRECTORIES) {
final foldername = it.name
@ -80,12 +80,13 @@ static String getUsedAndroidLanguages() {
ext.getGitHash = { ->
try {
def stdout = new ByteArrayOutputStream() exec {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (Exception e) {
return '???'
} catch (Exception ignored) {
return 'unknown'
}
}