From a9b52602502f730096526c4fbbefeb32b412ee95 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 16 Aug 2021 12:13:52 +0200 Subject: [PATCH] fix: support for react-native 0.65 (#443) --- example/App.js | 27 --------------------------- example/ios/Podfile | 2 +- package.json | 4 ++-- scripts/set-react-version.js | 8 ++++++++ test-app.gradle | 2 +- 5 files changed, 12 insertions(+), 31 deletions(-) diff --git a/example/App.js b/example/App.js index 8cfe7546d..59c7f628d 100644 --- a/example/App.js +++ b/example/App.js @@ -52,21 +52,6 @@ const App = () => { backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, }; - const hermes = global.HermesInternal ? ( - - - Engine: Hermes - - - ) : null; - return ( @@ -75,7 +60,6 @@ const App = () => { style={backgroundStyle} >
- {hermes} { }; const styles = StyleSheet.create({ - engine: { - position: "absolute", - right: 0, - }, sectionContainer: { marginTop: 32, paddingHorizontal: 24, @@ -122,13 +102,6 @@ const styles = StyleSheet.create({ highlight: { fontWeight: "700", }, - footer: { - fontSize: 12, - fontWeight: "600", - padding: 4, - paddingRight: 12, - textAlign: "right", - }, }); export default App; diff --git a/example/ios/Podfile b/example/ios/Podfile index 62f6e91b9..03911b5f7 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -8,7 +8,7 @@ use_flipper!({ 'Flipper-RSocket' => '1.3.1', }) -use_test_app! do |target| +use_test_app! :hermes_enabled => false do |target| target.tests do pod 'Example-Tests', :path => '..' end diff --git a/package.json b/package.json index f17616b47..f797ce390 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "@react-native-community/cli-platform-android": ">=4.10.0", "@react-native-community/cli-platform-ios": ">=4.10.0", "mustache": "^4.0.0", - "react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1", - "react-native": "^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || 1000.0.0", + "react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2", + "react-native": "^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || ^0.65.0 || 1000.0.0", "react-native-macos": "^0.60.0 || ^0.61.0 || ^0.62.0 || ^0.63.0", "react-native-windows": "^0.62.0 || ^0.63.0 || ^0.64.0" }, diff --git a/scripts/set-react-version.js b/scripts/set-react-version.js index e3bc60af3..c19f0e56d 100755 --- a/scripts/set-react-version.js +++ b/scripts/set-react-version.js @@ -38,6 +38,14 @@ const profiles = { "react-native-macos": undefined, "react-native-windows": "^0.64.11", }, + 0.65: { + "hermes-engine": "~0.8.1", + react: "17.0.2", + "react-native": "^0.65.0-0", + "react-native-codegen": "0.0.7", + "react-native-macos": undefined, + "react-native-windows": undefined, + }, "canary-macos": { react: "16.13.1", "react-native": "^0.63.4", diff --git a/test-app.gradle b/test-app.gradle index bd25e406b..cdc37c23c 100644 --- a/test-app.gradle +++ b/test-app.gradle @@ -39,7 +39,7 @@ def cliAndroidDir = findNodeModulesPath(rootDir, "@react-native-community/cli-pl apply from: "$cliAndroidDir/native_modules.gradle" ext.applyTestAppSettings = { DefaultSettings defaultSettings -> - buildscript { scriptHandler -> + buildscript { scriptHandler -> apply from: "$scriptDir/android/force-resolve-trove4j.gradle", to: scriptHandler }