Skip to content

Commit 1e42471

Browse files
committed
update react-native version and packages, update changelog.md
1 parent f843acd commit 1e42471

23 files changed

+2217
-1374
lines changed

Gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ 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-
gem 'cocoapods', '~> 1.12'
6+
gem 'cocoapods', '~> 1.13'
7+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

android/app/build.gradle

+7-11
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
/**
@@ -66,7 +67,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
6667

6768
android {
6869
ndkVersion rootProject.ext.ndkVersion
69-
compileSdkVersion rootProject.ext.compileSdkVersion
70+
buildToolsVersion rootProject.ext.buildToolsVersion
71+
compileSdk rootProject.ext.compileSdkVersion
7072
namespace "com.reactnativestarter"
7173
// compileOptions {
7274
// sourceCompatibility JavaVersion.VERSION_1_8
@@ -81,9 +83,9 @@ android {
8183
versionName "1.0"
8284
multiDexEnabled true
8385
}
84-
dexOptions {
85-
javaMaxHeapSize "4g"
86-
}
86+
// dexOptions {
87+
// javaMaxHeapSize "4g"
88+
// }
8789
signingConfigs {
8890
debug {
8991
storeFile file('debug.keystore')
@@ -109,14 +111,8 @@ android {
109111
dependencies {
110112
// The version of react-native is set by the React Native Gradle Plugin
111113
implementation("com.facebook.react:react-android")
112-
// compile 'com.android.support:multidex:1.0.0'
113-
114-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
115-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
116-
exclude group:'com.squareup.okhttp3', module:'okhttp'
117-
}
114+
implementation("com.facebook.react:flipper-integration")
118115

119-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
120116
if (hermesEnabled.toBoolean()) {
121117
implementation("com.facebook.react:hermes-android")
122118
} else {

android/app/src/debug/AndroidManifest.xml

+1-5
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>

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

-75
This file was deleted.

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

-32
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.reactnativestarter
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.
12+
* This is used to schedule rendering of the component.
13+
*/
14+
override fun getMainComponentName(): String = "ReactNativeStarter"
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+
}

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

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

android/app/src/release/java/com/reactnativestarter/ReactNativeFlipper.java

-20
This file was deleted.

android/build.gradle

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "33.0.0"
6-
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+
buildToolsVersion = "34.0.0"
6+
minSdkVersion = 21
7+
compileSdkVersion = 34
8+
targetSdkVersion = 34
9+
ndkVersion = "25.1.8937393"
10+
kotlinVersion = "1.8.0"
1211
}
1312
repositories {
1413
google()
@@ -17,6 +16,7 @@ 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

@@ -25,3 +25,6 @@ subprojects { subproject ->
2525
project.configurations { compile { } }
2626
}
2727
}
28+
29+
30+
apply plugin: "com.facebook.react.rootproject"

android/gradle.properties

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
1919
android.useAndroidX=true
2020
android.enableJetifier=true
2121

22-
# Version of flipper SDK to use with React Native
23-
FLIPPER_VERSION=0.182.0
2422
# Use this property to specify which architecture you want to build.
2523
# You can also override it from the CLI using
2624
# ./gradlew <task> -PreactNativeArchitectures=x86_64
2.1 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
66
networkTimeout=10000
7+
validateDistributionUrl=true

0 commit comments

Comments
 (0)