Skip to content

Commit e236b54

Browse files
author
Crusty
committed
refactor (ya late :D )
1 parent 15c49b9 commit e236b54

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

app/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ android {
99
compileSdkVersion 31
1010
buildToolsVersion "30.0.3"
1111

12+
def localProperties = new Properties()
13+
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
14+
1215
defaultConfig {
1316
applicationId "cz.crusty.aircrafter"
1417
minSdkVersion 23
@@ -17,6 +20,8 @@ android {
1720
versionName "1.0"
1821

1922
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
23+
24+
manifestPlaceholders.MAPS_API_KEY = localProperties['mapsApiKey']
2025
}
2126

2227
buildTypes {

app/src/debug/res/values/google_maps_api.xml

-24
This file was deleted.

app/src/main/AndroidManifest.xml

+1-9
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,9 @@
1818
android:supportsRtl="true"
1919
android:theme="@style/Theme.Aircrafter">
2020

21-
<!--
22-
The API key for Google Maps-based APIs is defined as a string resource.
23-
(See the file "res/values/google_maps_api.xml").
24-
Note that the API key is linked to the encryption key used to sign the APK.
25-
You need a different API key for each encryption key, including the release key that is used to
26-
sign the APK for publishing.
27-
You can define the keys for the debug and release targets in src/debug/ and src/release/.
28-
-->
2921
<meta-data
3022
android:name="com.google.android.geo.API_KEY"
31-
android:value="@string/google_maps_key" />
23+
android:value="${MAPS_API_KEY}" />
3224

3325
<activity
3426
android:name=".MapsActivity"

0 commit comments

Comments
 (0)