Skip to content

Commit

Permalink
Merge pull request #2486 from airqo-platform/staging
Browse files Browse the repository at this point in the history
move to production
  • Loading branch information
Baalmart authored Feb 19, 2025
2 parents 8221352 + 76f5146 commit 9500fc4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions mobile-v3/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ if (googleMapApiKeyDev == null) {
throw new GradleException("Google Maps Dev Key not found. Define either google.maps.key.dev in key.properties or MAPS_API_KEY_DEV in secrets.properties")
}

def googlePlacesKey = appProperties.getProperty('google.places.key') ?: secrets.getProperty('PLACES_API_KEY')
if (googlePlacesKey == null) {
throw new GradleException("Google Places Key not found. Define either google.places.key in key.properties or PLACES_API_KEY in secrets.properties")
}

def googlePlacesKeyDev = appProperties.getProperty('google.places.key.dev') ?: secrets.getProperty('PLACES_API_KEY_DEV')
if (googlePlacesKeyDev == null) {
throw new GradleException("Google Places Dev Key not found. Define either google.places.key.dev in key.properties or PLACES_API_KEY_DEV in secrets.properties")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand Down Expand Up @@ -98,13 +108,19 @@ android {
productFlavors {
airqo {
dimension "airqo"
manifestPlaceholders = [googleMapsKey:googleMapApiKey]
manifestPlaceholders = [
googleMapsKey:googleMapApiKey,
googlePlacesKey: googlePlacesKey
]
}

airqodev {
dimension "airqo"
applicationIdSuffix ".dev"
manifestPlaceholders = [googleMapsKey:googleMapApiKeyDev]
manifestPlaceholders = [
googleMapsKey:googleMapApiKeyDev,
googlePlacesKey: googlePlacesKeyDev
]
}

}
Expand Down
2 changes: 1 addition & 1 deletion mobile-v3/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- Google Places API key -->
<meta-data
android:name="com.google.android.places.API_KEY"
android:value="${PLACES_API_KEY}" />
android:value="${googlePlacesKey}" />
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down

0 comments on commit 9500fc4

Please sign in to comment.