Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
build: continous: Print gitHash into versionNameSuffix
Browse files Browse the repository at this point in the history
PS: git must be installed

Signed-off-by: Khusika Dhamar Gusti <mail@khusika.dev>
  • Loading branch information
khusika authored and theimpulson committed Jul 21, 2024
1 parent 0b4cf6d commit 36bfa71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ plugins {
id("com.google.dagger.hilt.android")
}

val gitHash: String
get() = project.providers.exec { commandLine("git", "rev-parse", "--short", "HEAD") }
.standardOutput.asText.get().trim()

android {
namespace = "io.aayush.relabs"
compileSdk = 34
Expand Down Expand Up @@ -47,6 +51,7 @@ android {
register("continuous") {
initWith(getByName("release"))
applicationIdSuffix = ".continuous"
versionNameSuffix = "-$gitHash"
signingConfig = signingConfigs.getByName("aosp")
}
release {
Expand Down

0 comments on commit 36bfa71

Please sign in to comment.