Skip to content

Commit 8101a95

Browse files
committed
- Update react-native 0.73.0
1 parent 1d3f809 commit 8101a95

File tree

15 files changed

+1347
-1239
lines changed

15 files changed

+1347
-1239
lines changed

android/app/build.gradle

Lines changed: 4 additions & 9 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
import com.android.build.OutputFile
@@ -91,7 +92,8 @@ def reactNativeArchitectures() {
9192
android {
9293
ndkVersion rootProject.ext.ndkVersion
9394

94-
compileSdkVersion rootProject.ext.compileSdkVersion
95+
buildToolsVersion rootProject.ext.buildToolsVersion
96+
compileSdk rootProject.ext.compileSdkVersion
9597

9698
namespace "com.react_native_movie"
9799
defaultConfig {
@@ -151,15 +153,8 @@ android {
151153
dependencies {
152154
// The version of react-native is set by the React Native Gradle Plugin
153155
implementation("com.facebook.react:react-android")
156+
implementation("com.facebook.react:flipper-integration")
154157

155-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156-
157-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
158-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
159-
exclude group:'com.squareup.okhttp3', module:'okhttp'
160-
}
161-
162-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
163158
if (hermesEnabled.toBoolean()) {
164159
implementation("com.facebook.react:hermes-android")
165160
} else {

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
<application
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
10+
tools:ignore="GoogleAppIndexingWarning"/>
1311
</manifest>

android/app/src/debug/java/com/react_native_movie/ReactNativeFlipper.java

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

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

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.react_native_movie;
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+
public 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 = "react_native_movie"
15+
16+
17+
/**
18+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
19+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
20+
*/
21+
override fun createReactActivityDelegate(): ReactActivityDelegate =
22+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
23+
}

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

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.react_native_movie;
2+
3+
4+
import android.app.Application
5+
import com.facebook.react.PackageList
6+
import com.facebook.react.ReactApplication
7+
import com.facebook.react.ReactHost
8+
import com.facebook.react.ReactNativeHost
9+
import com.facebook.react.ReactPackage
10+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
11+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
12+
import com.facebook.react.defaults.DefaultReactNativeHost
13+
import com.facebook.react.flipper.ReactNativeFlipper
14+
import com.facebook.soloader.SoLoader
15+
16+
public class MainApplication : Application(), ReactApplication {
17+
18+
override val reactNativeHost: ReactNativeHost =
19+
object : DefaultReactNativeHost(this) {
20+
override fun getPackages(): List<ReactPackage> {
21+
// Packages that cannot be autolinked yet can be added manually here, for example:
22+
// packages.add(new MyReactNativePackage());
23+
return PackageList(this).packages
24+
}
25+
26+
override fun getJSMainModuleName(): String = "index"
27+
28+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
29+
30+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
31+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
32+
}
33+
34+
override val reactHost: ReactHost
35+
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
36+
37+
override fun onCreate() {
38+
super.onCreate()
39+
SoLoader.init(this, false)
40+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
41+
// If you opted-in for the New Architecture, we load the native entry point for this app.
42+
load()
43+
}
44+
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
45+
}
46+
}

android/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ buildscript {
44
ext {
55
buildToolsVersion = "33.0.0"
66
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"
7+
compileSdkVersion = 34
8+
targetSdkVersion = 34
9+
ndkVersion = "25.1.8937393"
10+
kotlinVersion = "1.8.0"
1211
}
1312
repositories {
1413
google()
@@ -17,6 +16,9 @@ buildscript {
1716
dependencies {
1817
classpath("com.android.tools.build:gradle")
1918
classpath("com.facebook.react:react-native-gradle-plugin")
19+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
2020
}
2121
}
2222

23+
apply plugin: "com.facebook.react.rootproject"
24+
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

ios/react_native_movie.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,14 @@
595595
"-DFOLLY_MOBILE=1",
596596
"-DFOLLY_USE_LIBCPP=1",
597597
);
598+
OTHER_LDFLAGS = (
599+
"$(inherited)",
600+
"-Wl",
601+
"-ld_classic",
602+
);
598603
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
599604
SDKROOT = iphoneos;
605+
USE_HERMES = true;
600606
};
601607
name = Debug;
602608
};
@@ -660,8 +666,14 @@
660666
"-DFOLLY_MOBILE=1",
661667
"-DFOLLY_USE_LIBCPP=1",
662668
);
669+
OTHER_LDFLAGS = (
670+
"$(inherited)",
671+
"-Wl",
672+
"-ld_classic",
673+
);
663674
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
664675
SDKROOT = iphoneos;
676+
USE_HERMES = true;
665677
VALIDATE_PRODUCT = YES;
666678
};
667679
name = Release;

0 commit comments

Comments
 (0)