@@ -74,29 +74,28 @@ project.ext {
74
74
75
75
apply from : file(" ./app-json.gradle" )
76
76
77
- def isManagedExpoProject = ! rootProject. file(" android" ). exists() && ! rootProject. file(" ios" ). exists()
78
77
def appJSONGoogleMobileAdsAppIDString = " "
79
78
def appJSONGoogleMobileAdsDelayAppMeasurementInitBool = false
80
79
def appJSONGoogleMobileAdsOptimizeInitializationBool = true
81
80
def appJSONGoogleMobileAdsOptimizeAdLoadingBool = true
82
81
83
- if (rootProject. ext. has(" googleMobileAdsJson" )) {
82
+ if (rootProject. ext. has(" googleMobileAdsJson" ) && rootProject . ext . googleMobileAdsJson ) {
84
83
appJSONGoogleMobileAdsAppIDString = rootProject. ext. googleMobileAdsJson. getStringValue(" android_app_id" , " " )
85
84
appJSONGoogleMobileAdsDelayAppMeasurementInitBool = rootProject. ext. googleMobileAdsJson. isFlagEnabled(" delay_app_measurement_init" , false )
86
85
appJSONGoogleMobileAdsOptimizeInitializationBool = rootProject. ext. googleMobileAdsJson. isFlagEnabled(" optimize_initialization" , true )
87
86
appJSONGoogleMobileAdsOptimizeAdLoadingBool = rootProject. ext. googleMobileAdsJson. isFlagEnabled(" optimize_ad_loading" , true )
88
87
}
89
88
90
- if (! appJSONGoogleMobileAdsAppIDString && ! isManagedExpoProject ) {
89
+ if (! appJSONGoogleMobileAdsAppIDString) {
91
90
println " \n\n\n "
92
91
println " **************************************************************************************************************"
93
92
println " \n\n\n "
94
- println " ERROR: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json."
95
- println " No android_app_id property was found in this location. The native Google Mobile Ads SDK will crash on startup without it."
93
+ println " WARNING: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json."
94
+ println " No android_app_id property was found in this location. The native Google Mobile Ads SDK will crash on startup without it."
95
+ println " You can safely ignore this warning if you are using our Expo config plugin."
96
96
println " \n\n\n "
97
97
println " **************************************************************************************************************"
98
98
println " \n\n\n "
99
- System . exit(1 )
100
99
}
101
100
102
101
android {
0 commit comments