Skip to content

Commit 929e1c6

Browse files
authored
Merge pull request #7 from flatlogic/migrate-to-rn-0.73.1
update rn version and packages, update changelog.md
2 parents 935ea3c + 8c68132 commit 929e1c6

File tree

29 files changed

+2825
-2040
lines changed

29 files changed

+2825
-2040
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
source 'https://rubygems.org'
22
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
33
ruby ">= 2.6.10"
4-
gem 'cocoapods', '~> 1.11.3'
4+
gem 'cocoapods', '~> 1.13'
5+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

android/app/build.gradle

Lines changed: 8 additions & 10 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
/**
@@ -65,13 +66,15 @@ def enableProguardInReleaseBuilds = false
6566
def jscFlavor = 'org.webkit:android-jsc:+'
6667

6768
android {
69+
ndkVersion rootProject.ext.ndkVersion
70+
buildToolsVersion rootProject.ext.buildToolsVersion
6871
compileSdk rootProject.ext.compileSdkVersion
6972
namespace "com.reactnativestarter.upd"
7073

71-
compileOptions {
72-
sourceCompatibility JavaVersion.VERSION_1_8
73-
targetCompatibility JavaVersion.VERSION_1_8
74-
}
74+
// compileOptions {
75+
// sourceCompatibility JavaVersion.VERSION_1_8
76+
// targetCompatibility JavaVersion.VERSION_1_8
77+
// }
7578
signingConfigs {
7679
debug {
7780
storeFile file('debug.keystore')
@@ -110,13 +113,8 @@ android {
110113
dependencies {
111114
// The version of react-native is set by the React Native Gradle Plugin
112115
implementation("com.facebook.react:react-android")
113-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
116+
implementation("com.facebook.react:flipper-integration")
114117

115-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
116-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
117-
exclude group:'com.squareup.okhttp3', module:'okhttp'
118-
}
119-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
120118
if (hermesEnabled.toBoolean()) {
121119
implementation("com.facebook.react:hermes-android")
122120
} else {
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
3+
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning">
8-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
9-
</application>
5+
<application
6+
android:usesCleartextTraffic="true"
7+
tools:targetApi="28"
8+
tools:ignore="GoogleAppIndexingWarning"/>
109
</manifest>

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

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

android/app/src/main/AndroidManifest.xml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,22 @@
33
<uses-permission android:name="android.permission.INTERNET" />
44

55
<application
6-
android:name=".MainApplication"
7-
android:label="@string/app_name"
8-
android:icon="@mipmap/ic_launcher"
9-
android:roundIcon="@mipmap/ic_launcher_round"
10-
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
12-
<activity
13-
android:name=".MainActivity"
14-
android:label="@string/app_name"
15-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16-
android:windowSoftInputMode="adjustResize"
17-
android:exported="true">
18-
<intent-filter>
19-
<action android:name="android.intent.action.MAIN" />
20-
<category android:name="android.intent.category.LAUNCHER" />
21-
</intent-filter>
22-
</activity>
23-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
6+
android:name=".MainApplication"
7+
android:label="@string/app_name"
8+
android:icon="@mipmap/ic_launcher"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:allowBackup="false"
11+
android:theme="@style/AppTheme">
12+
<activity
13+
android:name=".MainActivity"
14+
android:label="@string/app_name"
15+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16+
android:windowSoftInputMode="adjustResize"
17+
android:exported="true">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
2423
</application>
25-
2624
</manifest>

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

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.reactnativestarter.upd
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+
import android.os.Bundle;
8+
9+
class MainActivity : ReactActivity() {
10+
11+
/**
12+
* Returns the name of the main component registered from JavaScript.
13+
* This is used to schedule rendering of the component.
14+
*/
15+
override fun getMainComponentName(): String = "ReactNativeStarter"
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+
24+
/**
25+
* react-native-screens override
26+
*/
27+
override fun onCreate(savedInstanceState: Bundle?) {
28+
super.onCreate(null);
29+
}
30+
}

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

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.reactnativestarter.upd
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+
// Packages that cannot be autolinked yet can be added manually here, for example:
21+
// packages.add(new MyReactNativePackage());
22+
return PackageList(this).packages
23+
}
24+
override fun getJSMainModuleName(): String = "index"
25+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
26+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
27+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
28+
}
29+
30+
override val reactHost: ReactHost
31+
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
32+
33+
override fun onCreate() {
34+
super.onCreate()
35+
SoLoader.init(this, false)
36+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
37+
// If you opted-in for the New Architecture, we load the native entry point for this app.
38+
load()
39+
}
40+
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
41+
}
42+
}

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

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

0 commit comments

Comments
 (0)