Skip to content

Commit 36c8753

Browse files
Upgrade to react native 0.76.9 (#3720)
* Upgrade to react native 0.76.9 Some errors in native code that I did not want to commit fixes just yet docuilib has issues (hopefully will be solved in 0.77.2 * Downgrading reanimated and gesture handler * Fix snapshot * Fix TS --------- Co-authored-by: Inbal Tish <[email protected]>
1 parent c652748 commit 36c8753

File tree

30 files changed

+2205
-1731
lines changed

30 files changed

+2205
-1731
lines changed

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DerivedData
2121
*.ipa
2222
*.xcuserstate
2323
project.xcworkspace
24-
ios/.xcode.env.local
24+
**/.xcode.env.local
2525

2626
# Android/IntelliJ
2727
#
@@ -43,11 +43,17 @@ expoDemo/android/gradlew.bat
4343
node_modules/
4444
npm-debug.log
4545

46-
# yarn
46+
# Yarn
47+
.yarn/*
4748
yarn-error.log
4849
**/.yarn/cache
4950
**/.yarn/install-state.gz
5051
**/.yarn/yarn.build.json
52+
!.yarn/patches
53+
!.yarn/plugins
54+
!.yarn/releases
55+
!.yarn/sdks
56+
!.yarn/versions
5157

5258
.vscode
5359

@@ -74,7 +80,7 @@ docs/components/**
7480
!scripts/build
7581

7682
# Ruby / CocoaPods
77-
/ios/Pods/
83+
**/Pods/
7884
/vendor/bundle/
7985
/ios/Podfile.lock
8086
expoDemo/ios/Pods

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7-
# bound in the template on Cocoapods with next React Native release.
8-
gem 'cocoapods', '>= 1.13', '< 1.15'
9-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'
1011

android/app/build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ apply plugin: "com.facebook.react"
1313
*/
1414
react {
1515
/* Folders */
16-
// The root of your project, i.e. where "package.json" lives. Default is '..'
16+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
1717
root = file("../../")
18-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
18+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
1919
reactNativeDir = file("../../node_modules/react-native")
20-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
21-
// codegenDir = file("../node_modules/@react-native/codegen")
22-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
23-
// cliFile = file("../node_modules/react-native/cli.js")
20+
// reactNativeDir = file("../../node_modules/react-native")
21+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
22+
// codegenDir = file("../../node_modules/@react-native/codegen")
23+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
24+
// cliFile = file("../../node_modules/react-native/cli.js")
25+
2426
/* Variants */
2527
// The list of variants to that are debuggable. For those we're going to
2628
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
@@ -51,6 +53,8 @@ react {
5153
//
5254
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5355
// hermesFlags = ["-O", "-output-source-map"]
56+
57+
/* Autolinking */
5458
autolinkLibrariesWithApp()
5559
}
5660

@@ -122,7 +126,6 @@ android {
122126
dependencies {
123127
// The version of react-native is set by the React Native Gradle Plugin
124128
implementation("com.facebook.react:react-android")
125-
implementation("com.facebook.react:flipper-integration:0.73.9")
126129

127130
implementation project(':react-native-navigation')
128131
implementation 'com.facebook.fresco:fresco:2.5.0'
@@ -135,4 +138,3 @@ dependencies {
135138
}
136139
}
137140

138-
// apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/AppTheme"
12+
android:supportsRtl="true">
1213
<activity
1314
android:name=".MainActivity"
1415
android:label="@string/app_name"

android/app/src/main/java/com/rnuilib/MainApplication.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12-
import com.facebook.react.flipper.ReactNativeFlipper
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1313
import com.facebook.soloader.SoLoader
1414
import com.reactnativenavigation.NavigationApplication
1515
import com.wix.reactnativeuilib.UiLibPackageList;
@@ -35,15 +35,14 @@ class MainApplication : NavigationApplication() {
3535
}
3636

3737
override val reactHost: ReactHost
38-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
38+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
3939

4040
override fun onCreate() {
4141
super.onCreate()
42-
SoLoader.init(this, false)
42+
SoLoader.init(this, OpenSourceMergedSoMapping)
4343
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4444
// If you opted-in for the New Architecture, we load the native entry point for this app.
4545
load()
4646
}
47-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
4847
}
4948
}

android/app/src/main/java/com/rnuilib/MainApplicationReactNativeHost.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,9 @@
22
import android.app.Application;
33
import androidx.annotation.NonNull;
44
import com.facebook.react.PackageList;
5-
import com.facebook.react.ReactInstanceManager;
65
import com.facebook.react.ReactNativeHost;
76
import com.facebook.react.ReactPackage;
87
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
9-
import com.facebook.react.bridge.JSIModulePackage;
10-
import com.facebook.react.bridge.JSIModuleProvider;
11-
import com.facebook.react.bridge.JSIModuleSpec;
12-
import com.facebook.react.bridge.JSIModuleType;
13-
import com.facebook.react.bridge.JavaScriptContextHolder;
14-
import com.facebook.react.bridge.ReactApplicationContext;
15-
import com.facebook.react.bridge.UIManager;
16-
import com.facebook.react.fabric.ComponentFactory;
17-
import com.facebook.react.fabric.CoreComponentsRegistry;
18-
import com.facebook.react.fabric.EmptyReactNativeConfig;
19-
import com.facebook.react.fabric.FabricJSIModuleProvider;
20-
import com.facebook.react.uimanager.ViewManagerRegistry;
21-
import com.rnuilib.BuildConfig;
22-
import java.util.ArrayList;
238
import java.util.List;
249
/**
2510
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
@@ -59,43 +44,4 @@ protected String getJSMainModuleName() {
5944
// for the new architecture and to use TurboModules correctly.
6045
return new MainApplicationTurboModuleManagerDelegate.Builder();
6146
}
62-
@Override
63-
protected JSIModulePackage getJSIModulePackage() {
64-
return new JSIModulePackage() {
65-
@Override
66-
public List<JSIModuleSpec> getJSIModules(
67-
final ReactApplicationContext reactApplicationContext,
68-
final JavaScriptContextHolder jsContext) {
69-
final List<JSIModuleSpec> specs = new ArrayList<>();
70-
// Here we provide a new JSIModuleSpec that will be responsible of providing the
71-
// custom Fabric Components.
72-
specs.add(
73-
new JSIModuleSpec() {
74-
@Override
75-
public JSIModuleType getJSIModuleType() {
76-
return JSIModuleType.UIManager;
77-
}
78-
@Override
79-
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
80-
final ComponentFactory componentFactory = new ComponentFactory();
81-
CoreComponentsRegistry.register(componentFactory);
82-
// Here we register a Components Registry.
83-
// The one that is generated with the template contains no components
84-
// and just provides you the one from React Native core.
85-
MainComponentsRegistry.register(componentFactory);
86-
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
87-
ViewManagerRegistry viewManagerRegistry =
88-
new ViewManagerRegistry(
89-
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
90-
return new FabricJSIModuleProvider(
91-
reactApplicationContext,
92-
componentFactory,
93-
new EmptyReactNativeConfig(),
94-
viewManagerRegistry);
95-
}
96-
});
97-
return specs;
98-
}
99-
};
100-
}
10147
}

android/app/src/main/res/drawable/rn_edit_text_material.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
1515
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
1616
android:insetTop="@dimen/abc_edit_text_inset_top_material"
17-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
17+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
18+
>
1819
<selector>
1920
<!--
2021
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).

android/build.gradle

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

33
buildscript {
44
ext {
5-
buildToolsVersion = "34.0.0"
5+
buildToolsVersion = "35.0.0"
66
minSdkVersion = 26
7-
compileSdkVersion = 34
7+
compileSdkVersion = 35
88
targetSdkVersion = 34
9-
RNNKotlinVersion = "1.8.22"
10-
ndkVersion = "25.1.8937393"
9+
ndkVersion = "26.1.10909125"
10+
RNNKotlinVersion = "1.9.25"
1111
}
1212
repositories {
1313
mavenLocal()

android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
1818
# org.gradle.parallel=true
1919

2020
android.useAndroidX=true
21-
android.enableJetifier=true
2221

2322
# Use this property to specify which architecture you want to build.
2423
# You can also override it from the CLI using

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)