Include Commit ID in crash reports and feedback

This commit is contained in:
Torsten Grote
2016-12-13 15:41:57 -02:00
parent e7a26c42a4
commit 1c6be2fb78
2 changed files with 18 additions and 0 deletions

View File

@@ -62,6 +62,19 @@ dependencyVerification {
]
}
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
try {
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (Exception ignored) {
return "No commit hash"
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
@@ -70,6 +83,7 @@ android {
minSdkVersion 14
targetSdkVersion 22
resValue "string", "app_package", "org.briarproject.briar"
buildConfigField "String", "GitHash", "\"${getGitHash()}\""
}
buildTypes {