import { ConfigPlugin , createRunOncePlugin } from '@expo/config-plugins' ; import { withClassPath , withApplyPlugin , withGoogleServicesFile , } from '@expo/config-plugins/build/android/GoogleServices' ; import { withReactNativeBatchMainActivity } from './withReactNativeBatchMainActivity' ; import { withReactNativeBatchAppBuildGradle } from './withReactNativeBatchAppBuildGradle' ; import { withReactNativeBatchProjectBuildGradle } from './withReactNativeBatchProjectBuildGradle' ; export type Props = { apiKey : string ; } ; /**
 * Apply react-native-batch configuration for Expo SDK 42 projects.
 */ const withReactNativeBatch = ( config , props ) => { const _props = props || { apiKey : '' } ; let newConfig = withGoogleServicesFile ( config ) ; newConfig = withClassPath ( newConfig ) ; newConfig = withApplyPlugin ( newConfig ) ; newConfig = withReactNativeBatchAppBuildGradle ( newConfig , _props ) ; newConfig = withReactNativeBatchMainActivity ( newConfig ) ; newConfig = withReactNativeBatchProjectBuildGradle ( newConfig ) ; return newConfig ; } ; const pkg = { name : '@bam.tech/react-native-batch' , version : 'UNVERSIONED' , } ; export default createRunOncePlugin ( withReactNativeBatch , pkg . name , pkg . version ) ;