Skip to content

Commit

Permalink
Update Example app to RN 0.61 (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Oct 9, 2019
1 parent f5477eb commit 2d54b76
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 181 deletions.
2 changes: 1 addition & 1 deletion Example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ dependencies {
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'com.facebook.react:react-native:+' // From node_modules

def hermesPath = "../../node_modules/hermesvm/android/";
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends ReactActivity {

Expand All @@ -19,4 +22,14 @@ protected String getMainComponentName() {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
1 change: 1 addition & 0 deletions Example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ allprojects {
url "$rootDir/../node_modules/react-native/android"
}
jcenter()
maven { url 'https://jitpack.io' }
}
}

Expand Down
6 changes: 3 additions & 3 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"postinstall": "rm -rf node_modules/react-native-screens/{.git,node_modules,Example}"
},
"dependencies": {
"react": "16.5.1",
"react-native": "^0.60.5",
"react": "16.9.0",
"react-native": "^0.61.2",
"react-native-gesture-handler": "^1.0.12",
"react-native-screens": "file:..",
"react-navigation": "^3.0.8"
Expand All @@ -20,7 +20,7 @@
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.2",
"react-test-renderer": "16.5.1"
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
Expand Down

0 comments on commit 2d54b76

Please sign in to comment.