File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,18 @@ def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBu
8080 * this variant is about 6MiB larger per architecture than default.
8181 */
8282def jscFlavor = ' io.github.react-native-community:jsc-android:2026004.+'
83+ def googleMapsAndroidApiKey = ((System . getenv(" GOOGLE_MAPS_ANDROID_API_KEY" )
84+ ?: findProperty(" GOOGLE_MAPS_ANDROID_API_KEY" )
85+ ?: " " ) as String ). trim()
86+ def isReleaseBuildRequested = gradle. startParameter. taskNames. any { taskName ->
87+ taskName. toLowerCase(). contains(" release" )
88+ }
89+
90+ if (googleMapsAndroidApiKey. length() == 0 && isReleaseBuildRequested) {
91+ throw new GradleException (" [maps] Missing GOOGLE_MAPS_ANDROID_API_KEY for release build." )
92+ } else if (googleMapsAndroidApiKey. length() == 0 ) {
93+ println (" [maps] GOOGLE_MAPS_ANDROID_API_KEY is not set. Android debug MapView will fail until it is provided." )
94+ }
8395
8496def sentryOrg = (System . getenv(" SENTRY_ORG" ) ?: " " ). trim()
8597def sentryProject = (System . getenv(" SENTRY_PROJECT" ) ?: " " ). trim()
@@ -111,6 +123,7 @@ android {
111123 versionName " 1.0.0"
112124
113125 buildConfigField " String" , " REACT_NATIVE_RELEASE_LEVEL" , " \" ${ findProperty('reactNativeReleaseLevel') ?: 'stable'} \" "
126+ manifestPlaceholders + = [GOOGLE_MAPS_ANDROID_API_KEY : googleMapsAndroidApiKey]
114127 }
115128 signingConfigs {
116129 debug {
Original file line number Diff line number Diff line change 1414 </intent >
1515 </queries >
1616 <application android : name =" .MainApplication" android : label =" @string/app_name" android : icon =" @mipmap/ic_launcher" android : roundIcon =" @mipmap/ic_launcher_round" android : allowBackup =" true" android : theme =" @style/AppTheme" android : supportsRtl =" true" android : enableOnBackInvokedCallback =" false" >
17- <meta-data android : name =" com.google.android.geo.API_KEY" android : value =" AIzaSyD7A_gIoLZvyQ2t50uzwumFNWjCpX5zuZs " />
17+ <meta-data android : name =" com.google.android.geo.API_KEY" android : value =" ${GOOGLE_MAPS_ANDROID_API_KEY} " />
1818 <meta-data android : name =" expo.modules.updates.ENABLED" android : value =" true" />
1919 <meta-data android : name =" expo.modules.updates.EXPO_RUNTIME_VERSION" android : value =" @string/expo_runtime_version" />
2020 <meta-data android : name =" expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android : value =" ALWAYS" />
3434 </activity >
3535 <uses-library android : name =" org.apache.http.legacy" android : required =" false" />
3636 </application >
37- </manifest >
37+ </manifest >
Original file line number Diff line number Diff line change 55 },
66 "build" : {
77 "development" : {
8+ "environment" : " development" ,
89 "developmentClient" : true ,
910 "distribution" : " internal" ,
1011 "ios" : {
1112 "simulator" : true
1213 }
1314 },
1415 "preview" : {
16+ "environment" : " preview" ,
1517 "distribution" : " internal" ,
1618 "ios" : {
1719 "simulator" : false
1820 }
1921 },
2022 "production" : {
23+ "environment" : " production" ,
2124 "autoIncrement" : true
2225 }
2326 },
Original file line number Diff line number Diff line change 2020 "@react-native-async-storage/async-storage" : " ^2.2.0" ,
2121 "@react-navigation/native" : " ^7.1.28" ,
2222 "@react-navigation/native-stack" : " ^7.12.0" ,
23- "@sentry/react-native" : " ^8.0 .0" ,
23+ "@sentry/react-native" : " ^7.2 .0" ,
2424 "expo" : " ~54.0.33" ,
2525 "expo-location" : " ~19.0.8" ,
2626 "expo-notifications" : " ~0.32.16" ,
You can’t perform that action at this time.
0 commit comments