Add Dockerfile for an Android build environment

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2016-02-17 11:27:35 -08:00
parent e1898621c9
commit 8704daa5f8
3 changed files with 117 additions and 1 deletions

View File

@@ -163,7 +163,7 @@ android {
minSdkVersion 9
targetSdkVersion 22
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L"
buildConfigField "String", "TEXTSECURE_URL", "\"https://textsecure-service.whispersystems.org\""
buildConfigField "String", "USER_AGENT", "\"OWA\""
buildConfigField "String", "REDPHONE_MASTER_URL", "\"https://redphone-master.whispersystems.org\""
@@ -249,6 +249,18 @@ tasks.whenTaskAdded { task ->
}
}
def getLastCommitTimestamp() {
new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'git'
args = ['log', '-1', '--pretty=format:%ct']
standardOutput = os
}
return os.toString() + "000"
}
}
def Properties props = new Properties()
def propFile = new File('signing.properties')