Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"@callstack/brownfield-example-android-app",
"@callstack/brownfield-example-ios-app",
"@callstack/brownfield-example-rn-app",
"@callstack/brownfield-example-expo-app",
"@callstack/brownfield-example-expo-app-54",
"@callstack/brownfield-example-expo-app-55",
"@callstack/react-native-brownfield-tester-integrated",
"@callstack/brownfield-gradle-plugin-react"
],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
Expand Down
5 changes: 5 additions & 0 deletions .changeset/wet-ears-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@callstack/react-native-brownfield': minor
---

feat: support Expo 55
6 changes: 3 additions & 3 deletions .github/actions/androidapp-road-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Package the given RN app as AAR, publish to Maven Local, and build

inputs:
flavor:
description: 'AndroidApp flavor to build (expo or vanilla)'
description: 'AndroidApp flavor to build (expo<version> or vanilla)'
required: true

rn-project-path:
Expand Down Expand Up @@ -42,14 +42,14 @@ runs:

# == RN app ==
- name: Prebuild Expo app
if: ${{ inputs.flavor == 'expo' }}
if: ${{ startsWith(inputs.flavor, 'expo') }}
run: |
cd ${{ inputs.rn-project-path }}
yarn run expo prebuild --platform android
shell: bash

- name: Patch ExpoApp Android build.gradle for CI
if: ${{ inputs.flavor == 'expo' }}
if: ${{ startsWith(inputs.flavor, 'expo') }}
run: |
cd ${{ inputs.rn-project-path }}
yarn run brownfield:prepare:android:ci
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/appleapp-road-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ runs:

- name: Build Brownfield iOS native app (${{ inputs.variant }})
run: |
yarn run build:example:ios-consumer:${{ inputs.variant }}
yarn run build:example:ios-consumer:${{ startsWith(inputs.variant, 'expo') && 'expo' || inputs.variant }}
shell: bash

# ==============
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,24 @@ jobs:
yarn workspace @callstack/react-native-brownfield brownfield --version

android-androidapp-expo:
name: Android road test (RNApp & AndroidApp - Expo)
name: Android road test (RNApp & AndroidApp - Expo ${{ matrix.version }})
runs-on: ubuntu-latest
needs: build-lint
strategy:
matrix:
include:
- version: '54'
- version: '55'

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Run RNApp -> AndroidApp road test (Expo)
- name: Run RNApp -> AndroidApp road test (Expo ${{ matrix.version }})
uses: ./.github/actions/androidapp-road-test
with:
flavor: expo
rn-project-path: apps/ExpoApp
flavor: expo${{ matrix.version }}
rn-project-path: apps/ExpoApp${{ matrix.version }}
rn-project-maven-path: com/callstack/rnbrownfield/demo/expoapp/brownfieldlib

android-androidapp-vanilla:
Expand Down
4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

nmHoistingLimits: workspaces

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.12.0.cjs
8 changes: 6 additions & 2 deletions apps/AndroidApp/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ android {

flavorDimensions += "app"
productFlavors {
create("expo") {
create("expo54") {
dimension = "app"
}
create("expo55") {
dimension = "app"
}
create("vanilla") {
Expand Down Expand Up @@ -71,7 +74,8 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.appcompat)
add("expoImplementation", libs.brownfieldlib.expo)
add("expo55Implementation", libs.brownfieldlib.expo55)
add("expo54Implementation", libs.brownfieldlib.expo54)
add("vanillaImplementation", libs.brownfieldlib.vanilla)

implementation(libs.androidx.fragment.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.callstack.brownfield.android.example

object ReactNativeConstants {
const val MAIN_MODULE_NAME = "main"
const val APP_NAME = "Android (Expo)"
const val APP_NAME = "Android (Expo 54)"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.callstack.brownfield.android.example

typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp.ReactNativeHostManager
typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp54.ReactNativeHostManager
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.callstack.brownfield.android.example

object ReactNativeConstants {
const val MAIN_MODULE_NAME = "main"
const val APP_NAME = "Android (Expo 55)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.callstack.brownfield.android.example

typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp55.ReactNativeHostManager
5 changes: 3 additions & 2 deletions apps/AndroidApp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
agp = "8.13.2"
brownfieldlib = "0.0.1-SNAPSHOT"
kotlin = "2.0.21"
kotlin = "2.2.21"
coreKtx = "1.17.0"
junit = "4.13.2"
junitVersion = "1.3.0"
Expand All @@ -15,7 +15,8 @@ material = "1.13.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
brownfieldlib-expo = { module = "com.callstack.rnbrownfield.demo.expoapp:brownfieldlib", version.ref = "brownfieldlib" }
brownfieldlib-expo55 = { module = "com.callstack.rnbrownfield.demo.expoapp55:brownfieldlib", version.ref = "brownfieldlib" }
brownfieldlib-expo54 = { module = "com.callstack.rnbrownfield.demo.expoapp54:brownfieldlib", version.ref = "brownfieldlib" }
brownfieldlib-vanilla = { module = "com.rnapp:brownfieldlib", version.ref = "brownfieldlib" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
Expand Down
4 changes: 3 additions & 1 deletion apps/AndroidApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.0.1",
"private": true,
"scripts": {
"build:example:android-consumer:expo": "./gradlew assembleExpoRelease",
"build:example:android-consumer:expo": "./gradlew assembleExpo55Release",
"build:example:android-consumer:expo55": "./gradlew assembleExpo55Release",
"build:example:android-consumer:expo54": "./gradlew assembleExpo54Release",
"build:example:android-consumer:vanilla": "./gradlew assembleVanillaRelease"
}
}
8 changes: 5 additions & 3 deletions apps/AppleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"private": true,
"type": "module",
"scripts": {
"internal::build::common": "xcodebuild -project \"Brownfield Apple App.xcodeproj\" -sdk iphonesimulator build CODE_SIGNING_ALLOWED=NO -derivedDataPath ./build",
"build:example:ios-consumer:expo": "node prepareXCFrameworks.js --appName ExpoApp && yarn internal::build::common -scheme \"Brownfield Apple App Expo\" -configuration \"Release Expo\"",
"build:example:ios-consumer:vanilla": "node prepareXCFrameworks.js --appName RNApp && yarn internal::build::common -scheme \"Brownfield Apple App Vanilla\" -configuration \"Release Vanilla\""
"build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo55",
"build:example:ios-consumer:expo54": "node prepareXCFrameworks.js --appName ExpoApp54 && yarn internal::build::common -scheme \"Brownfield Apple App Expo\" -configuration Release",
"build:example:ios-consumer:expo55": "node prepareXCFrameworks.js --appName ExpoApp55 && yarn internal::build::common -scheme \"Brownfield Apple App Expo\" -configuration Release",
"build:example:ios-consumer:vanilla": "node prepareXCFrameworks.js --appName RNApp && yarn internal::build::common -scheme \"Brownfield Apple App Vanilla\" -configuration \"Release Vanilla\"",
"internal::build::common": "xcodebuild -project \"Brownfield Apple App.xcodeproj\" -sdk iphonesimulator build CODE_SIGNING_ALLOWED=NO -derivedDataPath ./build"
},
"devDependencies": {
"@rock-js/tools": "^0.12.8"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions apps/ExpoApp/app.json → apps/ExpoApp54/app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "ExpoApp",
"slug": "ExpoApp",
"name": "ExpoApp54",
"slug": "ExpoApp54",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
Expand All @@ -10,7 +10,7 @@
"newArchEnabled": true,
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.callstack.rnbrownfield.demo.expoapp"
"bundleIdentifier": "com.callstack.rnbrownfield.demo.expoapp54"
},
"android": {
"adaptiveIcon": {
Expand All @@ -21,7 +21,7 @@
},
"edgeToEdgeEnabled": true,
"predictiveBackGestureEnabled": false,
"package": "com.callstack.rnbrownfield.demo.expoapp"
"package": "com.callstack.rnbrownfield.demo.expoapp54"
},
"web": {
"output": "static",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function HomeScreen() {
}
>
<ThemedView style={styles.titleContainer}>
<ThemedText type="title">Welcome!</ThemedText>
<ThemedText type="title">Welcome to Expo 54!</ThemedText>
<HelloWave />
</ThemedView>
<ThemedView style={styles.stepContainer}>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/ExpoApp/package.json → apps/ExpoApp54/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@callstack/brownfield-example-expo-app",
"name": "@callstack/brownfield-example-expo-app-54",
"main": "./entry.tsx",
"version": "1.0.0",
"private": true,
Expand All @@ -10,7 +10,7 @@
"web": "expo start --web",
"lint": "expo lint",
"prebuild": "expo prebuild",
"brownfield:prepare:android:ci": "node --experimental-strip-types --no-warnings ./scripts/prepare-android-build-gradle-for-ci.ts",
"brownfield:prepare:android:ci": "cd .. && node --experimental-strip-types --no-warnings ./scripts/prepare-android-build-gradle-for-ci.ts ExpoApp54",
"brownfield:package:android": "brownfield package:android --module-name brownfieldlib --variant release",
"brownfield:publish:android": "brownfield publish:android --module-name brownfieldlib",
"brownfield:package:ios": "brownfield package:ios --scheme BrownfieldLib --configuration Release"
Expand Down
File renamed without changes.
43 changes: 43 additions & 0 deletions apps/ExpoApp55/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

app-example

# generated native folders
/ios
/android
21 changes: 21 additions & 0 deletions apps/ExpoApp55/BrownfieldStore.brownie.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { BrownieStore } from '@callstack/brownie';

export interface BrownfieldStore extends BrownieStore {
counter: number;
user: {
name: string;
};
}

export interface SettingsStore extends BrownieStore {
theme: 'light' | 'dark';
notificationsEnabled: boolean;
privacyMode: boolean;
}

declare module '@callstack/brownie' {
interface BrownieStores {
BrownfieldStore: BrownfieldStore;
SettingsStore: SettingsStore;
}
}
50 changes: 50 additions & 0 deletions apps/ExpoApp55/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Welcome to your Expo app 👋

This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).

## Get started

1. Install dependencies

```bash
npm install
```

2. Start the app

```bash
npx expo start
```

In the output, you'll find options to open the app in a

- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo

You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).

## Get a fresh project

When you're ready, run:

```bash
npm run reset-project
```

This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.

## Learn more

To learn more about developing your project with Expo, look at the following resources:

- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.

## Join the community

Join our community of developers creating universal apps.

- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
38 changes: 38 additions & 0 deletions apps/ExpoApp55/RNApp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { SafeAreaView } from 'react-native-safe-area-context';
import { StyleSheet, Text, View } from 'react-native';
import Counter from './components/counter';

export default function RNApp() {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.title}>Expo React Native Brownfield</Text>

<View style={styles.content}>
<Counter />
</View>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#eeeeee',
paddingTop: 20,
},
title: {
fontSize: 20,
fontWeight: 'bold',
textAlign: 'center',
},
content: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
text: {
fontSize: 18,
textAlign: 'center',
marginBottom: 5,
},
});
Loading
Loading