Skip to content

Commit d0c54ad

Browse files
committed
Merge branch 'main' into docs/bundle-path
2 parents df9a2c6 + 37ecf04 commit d0c54ad

395 files changed

Lines changed: 21286 additions & 12187 deletions

File tree

Some content is hidden

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

.changeset/config.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
{ "repo": "callstack/react-native-brownfield" }
66
],
77
"commit": false,
8-
"fixed": [],
8+
"fixed": [
9+
[
10+
"brownfield",
11+
"@callstack/brownfield-navigation",
12+
"@callstack/brownie",
13+
"@callstack/brownfield-cli",
14+
"@callstack/react-native-brownfield"
15+
]
16+
],
917
"linked": [],
1018
"access": "public",
1119
"baseBranch": "main",
@@ -14,7 +22,8 @@
1422
"@callstack/brownfield-example-android-app",
1523
"@callstack/brownfield-example-ios-app",
1624
"@callstack/brownfield-example-rn-app",
17-
"@callstack/react-native-brownfield-tester-integrated",
25+
"@callstack/brownfield-example-expo-app-54",
26+
"@callstack/brownfield-example-expo-app-55",
1827
"@callstack/brownfield-gradle-plugin-react"
1928
],
2029
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {

.changeset/cool-parents-turn.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@callstack/react-native-brownfield': patch
3+
'brownfield': patch
4+
'@callstack/brownie': patch
5+
'@callstack/brownfield-cli': patch
6+
---
7+
8+
chore: upgrade dependencies

.changeset/small-rings-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@callstack/brownfield-cli': patch
3+
---
4+
5+
feat: improved logging in brownfield CLI codegens

.changeset/ten-forks-shave.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@callstack/react-native-brownfield': patch
3+
'@callstack/brownfield-navigation': patch
4+
'brownfield': patch
5+
'@callstack/brownie': patch
6+
'@callstack/brownfield-cli': patch
7+
---
8+
9+
chore: upgrade dependencies
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Android road test (selected RN app & AndroidApp)
2+
description: Package the given RN app as AAR, publish to Maven Local, and build the corresponding AndroidApp flavor
3+
4+
inputs:
5+
flavor:
6+
description: 'AndroidApp flavor to build (expo<version> or vanilla)'
7+
required: true
8+
9+
rn-project-path:
10+
description: 'Path to the RN project to build'
11+
required: true
12+
13+
rn-project-maven-path:
14+
description: 'Maven path to the RN project, e.g. com/rnapp/brownfieldlib'
15+
required: true
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- name: Setup
21+
uses: ./.github/actions/setup
22+
23+
- name: Prepare Android environment
24+
uses: ./.github/actions/prepare-android
25+
26+
- name: Restore Gradle cache
27+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
28+
with:
29+
path: |
30+
~/.gradle/caches
31+
~/.gradle/wrapper
32+
key: ${{ runner.os }}-android-androidapp-${{ inputs.flavor }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33+
restore-keys: |
34+
${{ runner.os }}-android-androidapp-${{ inputs.flavor }}-gradle-
35+
${{ runner.os }}-android-androidapp-gradle-
36+
37+
# == Brownfield Gradle Plugin ==
38+
- name: Publish Brownfield Gradle Plugin to Maven Local
39+
run: |
40+
yarn run brownfield:plugin:publish:local
41+
shell: bash
42+
43+
# == RN app ==
44+
- name: Prebuild Expo app
45+
if: ${{ startsWith(inputs.flavor, 'expo') }}
46+
run: |
47+
cd ${{ inputs.rn-project-path }}
48+
yarn run expo prebuild --platform android
49+
shell: bash
50+
51+
- name: Patch ExpoApp Android build.gradle for CI
52+
if: ${{ startsWith(inputs.flavor, 'expo') }}
53+
run: |
54+
cd ${{ inputs.rn-project-path }}
55+
yarn run brownfield:prepare:android:ci
56+
shell: bash
57+
58+
- name: Package AAR with the Brownfield CLI
59+
run: |
60+
cd ${{ inputs.rn-project-path }}
61+
yarn run brownfield:package:android
62+
shell: bash
63+
64+
- name: Publish AAR artifact to Maven Local
65+
run: |
66+
cd ${{ inputs.rn-project-path }}
67+
yarn run brownfield:publish:android
68+
shell: bash
69+
70+
- name: Verify debug AAR exists in Maven Local
71+
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-debug.aar
72+
shell: bash
73+
74+
- name: Verify release AAR exists in Maven Local
75+
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-release.aar
76+
shell: bash
77+
78+
# == AndroidApp ==
79+
80+
- name: Build native Android Brownfield app
81+
run: yarn run build:example:android-consumer:${{ inputs.flavor }}
82+
shell: bash
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Apple road test (selected RN app & AppleApp)
2+
description: Package the given RN app as XCFramework, and build the corresponding AppleApp variant
3+
4+
inputs:
5+
variant:
6+
description: 'AppleApp yarn command variant to run (expo or vanilla)'
7+
required: true
8+
9+
rn-project-path:
10+
description: 'Path to the RN project to build'
11+
required: true
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
18+
19+
- name: Setup
20+
uses: ./.github/actions/setup
21+
22+
- name: Prepare iOS environment
23+
uses: ./.github/actions/prepare-ios
24+
25+
- name: Configure ccache environment
26+
run: |
27+
echo "USE_CCACHE=1" >> "$GITHUB_ENV"
28+
echo "CCACHE_DIR=${{ github.workspace }}/.ios_ccache" >> "$GITHUB_ENV"
29+
echo "CCACHE_BASEDIR=${{ github.workspace }}" >> "$GITHUB_ENV"
30+
echo "CCACHE_COMPRESS=1" >> "$GITHUB_ENV"
31+
shell: bash
32+
33+
- name: Install ccache
34+
run: brew install ccache
35+
shell: bash
36+
37+
- name: Enable ccache
38+
run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
39+
shell: bash
40+
41+
- name: Restore RNApp & AppleApp ccache
42+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
43+
with:
44+
path: |
45+
.ios_ccache
46+
key: ${{ runner.os }}-rnapp-appleapp-${{ inputs.variant }}-ios-ccache-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path), 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }}
47+
restore-keys: |
48+
${{ runner.os }}-rnapp-appleapp-${{ inputs.variant }}-ios-ccache-
49+
50+
# == RN app ==
51+
52+
- name: Restore Pods cache (RN ${{ inputs.variant }} app)
53+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
54+
with:
55+
path: |
56+
${{ inputs.rn-project-path }}/ios/Pods
57+
key: ${{ runner.os }}-rnapp-${{ inputs.variant }}-ios-pods-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path)) }}
58+
restore-keys: |
59+
${{ runner.os }}-rnapp-${{ inputs.variant }}-ios-pods-
60+
61+
- name: Install pods (RN ${{ inputs.variant }} app)
62+
if: inputs.variant == 'vanilla'
63+
run: |
64+
cd ${{ inputs.rn-project-path }}/ios
65+
pod install
66+
shell: bash
67+
68+
- name: Restore DerivedData cache (RN ${{ inputs.variant }} app)
69+
uses: actions/cache@v5
70+
with:
71+
path: ${{ inputs.rn-project-path }}/ios/build
72+
key: ${{ runner.os }}-ios-rnapp-${{ inputs.variant }}-derived-data-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path)) }}
73+
restore-keys: |
74+
${{ runner.os }}-ios-rnapp-${{ inputs.variant }}-derived-data-
75+
76+
- name: Package iOS framework with the Brownfield CLI
77+
run: |
78+
cd ${{ inputs.rn-project-path }}
79+
yarn run brownfield:package:ios
80+
shell: bash
81+
82+
# == AppleApp ==
83+
84+
- name: Build Brownfield iOS native app (${{ inputs.variant }})
85+
run: |
86+
yarn run build:example:ios-consumer:${{ inputs.variant }}
87+
shell: bash
88+
89+
# ==============
90+
91+
- name: Log ccache stats
92+
uses: ./.github/actions/ccache-summary
93+
with:
94+
name: RN ${{ inputs.variant }} app & AppleApp

.github/actions/setup/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ runs:
2020
run: yarn install
2121
shell: bash
2222

23+
- name: Build packages
24+
run: yarn build
25+
shell: bash
26+
2327
- name: Restore Turbo cache
2428
if: inputs.restore-turbo-cache == 'true'
2529
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5

0 commit comments

Comments
 (0)