Skip to content

Commit f702758

Browse files
kligarskikkafar
andauthored
feat: add support for react-native@0.78.0 (#2749)
## Description Adding support for `react-native@0.78.0`. ## Changes - adjusted example apps (Android, iOS) on both architectures (Paper, Fabric) with changes from upgrade helper, - added additional fixes (android, ios, cpp) from 4.x (#2626), - updated dependencies, gradle of the library: - uncommented `syncArchs` task, because updating `react-native` version of the library fixed the problem with codegen, - fixed issue connected with Gesture Handler: - #2618, - updated TVOS example app (from 0.74.1) to match example app from 4.x and Android, iOS apps, - fixed a bug with `replaceNavigationBarViewsWithSnapshotOfSubview` method by adding a nil check: - adapted from #2485, - restoring backward compatibility: - #2730, - #2737. ## Test code and steps to reproduce CI ## Checklist - [ ] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
1 parent 5bd9188 commit f702758

File tree

81 files changed

+9070
-8222
lines changed

Some content is hidden

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

81 files changed

+9070
-8222
lines changed

.github/workflows/android-e2e-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ jobs:
5353
working-directory: ${{ env.WORKING_DIRECTORY }}
5454
run: yarn
5555
- name: Install AVD dependencies
56+
# libxkbfile1 is removed by "Free Disk Space (Ubuntu)" step first. Here we install it again
57+
# as it seems to be needed by the emulator.
5658
run: |
5759
sudo apt update
58-
sudo apt-get install -y libpulse0 libgl1
60+
sudo apt-get install -y libpulse0 libgl1 libxkbfile1
5961
- name: Build app
6062
working-directory: ${{ env.WORKING_DIRECTORY }}
6163
run: yarn build-e2e-android

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Use latest stable Xcode
3838
uses: maxim-lobanov/setup-xcode@v1
3939
with:
40-
xcode-version: latest-stable
40+
xcode-version: '16.1'
4141
- name: Install node dependencies
4242
working-directory: ${{ env.WORKING_DIRECTORY }}
4343
run: yarn

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Use latest stable Xcode
3636
uses: maxim-lobanov/setup-xcode@v1
3737
with:
38-
xcode-version: latest-stable
38+
xcode-version: '16.1'
3939
- name: Install node dependencies
4040
working-directory: ${{ env.WORKING_DIRECTORY }}
4141
run: yarn

.github/workflows/ios-e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Use latest stable Xcode
3434
uses: maxim-lobanov/setup-xcode@v1
3535
with:
36-
xcode-version: latest-stable
36+
xcode-version: '16.1'
3737
- name: Get Xcode version
3838
run: xcodebuild -version
3939
- name: Install AppleSimulatorUtils

Example/.detoxrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
simulator: {
4343
type: 'ios.simulator',
4444
device: {
45-
type: 'iPhone 14',
45+
type: 'iPhone 15',
4646
},
4747
},
4848
attached: {

Example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#

Example/android/app/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ def enableProguardInReleaseBuilds = false
6363
* The preferred build flavor of JavaScriptCore (JSC)
6464
*
6565
* For example, to use the international variant, you can use:
66-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
66+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
6767
*
6868
* The international variant includes ICU i18n library and necessary data
6969
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
7070
* give correct results when using with locales other than en-US. Note that
7171
* this variant is about 6MiB larger per architecture than default.
7272
*/
73-
def jscFlavor = 'org.webkit:android-jsc:+'
73+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
7474

7575
android {
7676
ndkVersion rootProject.ext.ndkVersion
@@ -139,11 +139,11 @@ dependencies {
139139

140140
apply plugin: 'com.github.node-gradle.node'
141141

142-
//task syncArchs(type: NodeTask) {
143-
// group = 'Build'
144-
// description = 'Run sync beetwen Paper and Fabric arch'
145-
// yarn_install
146-
// script = file('../../../scripts/codegen-sync-archs.js')
147-
//}
148-
//
149-
//tasks['preBuild'].dependsOn(syncArchs)
142+
task syncArchs(type: NodeTask) {
143+
group = 'Build'
144+
description = 'Run sync beetwen Paper and Fabric arch'
145+
yarn_install
146+
script = file('../../../scripts/codegen-sync-archs.js')
147+
}
148+
149+
tasks['preBuild'].dependsOn(syncArchs)

Example/android/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
buildToolsVersion = "35.0.0"
44
minSdkVersion = 24
55
compileSdkVersion = 35
6-
targetSdkVersion = 34
6+
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
88
kotlinVersion = "2.0.21"
99
}
@@ -34,3 +34,10 @@ allprojects {
3434
}
3535

3636
apply plugin: "com.facebook.react.rootproject"
37+
38+
// Custom configuration. This is done in order to simplify process
39+
// of upgrading the wrapper, eliminating necessity to manually specify CLI options
40+
// to ensure that we use distribution of type `ALL`.
41+
tasks.named("wrapper") {
42+
it.distributionType = Wrapper.DistributionType.ALL
43+
}

Example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#Thu Feb 18 09:11:40 CET 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
5+
networkTimeout=10000
6+
validateDistributionUrl=true
47
zipStoreBase=GRADLE_USER_HOME
58
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

Example/android/gradlew

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)