Skip to content

Commit

Permalink
Merge pull request #2489 from airqo-platform/staging
Browse files Browse the repository at this point in the history
move to production
  • Loading branch information
Baalmart authored Feb 20, 2025
2 parents 9500fc4 + bd111b5 commit cb1f7d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
19 changes: 8 additions & 11 deletions mobile-v3/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ if (appPropertiesFile.exists()) {
}
}

def secretsProperties = new Properties()
def secretsPropertiesFile = rootProject.file('secrets.properties')
if (secretsPropertiesFile.exists()) {
secretsPropertiesFile.withReader('UTF-8') { reader ->
secretsProperties.load(reader)
}
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -49,15 +57,6 @@ 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) {
Expand Down Expand Up @@ -110,7 +109,6 @@ android {
dimension "airqo"
manifestPlaceholders = [
googleMapsKey:googleMapApiKey,
googlePlacesKey: googlePlacesKey
]
}

Expand All @@ -119,7 +117,6 @@ android {
applicationIdSuffix ".dev"
manifestPlaceholders = [
googleMapsKey:googleMapApiKeyDev,
googlePlacesKey: googlePlacesKeyDev
]
}

Expand Down
5 changes: 0 additions & 5 deletions mobile-v3/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
<!-- TODO: Add your Google Maps API key here -->
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="${googleMapsKey}" />

<!-- Google Places API key -->
<meta-data
android:name="com.google.android.places.API_KEY"
android:value="${googlePlacesKey}" />
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
5 changes: 4 additions & 1 deletion mobile-v3/android/local.defaults.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
MAPS_API_KEY=DEFAULT_API_KEY
MAPS_API_KEY=DEFAULT_API_KEY
MAPS_API_KEY_DEV=DEFAULT_API_KEY
PLACES_API_KEY=DEFAULT_API_KEY
PLACES_API_KEY_DEV=DEFAULT_API_KEY

0 comments on commit cb1f7d0

Please sign in to comment.