mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-16 11:42:16 -04:00
gradle: Suffix last git commit's hash into versionName
* Only for debug and nightlies Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -37,6 +37,10 @@ kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
val gitHash: String
|
||||
get() = project.providers.exec { commandLine("git", "rev-parse", "--short", "HEAD") }
|
||||
.standardOutput.asText.get().trim()
|
||||
|
||||
android {
|
||||
namespace = "com.aurora.store"
|
||||
compileSdk = 35
|
||||
@@ -92,11 +96,13 @@ android {
|
||||
register("nightly") {
|
||||
initWith(getByName("release"))
|
||||
applicationIdSuffix = ".nightly"
|
||||
versionNameSuffix = "-$gitHash"
|
||||
}
|
||||
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
signingConfig = signingConfigs.getByName("aosp")
|
||||
versionNameSuffix = "-$gitHash"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user