From 165255235bff09b4fae1aacd64329d77c4271fcf Mon Sep 17 00:00:00 2001 From: sk Date: Fri, 25 Nov 2022 23:30:00 +0100 Subject: [PATCH] automatically append git hash to filename --- mastodon/build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 433ef2595..2736e9c59 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -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