Skip to content

Commit a9900d8

Browse files
authored
chore: react-native 0.73 (#299)
## 📜 Description Updated RN version to 0.73. ## 💡 Motivation and Context To keep project up-to-date and assure that library can be integrated into newest RN versions. ## 📢 Changelog ### JS - use `@typescript-eslint/no-import-type-side-effects` as alternative to `importsNotUsedAsValues`; - re-worked example app for interactive ios keyboard (since `automaticallyAdjustKeyboardInsets` has changed behavior since RN 0.73) ## 🤔 How Has This Been Tested? Tested manually (both fabric & paper) on: - iPhone 15 Pro (iOS 17.2, simulator); - iPhone 11 (iOS 17.3, real device); - Pixel 7 Pro (Android 14, emulator); - Xiaomi Redmi note 5 Pro (Android 9, emulator). ## 📝 Checklist - [x] CI successfully passed
1 parent ac5e9a0 commit a9900d8

File tree

64 files changed

+9334
-9391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+9334
-9391
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module.exports = {
3535
"error",
3636
{ prefer: "type-imports" },
3737
],
38+
"@typescript-eslint/no-import-type-side-effects": "error",
3839
"@typescript-eslint/no-var-requires": "warn",
3940
// import
4041
"sort-imports": [

.github/workflows/build-ios-fabric.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
${{ runner.os }}-fabric-yarn-
4848
- name: Install node_modules for FabricExample/
4949
run: yarn install --frozen-lockfile --cwd ..
50+
- name: Install root dependencies
51+
run: yarn install --frozen-lockfile --cwd ../..
5052

5153
- name: Restore buildcache
5254
uses: mikehardy/buildcache-action@v2

.github/workflows/build-ios.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
${{ runner.os }}-yarn-
4646
- name: Install node_modules for example/
4747
run: yarn install --frozen-lockfile --cwd ..
48+
- name: Install root dependencies
49+
run: yarn install --frozen-lockfile --cwd ../..
4850

4951
- name: Restore buildcache
5052
uses: mikehardy/buildcache-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DerivedData
2828
*.ipa
2929
*.xcuserstate
3030
project.xcworkspace
31+
**/.xcode.env.local
3132

3233
# Android/IJ
3334
#

FabricExample/Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ 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.13'
7-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
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'

FabricExample/android/app/build.gradle

Lines changed: 3 additions & 6 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,6 +92,7 @@ def reactNativeArchitectures() {
9192
android {
9293
ndkVersion rootProject.ext.ndkVersion
9394

95+
buildToolsVersion rootProject.ext.buildToolsVersion
9496
compileSdkVersion rootProject.ext.compileSdkVersion
9597

9698
namespace "com.keyboardcontrollerfabricexample"
@@ -151,15 +153,10 @@ 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

155158
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156159

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-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
162-
163160
if (hermesEnabled.toBoolean()) {
164161
implementation("com.facebook.react:hermes-android")
165162
} else {

FabricExample/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>

FabricExample/android/app/src/debug/java/com/keyboardcontrollerfabricexample/ReactNativeFlipper.java

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

FabricExample/android/app/src/main/java/com/keyboardcontrollerfabricexample/MainActivity.java

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

0 commit comments

Comments
 (0)