Skip to content

Commit 51cc6cb

Browse files
authored
chore(dev): bump example app (#324)
- Removed the paper example app as react-native doesn't support paper arch any longer - Updated fabric example to RN 0.83
1 parent ff18c09 commit 51cc6cb

File tree

127 files changed

+6091
-8972
lines changed

Some content is hidden

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

127 files changed

+6091
-8972
lines changed

.github/workflows/build-android.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ on:
88
- '.github/workflows/build-android.yml'
99
- 'package/cpp/**'
1010
- 'package/android/**'
11-
- 'package/example/android/**'
11+
- 'package/example/AppExampleFabric/android/**'
1212
- 'package/yarn.lock'
1313
- 'package/example/yarn.lock'
1414
pull_request:
1515
paths:
1616
- '.github/workflows/build-android.yml'
1717
- 'package/cpp/**'
1818
- 'package/android/**'
19-
- 'package/example/android/**'
19+
- 'package/example/AppExampleFabric/android/**'
2020
- 'package/yarn.lock'
2121
- 'package/example/yarn.lock'
2222

@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Get yarn cache directory path
4141
id: yarn-cache-dir-path
42-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
42+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4343
- name: Restore node_modules from cache
4444
uses: actions/cache@v4
4545
id: yarn-cache
@@ -49,9 +49,7 @@ jobs:
4949
restore-keys: |
5050
${{ runner.os }}-yarn-
5151
- name: Install node_modules
52-
run: yarn install --frozen-lockfile
53-
- name: Install node_modules for example/
54-
run: yarn install --frozen-lockfile --cwd example
52+
run: yarn install --immutable
5553

5654
- name: Restore Gradle cache
5755
uses: actions/cache@v4
@@ -62,11 +60,11 @@ jobs:
6260
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
6361
restore-keys: |
6462
${{ runner.os }}-gradle-
65-
- name: Run Gradle Build for example/android/
66-
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..
63+
- name: Run Gradle Build for example/AppExampleFabric/android/
64+
run: cd example/AppExampleFabric/android && ./gradlew assembleDebug --build-cache && cd ../..
6765
- name: Upload .apk to GitHub
6866
uses: actions/upload-artifact@v4
6967
with:
7068
name: Example App (.apk)
71-
path: package/example/android/app/build/outputs/apk/debug/app-debug.apk
69+
path: package/example/AppExampleFabric/android/app/build/outputs/apk/debug/app-debug.apk
7270
if-no-files-found: error

.github/workflows/build-ios.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ on:
99
- "package/cpp/**"
1010
- "package/ios/**"
1111
- "package/*.podspec"
12-
- "package/example/ios/**"
12+
- "package/example/AppExampleFabric/ios/**"
1313
pull_request:
1414
paths:
1515
- ".github/workflows/build-ios.yml"
1616
- "package/cpp/**"
1717
- "package/ios/**"
1818
- "package/*.podspec"
19-
- "package/example/ios/**"
19+
- "package/example/AppExampleFabric/ios/**"
2020

2121
jobs:
2222
build:
2323
name: Build iOS Example App
2424
runs-on: macOS-latest
2525
defaults:
2626
run:
27-
working-directory: package/example/ios
27+
working-directory: package/example/AppExampleFabric/ios
2828
steps:
2929
- uses: actions/checkout@v4
3030

3131
- name: Get yarn cache directory path
3232
id: yarn-cache-dir-path
33-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
33+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3434
- name: Restore node_modules from cache
3535
uses: actions/cache@v4
3636
id: yarn-cache
@@ -40,7 +40,7 @@ jobs:
4040
restore-keys: |
4141
${{ runner.os }}-yarn-
4242
- name: Install node_modules for example/
43-
run: yarn install --frozen-lockfile --cwd ..
43+
run: yarn install --immutable
4444

4545
- name: Restore buildcache
4646
uses: mikehardy/buildcache-action@v2
@@ -49,14 +49,14 @@ jobs:
4949
- name: Setup Ruby (bundle)
5050
uses: ruby/setup-ruby@v1
5151
with:
52-
ruby-version: 2.6.10
52+
ruby-version: 3.4.4
5353
bundler-cache: true
54-
working-directory: package/example/ios
54+
working-directory: package/example/AppExampleFabric/
5555

5656
- name: Restore Pods cache
5757
uses: actions/cache@v4
5858
with:
59-
path: package/example/ios/Pods
59+
path: package/example/ios/AppExampleFabric/Pods
6060
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
6161
restore-keys: |
6262
${{ runner.os }}-pods-
@@ -66,12 +66,12 @@ jobs:
6666
run: gem install xcpretty
6767
- name: Build App
6868
run: "set -o pipefail && xcodebuild \
69-
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
69+
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO \
7070
-derivedDataPath build -UseModernBuildSystem=YES \
71-
-workspace RNFFabric.xcworkspace \
72-
-scheme RNFFabric \
71+
-workspace AppExampleFabric.xcworkspace \
72+
-scheme AppExampleFabric \
7373
-sdk iphonesimulator \
7474
-configuration Debug \
75-
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
75+
-destination 'platform=iOS Simulator,name=iPhone 16 Pro Max' \
7676
build \
7777
CODE_SIGNING_ALLOWED=NO | xcpretty"

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
cache-dependency-path: docs
3434

3535
- name: Install dependencies
36-
run: yarn install --frozen-lockfile
36+
run: yarn install --immutable
3737
working-directory: docs
3838

3939
- name: Build website

.github/workflows/test-deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
cache-dependency-path: docs
3333

3434
- name: Install dependencies
35-
run: yarn install --frozen-lockfile
35+
run: yarn install --immutable
3636
working-directory: docs
3737
- name: Test build website
3838
run: yarn build

.github/workflows/validate-js.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Get yarn cache directory path
4545
id: yarn-cache-dir-path
46-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
46+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4747
- name: Restore node_modules from cache
4848
uses: actions/cache@v4
4949
id: yarn-cache
@@ -54,9 +54,7 @@ jobs:
5454
${{ runner.os }}-yarn-
5555
5656
- name: Install node_modules
57-
run: yarn install --frozen-lockfile
58-
- name: Install node_modules (example/)
59-
run: yarn install --frozen-lockfile --cwd example
57+
run: yarn install --immutable
6058

6159
- name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m
6260
run: |
@@ -81,7 +79,7 @@ jobs:
8179

8280
- name: Get yarn cache directory path
8381
id: yarn-cache-dir-path
84-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
82+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
8583
- name: Restore node_modules from cache
8684
uses: actions/cache@v4
8785
id: yarn-cache
@@ -92,9 +90,7 @@ jobs:
9290
${{ runner.os }}-yarn-
9391
9492
- name: Install node_modules
95-
run: yarn install --frozen-lockfile
96-
- name: Install node_modules (example/)
97-
run: yarn install --frozen-lockfile --cwd example
93+
run: yarn install --immutable
9894

9995
- name: Run ESLint
10096
run: yarn lint -f @jamesacarr/github-actions

package/example/AppExampleFabric/.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native',
4+
};

package/example/AppExampleFabric/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
singleQuote: true,
4+
trailingComma: 'all',
5+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
import { NewAppScreen } from '@react-native/new-app-screen';
9+
import { StatusBar, StyleSheet, useColorScheme, View } from 'react-native';
10+
import {
11+
SafeAreaProvider,
12+
useSafeAreaInsets,
13+
} from 'react-native-safe-area-context';
14+
15+
function App() {
16+
const isDarkMode = useColorScheme() === 'dark';
17+
18+
return (
19+
<SafeAreaProvider>
20+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
21+
<AppContent />
22+
</SafeAreaProvider>
23+
);
24+
}
25+
26+
function AppContent() {
27+
const safeAreaInsets = useSafeAreaInsets();
28+
29+
return (
30+
<View style={styles.container}>
31+
<NewAppScreen
32+
templateFileName="App.tsx"
33+
safeAreaInsets={safeAreaInsets}
34+
/>
35+
</View>
36+
);
37+
}
38+
39+
const styles = StyleSheet.create({
40+
container: {
41+
flex: 1,
42+
},
43+
});
44+
45+
export default App;

0 commit comments

Comments
 (0)