chore(debug): git hash
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.kotlinAndroid)
|
||||
@@ -22,6 +24,12 @@ android {
|
||||
buildConfigField("String", "APPLICATION_ID", "\"${rootProject.ext["applicationId"]}\"")
|
||||
buildConfigField("long", "BUILD_TIMESTAMP", "${System.currentTimeMillis()}L")
|
||||
buildConfigField("String", "BUILD_HASH", "\"${rootProject.ext["buildHash"]}\"")
|
||||
val gitHash = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine("git", "rev-parse", "HEAD")
|
||||
standardOutput = gitHash
|
||||
}
|
||||
buildConfigField("String", "GIT_HASH", "\"${gitHash.toString(Charsets.UTF_8).trim()}\"")
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
||||
Reference in New Issue
Block a user