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
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"@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"
],
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
8 changes: 4 additions & 4 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 Expand Up @@ -78,5 +78,5 @@ runs:
# == AndroidApp ==

- name: Build native Android Brownfield app
run: yarn run build:example:android-consumer:${{ inputs.flavor }}
run: yarn run build:example:android-consumer:${{ startsWith(inputs.flavor, 'expo') && 'expo' || inputs.flavor }}
shell: bash
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 @@ -84,19 +84,24 @@ jobs:
run: yarn run build:tester-integrated:android

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
4 changes: 3 additions & 1 deletion apps/AppleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"type": "module",
"scripts": {
"internal::build::common": "xcodebuild -project \"Brownfield Apple App.xcodeproj\" -scheme \"Brownfield Apple App\" -sdk iphonesimulator build CODE_SIGNING_ALLOWED=NO -derivedDataPath ./build",
"build:example:ios-consumer:expo": "node prepareXCFrameworks.js --appName ExpoApp && yarn internal::build::common -configuration Release",
"build:example:ios-consumer:expo54": "node prepareXCFrameworks.js --appName ExpoApp54 && yarn internal::build::common -configuration Release",
"build:example:ios-consumer:expo55": "node prepareXCFrameworks.js --appName ExpoApp55 && yarn internal::build::common -configuration Release",
"build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo55",
"build:example:ios-consumer:vanilla": "node prepareXCFrameworks.js --appName RNApp && yarn internal::build::common -configuration \"Release Vanilla\""
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 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 Down
File renamed without changes.
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,
},
});
47 changes: 47 additions & 0 deletions apps/ExpoApp55/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"expo": {
"name": "xd55",
"slug": "xd55",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "expoapp55",
"userInterfaceStyle": "automatic",
"ios": {
"icon": "./assets/expo.icon",
"bundleIdentifier": "com.callstack.rnbrownfield.demo.expoapp"
},
"android": {
"adaptiveIcon": {
"backgroundColor": "#E6F4FE",
"foregroundImage": "./assets/images/android-icon-foreground.png",
"backgroundImage": "./assets/images/android-icon-background.png",
"monochromeImage": "./assets/images/android-icon-monochrome.png"
},
"predictiveBackGestureEnabled": false,
"package": "com.callstack.rnbrownfield.demo.expoapp"
},
"web": {
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"backgroundColor": "#208AEF",
"android": {
"image": "./assets/images/splash-icon.png",
"imageWidth": 76
}
}
],
"@callstack/react-native-brownfield"
],
"experiments": {
"typedRoutes": true,
"reactCompiler": true
}
}
}
3 changes: 3 additions & 0 deletions apps/ExpoApp55/assets/expo.icon/Assets/expo-symbol 2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/expo.icon/Assets/grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions apps/ExpoApp55/assets/expo.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"fill" : {
"automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
},
"groups" : [
{
"layers" : [
{
"image-name" : "expo-symbol 2.svg",
"name" : "expo-symbol 2",
"position" : {
"scale" : 1,
"translation-in-points" : [
1.1008400065293245e-05,
-16.046875
]
}
},
{
"image-name" : "grid.png",
"name" : "grid"
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"translucency" : {
"enabled" : true,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/expo-badge-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/expo-badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/expo-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/logo-glow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/react-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/react-logo@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/react-logo@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/splash-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/ExpoApp55/assets/images/tabIcons/explore.png
Binary file added apps/ExpoApp55/assets/images/tabIcons/explore@2x.png
Binary file added apps/ExpoApp55/assets/images/tabIcons/explore@3x.png
Binary file added apps/ExpoApp55/assets/images/tabIcons/home.png
Binary file added apps/ExpoApp55/assets/images/tabIcons/home@2x.png
Binary file added apps/ExpoApp55/assets/images/tabIcons/home@3x.png
Binary file added apps/ExpoApp55/assets/images/tutorial-web.png
12 changes: 12 additions & 0 deletions apps/ExpoApp55/entry.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { ExpoRoot } from 'expo-router';
import { AppRegistry } from 'react-native';
import RNApp from './RNApp';

function App() {
const ctx = require.context('./app');
return <ExpoRoot context={ctx} />;
}

AppRegistry.registerComponent('RNApp', () => RNApp);
// Keep compatibility with Expo's default app key.
AppRegistry.registerComponent('main', () => App);
Loading
Loading