Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 7f360e6

Browse files
committed
chore: react 18 and react native 69+ and all other dependencies are upgraded
1 parent 6d93035 commit 7f360e6

File tree

18 files changed

+8213
-5723
lines changed

18 files changed

+8213
-5723
lines changed

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -52,9 +53,10 @@ buck-out/
5253
# For more information about the recommended setup visit:
5354
# https://docs.fastlane.tools/best-practices/source-control/
5455

55-
*/fastlane/report.xml
56-
*/fastlane/Preview.html
57-
*/fastlane/screenshots
56+
**/fastlane/report.xml
57+
**/fastlane/Preview.html
58+
**/fastlane/screenshots
59+
**/fastlane/test_output
5860

5961
# Bundle artifact
6062
*.jsbundle

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
2.7.5

App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ LogBox.ignoreAllLogs();
1717
const App = () => {
1818
const scheme = useColorScheme();
1919
const isDarkMode = scheme === "dark";
20+
console.log("store: ", store);
2021

2122
React.useLayoutEffect(() => {
23+
console.log("store: ", store);
2224
initializeReduxService(store.dispatch, store.getState);
2325
});
2426

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.4'
4+
ruby '2.7.5'
55

66
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

android/app/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apply plugin: "com.android.application"
22
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
33

44
import com.android.build.OutputFile
5-
import org.apache.tools.ant.taskdefs.condition.Os
65

76
project.ext.react = [
87
enableHermes: false, // clean and rebuild if changing
@@ -49,17 +48,13 @@ android {
4948
"GENERATED_SRC_DIR=$buildDir/generated/source",
5049
"PROJECT_BUILD_DIR=$buildDir",
5150
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
52-
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build"
51+
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
52+
"NODE_MODULES_DIR=$rootDir/../node_modules"
5353
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
5454
cppFlags "-std=c++17"
5555
// Make sure this target name is the same you specify inside the
5656
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
5757
targets "rntypescriptboilerplate_appmodules"
58-
59-
// Fix for windows limit on number of character in file paths and in command lines
60-
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
61-
arguments "NDK_APP_SHORT_COMMANDS=true"
62-
}
6358
}
6459
}
6560
if (!enableSeparateBuildPerCPUArchitecture) {
@@ -188,9 +183,10 @@ dependencies {
188183
}
189184

190185
if (enableHermes) {
191-
def hermesPath = "../../node_modules/hermes-engine/android/";
192-
debugImplementation files(hermesPath + "hermes-debug.aar")
193-
releaseImplementation files(hermesPath + "hermes-release.aar")
186+
//noinspection GradleDynamicVersion
187+
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
188+
exclude group:'com.facebook.fbjni'
189+
}
194190
} else {
195191
implementation jscFlavor
196192
}
@@ -203,7 +199,11 @@ if (isNewArchitectureEnabled()) {
203199
configurations.all {
204200
resolutionStrategy.dependencySubstitution {
205201
substitute(module("com.facebook.react:react-native"))
206-
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
202+
.using(project(":ReactAndroid"))
203+
.because("On New Architecture we're building React Native from source")
204+
substitute(module("com.facebook.react:hermes-engine"))
205+
.using(project(":ReactAndroid:hermes-engine"))
206+
.because("On New Architecture we're building Hermes from source")
207207
}
208208
}
209209
}

android/app/src/main/java/com/rntypescriptboilerplate/MainActivity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ protected String getMainComponentName() {
2222

2323
/**
2424
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
25-
* you can specify the rendered you wish to use (Fabric or the older renderer).
25+
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
26+
* (Paper).
2627
*/
2728
@Override
2829
protected ReactActivityDelegate createReactActivityDelegate() {
@@ -41,5 +42,12 @@ protected ReactRootView createRootView() {
4142
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
4243
return reactRootView;
4344
}
45+
46+
@Override
47+
protected boolean isConcurrentRootEnabled() {
48+
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
49+
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
50+
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
51+
}
4452
}
4553
}

android/app/src/main/java/com/rntypescriptboilerplate/newarchitecture/MainApplicationReactNativeHost.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.facebook.react.fabric.ComponentFactory;
1818
import com.facebook.react.fabric.CoreComponentsRegistry;
1919
import com.facebook.react.fabric.EmptyReactNativeConfig;
20+
import com.facebook.react.fabric.ReactNativeConfig;
2021
import com.facebook.react.fabric.FabricJSIModuleProvider;
2122
import com.facebook.react.uimanager.ViewManagerRegistry;
2223
import com.rntypescriptboilerplate.BuildConfig;
@@ -105,7 +106,7 @@ public JSIModuleProvider<UIManager> getJSIModuleProvider() {
105106
return new FabricJSIModuleProvider(
106107
reactApplicationContext,
107108
componentFactory,
108-
new EmptyReactNativeConfig(),
109+
ReactNativeConfig.DEFAULT_CONFIG,
109110
viewManagerRegistry);
110111
}
111112
});

android/app/src/main/jni/Android.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
2828
LOCAL_SHARED_LIBRARIES := \
2929
libfabricjni \
3030
libfbjni \
31-
libfolly_futures \
32-
libfolly_json \
31+
libfolly_runtime \
3332
libglog \
3433
libjsi \
3534
libreact_codegen_rncore \

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ buildscript {
2222
mavenCentral()
2323
}
2424
dependencies {
25-
classpath("com.android.tools.build:gradle:7.0.4")
25+
classpath("com.android.tools.build:gradle:7.1.1")
2626
classpath("com.facebook.react:react-native-gradle-plugin")
27-
classpath("de.undercouch:gradle-download-task:4.1.2")
27+
classpath("de.undercouch:gradle-download-task:5.0.1")
2828
// NOTE: Do not place your application dependencies here; they belong
2929
// in the individual module build.gradle files
3030
}

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ includeBuild('../node_modules/react-native-gradle-plugin')
66
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
77
include(":ReactAndroid")
88
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
9+
include(":ReactAndroid:hermes-engine")
10+
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
911
}

0 commit comments

Comments
 (0)