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
5 changes: 5 additions & 0 deletions .changeset/calm-poets-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'brownfield': patch
---

feat: support Expo SDK 56 in the Brownfield package and example apps
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
rnapp: ${{ steps.filter.outputs.rnapp }}
expo54: ${{ steps.filter.outputs.expo54 }}
expo55: ${{ steps.filter.outputs.expo55 }}
expo56: ${{ steps.filter.outputs.expo56 }}
androidapp: ${{ steps.filter.outputs.androidapp }}
appleapp: ${{ steps.filter.outputs.appleapp }}
ci: ${{ steps.filter.outputs.ci }}
Expand All @@ -39,6 +40,8 @@ jobs:
- 'apps/ExpoApp54/**'
expo55:
- 'apps/ExpoApp55/**'
expo56:
- 'apps/ExpoApp56/**'
androidapp:
- 'apps/AndroidApp/**'
appleapp:
Expand Down Expand Up @@ -120,6 +123,7 @@ jobs:
(
needs.filter.outputs.expo54 == 'true' ||
needs.filter.outputs.expo55 == 'true' ||
needs.filter.outputs.expo56 == 'true' ||
needs.filter.outputs.androidapp == 'true' ||
needs.filter.outputs.packages == 'true' ||
needs.filter.outputs.ci == 'true'
Expand All @@ -130,6 +134,7 @@ jobs:
include:
- version: '54'
- version: '55'
- version: '56'

steps:
- name: Checkout
Expand Down Expand Up @@ -200,6 +205,7 @@ jobs:
(
needs.filter.outputs.expo54 == 'true' ||
needs.filter.outputs.expo55 == 'true' ||
needs.filter.outputs.expo56 == 'true' ||
needs.filter.outputs.appleapp == 'true' ||
needs.filter.outputs.packages == 'true' ||
needs.filter.outputs.ci == 'true'
Expand All @@ -210,6 +216,7 @@ jobs:
include:
- version: '54'
- version: '55'
- version: '56'

steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions apps/AndroidApp/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ android {
create("expo55") {
dimension = "app"
}
create("expo56") {
dimension = "app"
}
create("vanilla") {
dimension = "app"
}
Expand Down Expand Up @@ -71,6 +74,7 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.appcompat)
add("expo56Implementation", libs.brownfieldlib.expo56)
add("expo55Implementation", libs.brownfieldlib.expo55)
add("expo54Implementation", libs.brownfieldlib.expo54)
add("vanillaImplementation", libs.brownfieldlib.vanilla)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.callstack.brownfield.android.example

typealias BrownfieldStore = com.callstack.rnbrownfield.demo.expoapp56.BrownfieldStore
typealias User = com.callstack.rnbrownfield.demo.expoapp56.User
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 56)"
}
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.expoapp56.ReactNativeHostManager
2 changes: 1 addition & 1 deletion apps/AndroidApp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ gson = "2.13.2"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
brownfieldlib-expo56 = { module = "com.callstack.rnbrownfield.demo.expoapp56: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" }
Expand All @@ -40,4 +41,3 @@ gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

3 changes: 2 additions & 1 deletion apps/AndroidApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.1",
"private": true,
"scripts": {
"build:example:android-consumer:expo": "./gradlew assembleExpo55Release",
"build:example:android-consumer:expo": "./gradlew assembleExpo56Release",
"build:example:android-consumer:expo56": "./gradlew assembleExpo56Release",
"build:example:android-consumer:expo55": "./gradlew assembleExpo55Release",
"build:example:android-consumer:expo54": "./gradlew assembleExpo54Release",
"build:example:android-consumer:vanilla": "./gradlew assembleVanillaRelease"
Expand Down
303 changes: 303 additions & 0 deletions apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug Expo"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "79B8BEB42FB8000000B94C6F"
BuildableName = "Brownfield Apple App (ExpoApp56).app"
BlueprintName = "Brownfield Apple App (ExpoApp56)"
ReferencedContainer = "container:Brownfield Apple App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Brownfield Apple App Expo 56.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>Brownfield Apple App Vanilla.xcscheme</key>
<dict>
<key>orderHint</key>
Expand All @@ -37,6 +42,11 @@
<key>primary</key>
<true/>
</dict>
<key>79B8BEB42FB8000000B94C6F</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
3 changes: 2 additions & 1 deletion apps/AppleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo55",
"build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo56",
"build:example:ios-consumer:expo56": "node prepareXCFrameworks.js --appName ExpoApp56 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 56\" -configuration Release",
"build:example:ios-consumer:expo54": "node prepareXCFrameworks.js --appName ExpoApp54 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 54\" -configuration Release",
"build:example:ios-consumer:expo55": "node prepareXCFrameworks.js --appName ExpoApp55 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 55\" -configuration Release",
"build:example:ios-consumer:vanilla": "node prepareXCFrameworks.js --appName RNApp && yarn internal::build::common -scheme \"Brownfield Apple App Vanilla\" -configuration \"Release Vanilla\"",
Expand Down
3 changes: 3 additions & 0 deletions apps/ExpoApp55/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = defineConfig([
expoConfig,
{
ignores: ['dist/*'],
rules: {
'import/no-unresolved': ['error', { ignore: ['^@callstack/.+$'] }],
},
},
// Jest config is executed by Node (CommonJS); teach ESLint Node globals like __dirname.
{
Expand Down
43 changes: 43 additions & 0 deletions apps/ExpoApp56/.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

example

# generated native folders
/ios
/android
21 changes: 21 additions & 0 deletions apps/ExpoApp56/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;
}
}
56 changes: 56 additions & 0 deletions apps/ExpoApp56/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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.

### Other setup steps

- To set up ESLint for linting, run `npx expo lint`, or follow our guide on ["Using ESLint and Prettier"](https://docs.expo.dev/guides/using-eslint/)
- If you'd like to set up unit testing, follow our guide on ["Unit Testing with Jest"](https://docs.expo.dev/develop/unit-testing/)
- Learn more about the TypeScript setup in this template in our guide on ["Using TypeScript"](https://docs.expo.dev/guides/typescript/)

## 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.
Loading
Loading