Skip to content

Commit 12ca252

Browse files
authored
chore(deps): bump react-native to 0.73.x (#190)
1 parent 0d55190 commit 12ca252

File tree

23 files changed

+1576
-1148
lines changed

23 files changed

+1576
-1148
lines changed

packages/react-native/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ruby '2.7.5'
66
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
77
# bound in the template on Cocoapods with next React Native release.
88
gem 'cocoapods', '>= 1.13', '< 1.15'
9-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

packages/react-native/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ PLATFORMS
9595
ruby
9696

9797
DEPENDENCIES
98-
activesupport (>= 6.1.7.3, < 7.1.0)
98+
activesupport (>= 6.1.7.5, < 7.1.0)
9999
cocoapods (>= 1.13, < 1.15)
100100

101101
RUBY VERSION

packages/react-native/android/app/build.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
/**
@@ -70,8 +71,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7071

7172
android {
7273
ndkVersion rootProject.ext.ndkVersion
73-
74-
compileSdkVersion rootProject.ext.compileSdkVersion
74+
buildToolsVersion rootProject.ext.buildToolsVersion
75+
compileSdk rootProject.ext.compileSdkVersion
7576

7677
namespace "com.reactnative"
7778
defaultConfig {
@@ -106,13 +107,8 @@ android {
106107
dependencies {
107108
// The version of react-native is set by the React Native Gradle Plugin
108109
implementation("com.facebook.react:react-android")
110+
implementation("com.facebook.react:flipper-integration")
109111

110-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
111-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
112-
exclude group:'com.squareup.okhttp3', module:'okhttp'
113-
}
114-
115-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
116112
if (hermesEnabled.toBoolean()) {
117113
implementation("com.facebook.react:hermes-android")
118114
} else {

packages/react-native/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
75
<application
86
android:usesCleartextTraffic="true"
97
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

packages/react-native/android/app/src/debug/java/com/reactnative/ReactNativeFlipper.java

Lines changed: 0 additions & 73 deletions
This file was deleted.

packages/react-native/android/app/src/main/java/com/reactnative/MainActivity.java

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.reactnative;
2+
3+
import com.facebook.react.ReactActivity
4+
import com.facebook.react.ReactActivityDelegate
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate
7+
8+
class MainActivity : ReactActivity() {
9+
10+
/**
11+
* Returns the name of the main component registered from JavaScript. This is used to schedule
12+
* rendering of the component.
13+
*/
14+
override fun getMainComponentName(): String = "reactnative"
15+
16+
/**
17+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19+
*/
20+
override fun createReactActivityDelegate(): ReactActivityDelegate =
21+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22+
}

packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.reactnative
2+
3+
import android.app.Application
4+
import com.facebook.react.PackageList
5+
import com.facebook.react.ReactApplication
6+
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeHost
8+
import com.facebook.react.ReactPackage
9+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11+
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.flipper.ReactNativeFlipper
13+
import com.facebook.soloader.SoLoader
14+
15+
class MainApplication : Application(), ReactApplication {
16+
17+
override val reactNativeHost: ReactNativeHost =
18+
object : DefaultReactNativeHost(this) {
19+
override fun getPackages(): List<ReactPackage> =
20+
PackageList(this).packages.apply {
21+
// Packages that cannot be autolinked yet can be added manually here, for example:
22+
// add(MyReactNativePackage())
23+
}
24+
25+
override fun getJSMainModuleName(): String = "index"
26+
27+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
28+
29+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
30+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
31+
}
32+
33+
override val reactHost: ReactHost
34+
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
35+
36+
override fun onCreate() {
37+
super.onCreate()
38+
SoLoader.init(this, false)
39+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40+
// If you opted-in for the New Architecture, we load the native entry point for this app.
41+
load()
42+
}
43+
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
44+
}
45+
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
42
ext {
5-
buildToolsVersion = "33.0.0"
3+
buildToolsVersion = "34.0.0"
64
minSdkVersion = 21
7-
compileSdkVersion = 33
8-
targetSdkVersion = 33
9-
10-
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
11-
ndkVersion = "23.1.7779620"
5+
compileSdkVersion = 34
6+
targetSdkVersion = 34
7+
ndkVersion = "25.1.8937393"
8+
kotlinVersion = "1.8.0"
129
}
1310
repositories {
1411
google()
@@ -17,5 +14,8 @@ buildscript {
1714
dependencies {
1815
classpath("com.android.tools.build:gradle")
1916
classpath("com.facebook.react:react-native-gradle-plugin")
17+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
2018
}
2119
}
20+
21+
apply plugin: "com.facebook.react.rootproject"

packages/react-native/android/gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ android.useAndroidX=true
2424
# Automatically convert third-party libraries to use AndroidX
2525
android.enableJetifier=true
2626

27-
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.182.0
29-
3027
# Use this property to specify which architecture you want to build.
3128
# You can also override it from the CLI using
3229
# ./gradlew <task> -PreactNativeArchitectures=x86_64
@@ -41,4 +38,4 @@ newArchEnabled=false
4138

4239
# Use this property to enable or disable the Hermes JS engine.
4340
# If set to false, you will be using JSC instead.
44-
hermesEnabled=true
41+
hermesEnabled=true
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)