File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
android/app/src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -150,10 +150,8 @@ private String getCustomPropertyFromStringsIfExist(String propertyName) {
150150 }
151151
152152 private boolean isLiveReloadEnabled (ReactInstanceManager instanceManager ) {
153- // Use instanceManager for checking if we use LiveReload mode. In this case we
154- // should not remove ReactNativeDevBundle.js file
155- // because we get error with trying to get this after reloading. Issue:
156- // https://github.com/microsoft/react-native-code-push/issues/1272
153+ // Use instanceManager for checking if we use LiveReload mode. In this case we should not remove ReactNativeDevBundle.js file
154+ // because we get error with trying to get this after reloading. Issue: https://github.com/microsoft/react-native-code-push/issues/1272
157155 if (instanceManager != null ) {
158156 DevSupportManager devSupportManager = instanceManager .getDevSupportManager ();
159157 if (devSupportManager != null ) {
@@ -176,8 +174,7 @@ private boolean isLiveReloadEnabled(ReactInstanceManager instanceManager) {
176174
177175 public void clearDebugCacheIfNeeded (ReactInstanceManager instanceManager ) {
178176 if (mIsDebugMode && mSettingsManager .isPendingUpdate (null ) && !isLiveReloadEnabled (instanceManager )) {
179- // This needs to be kept in sync with
180- // https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManager.java#L78
177+ // This needs to be kept in sync with https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManager.java#L78
181178 File cachedDevBundle = new File (mContext .getFilesDir (), "ReactNativeDevBundle.js" );
182179 if (cachedDevBundle .exists ()) {
183180 cachedDevBundle .delete ();
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ class RNAndroid extends Platform.Android implements RNPlatform {
9494 "include ':app'" ,
9595 "include ':app', ':react-native-code-push'\nproject(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')" ) ;
9696
97+ // Add CodePush to android/settings.gradle
98+ const settingsGradle = path . join ( innerprojectDirectory , "android" , "settings.gradle" ) ;
99+ TestUtil . replaceString ( settingsGradle ,
100+ "include ':app'" ,
101+ "include ':app', ':react-native-code-push'\nproject(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')" ) ;
102+
97103 //// Set the app version to 1.0.0 instead of 1.0
98104 // Set the app version to 1.0.0 in android/app/build.gradle
99105 TestUtil . replaceString ( buildGradle , "versionName \"1.0\"" , "versionName \"1.0.0\"" ) ;
You can’t perform that action at this time.
0 commit comments