Add CommitHash to Version Name :prayge: (#307)

This commit is contained in:
Sadwhy 2024-04-01 11:15:24 +06:00 committed by GitHub
parent 0d8a82568a
commit 86427a4c3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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