Make maps key externally configurable.

fork-5.53.8
Cody Henthorne 2022-08-04 13:21:11 -04:00
rodzic 83b97d274f
commit ace4157a14
3 zmienionych plików z 14 dodań i 1 usunięć

1
.gitignore vendored
Wyświetl plik

@ -27,3 +27,4 @@ obj/
jni/libspeex/.deps/
pkcs11.password
dev.keystore
maps.key

Wyświetl plik

@ -171,6 +171,8 @@ android {
vectorDrawables.useSupportLibrary = true
project.ext.set("archivesBaseName", "Signal");
manifestPlaceholders = [mapsKey:"AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"]
buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L"
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
buildConfigField "String", "SIGNAL_URL", "\"https://chat.signal.org\""
@ -263,6 +265,8 @@ android {
testProguardFiles 'proguard/proguard-automation.pro',
'proguard/proguard.cfg'
manifestPlaceholders = [mapsKey:getMapsKey()]
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Debug\""
}
@ -637,3 +641,11 @@ def getDateSuffix() {
def formattedDate = date.format('yyyy-MM-dd-HH:mm')
return formattedDate
}
def getMapsKey() {
def mapKey = file("${project.rootDir}/maps.key")
if (mapKey.exists()) {
return mapKey.readLines()[0]
}
return "AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"
}

Wyświetl plik

@ -109,7 +109,7 @@
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"/>
android:value="${mapsKey}"/>
<meta-data android:name="android.supports_size_changes"
android:value="true" />