From f9d6ac6bf86a718f7d85f8604a73aeb36bbebf22 Mon Sep 17 00:00:00 2001 From: Rahul Patel Date: Sat, 26 Apr 2025 19:08:05 +0530 Subject: [PATCH] add last commit hash to nightly build versions --- app/build.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 85ab8e9ad..f4864157f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -34,6 +34,10 @@ plugins { alias(libs.plugins.hilt.android.plugin) } +val lastCommitHash = providers.exec { + commandLine("git", "rev-parse", "--short", "HEAD") +}.standardOutput.asText.map { it.trim() } + kotlin { jvmToolchain(21) } @@ -95,6 +99,7 @@ android { register("nightly") { initWith(getByName("release")) applicationIdSuffix = ".nightly" + versionNameSuffix = "-${lastCommitHash.get()}" } debug {