(config, props)
| 7 | } from '@expo/config-plugins/build/android/Manifest'; |
| 8 | |
| 9 | const withMapsAndroid: ConfigPlugin<ConfigPluginProps> = (config, props) => { |
| 10 | config = withAndroidManifest(config, async conf => { |
| 11 | const manifest = conf.modResults; |
| 12 | |
| 13 | const mainApplication = getMainApplicationOrThrow(manifest); |
| 14 | |
| 15 | if (props?.androidGoogleMapsApiKey) { |
| 16 | addMetaDataItemToMainApplication( |
| 17 | mainApplication, |
| 18 | 'com.google.android.geo.API_KEY', |
| 19 | props?.androidGoogleMapsApiKey, |
| 20 | ); |
| 21 | } else { |
| 22 | removeMetaDataItemFromMainApplication( |
| 23 | mainApplication, |
| 24 | 'com.google.android.geo.API_KEY', |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | return conf; |
| 29 | }); |
| 30 | |
| 31 | return config; |
| 32 | }; |
| 33 | |
| 34 | export default withMapsAndroid; |
no outgoing calls
no test coverage detected
searching dependent graphs…