Skip to content

Commit 94c5cc5

Browse files
committed
Update to React Native 0.64
- Include react-native-tvos 0.64.2, update Reanimated and React Navigation - Use patch-package to apply tvOS patches for Reanimated and Screens packages - Make Android TV work
1 parent 78dc1c1 commit 94c5cc5

File tree

11 files changed

+2686
-2597
lines changed

11 files changed

+2686
-2597
lines changed

android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ import com.android.build.OutputFile
7777
* ]
7878
*/
7979

80+
// enableHermes should be true for using Reanimated
8081
project.ext.react = [
81-
enableHermes: false, // clean and rebuild if changing
82+
enableHermes: true, // clean and rebuild if changing
8283
]
8384

8485
apply from: "../../node_modules/react-native/react.gradle"

android/app/src/main/java/com/reactnavigationtvdemo/MainApplication.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
import java.lang.reflect.InvocationTargetException;
1212
import java.util.List;
1313

14+
import com.facebook.react.bridge.JSIModulePackage;
15+
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
16+
1417
public class MainApplication extends Application implements ReactApplication {
1518

1619
private final ReactNativeHost mReactNativeHost =
@@ -33,6 +36,11 @@ protected List<ReactPackage> getPackages() {
3336
protected String getJSMainModuleName() {
3437
return "index";
3538
}
39+
40+
@Override
41+
protected JSIModulePackage getJSIModulePackage() {
42+
return new ReanimatedJSIModulePackage(); // <- add
43+
}
3644
};
3745

3846
@Override

android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.3"
6-
minSdkVersion = 16
7-
compileSdkVersion = 28
8-
targetSdkVersion = 28
5+
buildToolsVersion = "29.0.2"
6+
minSdkVersion = 21
7+
compileSdkVersion = 29
8+
targetSdkVersion = 29
99
}
1010
repositories {
1111
google()
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath("com.android.tools.build:gradle:3.5.2")
15+
classpath("com.android.tools.build:gradle:3.5.3")
1616

1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
22
presets: ['module:metro-react-native-babel-preset'],
3+
plugins: [
4+
'react-native-reanimated/plugin'
5+
]
36
};

ios/Podfile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ target 'ReactNavigationTVDemo' do
1212

1313
use_react_native!(:path => config["reactNativePath"])
1414

15-
use_flipper_tvos!
16-
# If you want to use Flipper only for iOS, you can replace the line above with
17-
#
18-
# use_flipper!
19-
#
20-
# to pick up newer Flipper pods used in RN core 0.63.
21-
# They have not yet been adapted to work in tvOS.
22-
# use_flipper_tvos! works for both iOS and tvOS.
23-
2415
target 'ReactNavigationTVDemoTests' do
2516
inherit! :complete
2617
# Pods for testing
@@ -36,15 +27,9 @@ target 'ReactNavigationTVDemo-tvOS' do
3627

3728
use_react_native!(:path => config["reactNativePath"])
3829

39-
use_flipper_tvos!
40-
4130
target 'ReactNavigationTVDemo-tvOSTests' do
4231
inherit! :complete
4332
# Pods for testing
4433
end
4534

4635
end
47-
48-
post_install do |installer|
49-
flipper_post_install(installer)
50-
end

0 commit comments

Comments
 (0)