Skip to content

Commit b0a6f41

Browse files
authored
feat: support Expo 55 (#248)
* chore: move Expo 54 demo app * docs: document new Expo demo apps * ci: build both expo apps * chore: bootstrap Expo 55 demo app * feat: support Expo 55 in react-native-brownfield expo config plugin * chore: configure package names * chore: add changeset * chore: rename expo-specific entrypoint files in template * feat: support both hermes repositories in Expo config plugin * fix: missing spaces in expo brownfield plugin logs * chore: upgrade KGP version in AndroidApp * feat: collect expo runtime-scope transitive dependencies and inject to artifacts * fix: restore Expo entrypoint in AndroidApp * feat: integrate postMessage demo with Expo 55 * docs: reorder hermes version instructions * feat: demo android expo 54 & 55 flavors * fix: entrypoint for Expo to support Expo 55 * feat: expo config plugin to define EXPO_PRE_55 in the brownfield target for pre-55 expo SDK * fix: support for both Expo pre- and post- 55 in ExpoHostRuntime * feat: upgrade to stable expo 55 * fix: define EXPO_SDK_GTE_55 in Podfile for ReactBrownfield * feat: expo 55 demo app parity with 54 demo app * fix: build error in ExpoHostRuntime for Expo 54 * chore: remove leftovers from tester-integrated from changesets config * fix: changes after CR * fix(ci): prepare-android-build-gradle-for-ci.ts * fix(ci): use matrix for iOS Expo demo app * fix(ci): invalid command flag failing Expo 54 demo app build in CI
1 parent 2cfc12b commit b0a6f41

File tree

136 files changed

+4194
-161
lines changed

Some content is hidden

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

136 files changed

+4194
-161
lines changed

.changeset/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"@callstack/brownfield-example-android-app",
1515
"@callstack/brownfield-example-ios-app",
1616
"@callstack/brownfield-example-rn-app",
17-
"@callstack/brownfield-example-expo-app",
17+
"@callstack/brownfield-example-expo-app-54",
18+
"@callstack/brownfield-example-expo-app-55",
1819
"@callstack/brownfield-gradle-plugin-react"
1920
],
2021
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {

.changeset/wet-ears-cough.md

Lines changed: 7 additions & 0 deletions

.github/actions/androidapp-road-test/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Package the given RN app as AAR, publish to Maven Local, and build
33

44
inputs:
55
flavor:
6-
description: 'AndroidApp flavor to build (expo or vanilla)'
6+
description: 'AndroidApp flavor to build (expo<version> or vanilla)'
77
required: true
88

99
rn-project-path:
@@ -42,14 +42,14 @@ runs:
4242

4343
# == RN app ==
4444
- name: Prebuild Expo app
45-
if: ${{ inputs.flavor == 'expo' }}
45+
if: ${{ startsWith(inputs.flavor, 'expo') }}
4646
run: |
4747
cd ${{ inputs.rn-project-path }}
4848
yarn run expo prebuild --platform android
4949
shell: bash
5050

5151
- name: Patch ExpoApp Android build.gradle for CI
52-
if: ${{ inputs.flavor == 'expo' }}
52+
if: ${{ startsWith(inputs.flavor, 'expo') }}
5353
run: |
5454
cd ${{ inputs.rn-project-path }}
5555
yarn run brownfield:prepare:android:ci

.github/workflows/ci.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,25 @@ jobs:
5151
yarn workspace @callstack/react-native-brownfield brownfield --version
5252
5353
android-androidapp-expo:
54-
name: Android road test (RNApp & AndroidApp - Expo)
54+
name: Android road test (RNApp & AndroidApp - Expo ${{ matrix.version }})
5555
runs-on: ubuntu-latest
5656
needs: build-lint
57+
strategy:
58+
matrix:
59+
include:
60+
- version: '54'
61+
- version: '55'
5762

5863
steps:
5964
- name: Checkout
6065
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
6166

62-
- name: Run RNApp -> AndroidApp road test (Expo)
67+
- name: Run RNApp -> AndroidApp road test (Expo ${{ matrix.version }})
6368
uses: ./.github/actions/androidapp-road-test
6469
with:
65-
flavor: expo
66-
rn-project-path: apps/ExpoApp
67-
rn-project-maven-path: com/callstack/rnbrownfield/demo/expoapp/brownfieldlib
70+
flavor: expo${{ matrix.version }}
71+
rn-project-path: apps/ExpoApp${{ matrix.version }}
72+
rn-project-maven-path: com/callstack/rnbrownfield/demo/expoapp${{ matrix.version }}/brownfieldlib
6873

6974
android-androidapp-vanilla:
7075
name: Android road test (RNApp & AndroidApp - Vanilla)
@@ -98,16 +103,21 @@ jobs:
98103
rn-project-path: apps/RNApp
99104

100105
ios-appleapp-expo:
101-
name: iOS road test (RNApp & AppleApp - Expo)
106+
name: iOS road test (RNApp & AppleApp - Expo ${{ matrix.version }})
102107
runs-on: macos-26
103108
needs: build-lint
109+
strategy:
110+
matrix:
111+
include:
112+
- version: '54'
113+
- version: '55'
104114

105115
steps:
106116
- name: Checkout
107117
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
108118

109-
- name: Run ExpoApp -> AppleApp road test (Expo)
119+
- name: Run ExpoApp -> AppleApp road test (Expo ${{ matrix.version }})
110120
uses: ./.github/actions/appleapp-road-test
111121
with:
112-
variant: expo
113-
rn-project-path: apps/ExpoApp
122+
variant: expo${{ matrix.version }}
123+
rn-project-path: apps/ExpoApp${{ matrix.version }}

.yarnrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ compressionLevel: mixed
22

33
enableGlobalCache: false
44

5-
nodeLinker: node-modules
6-
75
nmHoistingLimits: workspaces
86

7+
nodeLinker: node-modules
8+
99
yarnPath: .yarn/releases/yarn-4.12.0.cjs

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions

apps/AndroidApp/app/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ android {
3030

3131
flavorDimensions += "app"
3232
productFlavors {
33-
create("expo") {
33+
create("expo54") {
34+
dimension = "app"
35+
}
36+
create("expo55") {
3437
dimension = "app"
3538
}
3639
create("vanilla") {
@@ -71,7 +74,8 @@ dependencies {
7174
implementation(libs.androidx.compose.ui.tooling.preview)
7275
implementation(libs.androidx.compose.material3)
7376
implementation(libs.androidx.appcompat)
74-
add("expoImplementation", libs.brownfieldlib.expo)
77+
add("expo55Implementation", libs.brownfieldlib.expo55)
78+
add("expo54Implementation", libs.brownfieldlib.expo54)
7579
add("vanillaImplementation", libs.brownfieldlib.vanilla)
7680

7781
implementation(libs.androidx.fragment.compose)

apps/AndroidApp/app/src/expo/java/com/callstack/brownfield/android/example/ReactNativeConstants.kt renamed to apps/AndroidApp/app/src/expo54/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ package com.callstack.brownfield.android.example
22

33
object ReactNativeConstants {
44
const val MAIN_MODULE_NAME = "main"
5-
const val APP_NAME = "Android (Expo)"
5+
const val APP_NAME = "Android (Expo 54)"
66
}

apps/AndroidApp/app/src/expo/java/com/callstack/brownfield/android/example/ReactNativeHostManager.kt renamed to apps/AndroidApp/app/src/expo54/java/com/callstack/brownfield/android/expo/ReactNativeHostManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package com.callstack.brownfield.android.example
22

3-
typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp.ReactNativeHostManager
3+
typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp54.ReactNativeHostManager
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.callstack.brownfield.android.example
2+
3+
object ReactNativeConstants {
4+
const val MAIN_MODULE_NAME = "main"
5+
const val APP_NAME = "Android (Expo 55)"
6+
}

0 commit comments

Comments
 (0)