automatically append git hash to filename

This commit is contained in:
sk 2022-11-25 23:30:00 +01:00
parent 144fdd562f
commit 165255235b
1 changed files with 10 additions and 0 deletions

View File

@ -4,8 +4,18 @@ plugins {
}
android {
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
compileSdk 33
defaultConfig {
archivesBaseName = "upstream-${getGitHash()}"
applicationId "org.joinmastodon.android"
minSdk 23
targetSdk 33