Make build timestamp command compatible with old versions of Git.

This commit is contained in:
akwizgran
2018-05-21 13:40:14 +01:00
parent 4df335ebd3
commit d9d86206a6

View File

@@ -246,7 +246,7 @@ android {
buildConfigField "String", "GitHash",
"\"${getStdout(['git', 'rev-parse', '--short=7', 'HEAD'], 'No commit hash')}\""
buildConfigField "Long", "BuildTimestamp",
"${getStdout(['git', 'log', '-n', '1', '--date=unix', '--format=%cd'], 0)}000L"
"${getStdout(['git', 'log', '-n', '1', '--format=%ct'], 0)}000L"
}
buildTypes {