Fix non-git build, broken by gradle modernization (PR#3171)

This commit is contained in:
mcc 2023-02-10 15:22:32 -05:00
parent 15ff6191ae
commit 7f55204998

View file

@ -5,9 +5,19 @@ plugins {
alias(libs.plugins.kotlin.parcelize)
}
final def gitSha = providers.exec {
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
// For constructing gitSha
def getGitSha = {
def stdout = new ByteArrayOutputStream()
try {
providers.exec {
commandLine 'git', 'rev-parse', '--short=7', 'HEAD'
}.standardOutput.asText.get().trim()
} catch (Exception e) {
"unknown"
}
}
final def gitSha = getGitSha()
// The app name
final def APP_NAME = "Tusky"