Skip to content
Open
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
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@callstack/brownfield-example-android-app",
"@callstack/brownfield-example-ios-app",
"@callstack/brownfield-example-rn-app",
"@callstack/brownfield-example-rock-app",
"@callstack/brownfield-example-expo-app-54",
"@callstack/brownfield-example-expo-app-55",
"@callstack/brownfield-gradle-plugin-react"
Expand Down
2 changes: 1 addition & 1 deletion .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<version> or vanilla)'
description: 'AndroidApp flavor to build (expo<version>, vanilla or rock)'
required: true

rn-project-path:
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 @@ -3,7 +3,7 @@ description: Package the given RN app as XCFramework, and build the correspondin

inputs:
variant:
description: 'AppleApp yarn command variant to run (expo or vanilla)'
description: 'AppleApp yarn command variant to run (expo, vanilla or rock)'
required: true

rn-project-path:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ jobs:
rn-project-path: apps/ExpoApp${{ matrix.version }}
rn-project-maven-path: com/callstack/rnbrownfield/demo/expoapp${{ matrix.version }}/brownfieldlib

android-androidapp-rock:
name: Android road test (RNApp & AndroidApp - Rock)
runs-on: ubuntu-latest
needs: build-lint

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

- name: Run RockApp -> AndroidApp road test (Rock)
uses: ./.github/actions/androidapp-road-test
with:
flavor: rock
rn-project-path: apps/RockApp
rn-project-maven-path: com/callstack/rnbrownfield/demo/rockapp/brownfieldlib

android-androidapp-vanilla:
name: Android road test (AndroidApp - Vanilla)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -220,3 +236,18 @@ jobs:
with:
variant: expo${{ matrix.version }}
rn-project-path: apps/ExpoApp${{ matrix.version }}

ios-appleapp-rock:
name: iOS road test (RNApp & AppleApp - Rock)
runs-on: macos-26
needs: build-lint

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

- name: Run RNApp -> AppleApp road test (Rock)
uses: ./.github/actions/appleapp-road-test
with:
variant: rock
rn-project-path: apps/RockApp
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ We use [changesets](https://github.com/changesets/changesets) to make it easier
- `build:example:ios-consumer:expo55` - builds the `Brownfield Apple App (ExpoApp55)` target via scheme **Brownfield Apple App Expo 55** (`Release`)
- `build:example:ios-consumer:expo54` - builds the `Brownfield Apple App (ExpoApp54)` target via scheme **Brownfield Apple App Expo 54** (`Release`)
- `build:example:ios-consumer:vanilla` - builds the `Brownfield Apple App (RNApp)` target via scheme **Brownfield Apple App Vanilla** (`Release Vanilla`)
- `build:example:ios-consumer:rock` - builds the `Brownfield Apple App (Rock)` target via scheme **Brownfield Apple App Vanilla** (`Release Rock`)

## Running demo apps

Expand Down Expand Up @@ -91,6 +92,7 @@ Per example app (run from the repo root):
| `yarn workspace @callstack/brownfield-example-rn-app test` | Plain React Native (`apps/RNApp`) |
| `yarn workspace @callstack/brownfield-example-expo-app-54 test` | Expo SDK 54 (`apps/ExpoApp54`) |
| `yarn workspace @callstack/brownfield-example-expo-app-55 test` | Expo SDK 55 (`apps/ExpoApp55`) |
| `yarn workspace @callstack/brownfield-example-rock-app test` | Rock (`apps/RockApp`) |

Package-level scripts (`yarn test` inside `apps/RNApp`, `apps/ExpoApp54`, or `apps/ExpoApp55`) invoke Jest with each app’s `jest.config.js`.

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 @@ -38,6 +38,9 @@ android {
create("vanilla") {
dimension = "app"
}
create("rock") {
dimension = "app"
}
}

buildTypes {
Expand Down Expand Up @@ -74,6 +77,7 @@ dependencies {
add("expo55Implementation", libs.brownfieldlib.expo55)
add("expo54Implementation", libs.brownfieldlib.expo54)
add("vanillaImplementation", libs.brownfieldlib.vanilla)
add("rockImplementation", libs.brownfieldlib.rock)

implementation(libs.androidx.fragment.compose)
testImplementation(libs.junit)
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.rockapp.BrownfieldStore
typealias User = com.callstack.rnbrownfield.demo.rockapp.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 = "RockApp"
const val APP_NAME = "Android"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.callstack.brownfield.android.example

import android.content.res.Configuration

typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.rockapp.ReactNativeHostManager

fun ReactNativeHostManager.onConfigurationChanged(application: android.app.Application, newConfig: Configuration) {
// no-op that is prepared to match of the Expo ReactNativeHostManager
}
1 change: 1 addition & 0 deletions apps/AndroidApp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref =
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" }
brownfieldlib-rock = { module = "com.callstack.rnbrownfield.demo.rockapp:brownfieldlib", version.ref = "brownfieldlib" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
Expand Down
3 changes: 2 additions & 1 deletion apps/AndroidApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"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"
"build:example:android-consumer:vanilla": "./gradlew assembleVanillaRelease",
"build:example:android-consumer:rock": "./gradlew assembleRockRelease"
}
}
Loading