From 86427a4c3ca868f3864793f38bf3f788662b0229 Mon Sep 17 00:00:00 2001 From: Sadwhy <99601717+Sadwhy@users.noreply.github.com> Date: Mon, 1 Apr 2024 11:15:24 +0600 Subject: [PATCH] Add CommitHash to Version Name :prayge: (#307) --- app/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index b4ab706b..12fc9b90 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,10 @@ plugins { id 'com.google.devtools.ksp' } +def gitCommitHash = providers.exec { + commandLine("git", "rev-parse", "--verify", "--short", "HEAD") +}.standardOutput.asText.get().trim() + android { compileSdk 34 @@ -38,7 +42,7 @@ android { buildTypes { alpha { applicationIdSuffix ".beta" // keep as beta by popular request - versionNameSuffix "-alpha01" + versionNameSuffix "-alpha01-" + gitCommitHash manifestPlaceholders.icon_placeholder = "@mipmap/ic_launcher_alpha" manifestPlaceholders.icon_placeholder_round = "@mipmap/ic_launcher_alpha_round" debuggable System.getenv("CI") == null