Skip to content

Commit 031a942

Browse files
authored
Merge pull request #59 from ArturKalach/release/0.5.0
Release/0.5.0
2 parents 57bcf16 + 0611f92 commit 031a942

File tree

136 files changed

+10987
-8350
lines changed

Some content is hidden

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

136 files changed

+10987
-8350
lines changed

.github/actions/setup/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ runs:
1515
with:
1616
path: |
1717
**/node_modules
18-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
1920
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
2022
${{ runner.os }}-yarn-
2123
2224
- name: Install dependencies
2325
if: steps.yarn-cache.outputs.cache-hit != 'true'
24-
run: |
25-
yarn install --cwd example --frozen-lockfile
26-
yarn install --frozen-lockfile
26+
run: yarn install --immutable
2727
shell: bash

.github/images/android_example.gif

-657 KB
Binary file not shown.

.github/images/ios_example.gif

-7.58 MB
Binary file not shown.
4.04 MB
Loading

.github/images/rnek-ios-example.gif

2.36 MB
Loading

.github/workflows/ci.yml

+111-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches:
88
- main
9+
merge_group:
10+
types:
11+
- checks_requested
912

1013
jobs:
1114
lint:
@@ -35,7 +38,7 @@ jobs:
3538
- name: Run unit tests
3639
run: yarn test --maxWorkers=2 --coverage
3740

38-
build:
41+
build-library:
3942
runs-on: ubuntu-latest
4043
steps:
4144
- name: Checkout
@@ -45,4 +48,110 @@ jobs:
4548
uses: ./.github/actions/setup
4649

4750
- name: Build package
48-
run: yarn prepack
51+
run: yarn prepare
52+
53+
build-android:
54+
runs-on: ubuntu-latest
55+
env:
56+
TURBO_CACHE_DIR: .turbo/android
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v3
60+
61+
- name: Setup
62+
uses: ./.github/actions/setup
63+
64+
- name: Cache turborepo for Android
65+
uses: actions/cache@v3
66+
with:
67+
path: ${{ env.TURBO_CACHE_DIR }}
68+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
69+
restore-keys: |
70+
${{ runner.os }}-turborepo-android-
71+
72+
- name: Check turborepo cache for Android
73+
run: |
74+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
75+
76+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
77+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
78+
fi
79+
80+
- name: Install JDK
81+
if: env.turbo_cache_hit != 1
82+
uses: actions/setup-java@v3
83+
with:
84+
distribution: 'zulu'
85+
java-version: '17'
86+
87+
- name: Finalize Android SDK
88+
if: env.turbo_cache_hit != 1
89+
run: |
90+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
91+
92+
- name: Cache Gradle
93+
if: env.turbo_cache_hit != 1
94+
uses: actions/cache@v3
95+
with:
96+
path: |
97+
~/.gradle/wrapper
98+
~/.gradle/caches
99+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
100+
restore-keys: |
101+
${{ runner.os }}-gradle-
102+
103+
- name: Build example for Android
104+
env:
105+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
106+
run: |
107+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
108+
109+
build-ios:
110+
runs-on: macos-14
111+
env:
112+
TURBO_CACHE_DIR: .turbo/ios
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v3
116+
117+
- name: Setup
118+
uses: ./.github/actions/setup
119+
120+
- name: Cache turborepo for iOS
121+
uses: actions/cache@v3
122+
with:
123+
path: ${{ env.TURBO_CACHE_DIR }}
124+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
125+
restore-keys: |
126+
${{ runner.os }}-turborepo-ios-
127+
128+
- name: Check turborepo cache for iOS
129+
run: |
130+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
131+
132+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
133+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
134+
fi
135+
136+
- name: Cache cocoapods
137+
if: env.turbo_cache_hit != 1
138+
id: cocoapods-cache
139+
uses: actions/cache@v3
140+
with:
141+
path: |
142+
**/ios/Pods
143+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
144+
restore-keys: |
145+
${{ runner.os }}-cocoapods-
146+
147+
- name: Install cocoapods
148+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
149+
run: |
150+
cd example/ios
151+
pod install
152+
env:
153+
NO_FLIPPER: 1
154+
155+
- name: Build example for iOS
156+
run: |
157+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ yarn-debug.log
5555
yarn-error.log
5656
# Yarn
5757
.yarn/*
58-
.yarn
5958
!.yarn/patches
6059
!.yarn/plugins
6160
!.yarn/releases
6261
!.yarn/sdks
6362
!.yarn/versions
6463

64+
example/.yarn
65+
6566
# BUCK
6667
buck-out/
6768
\.buckd/
@@ -76,3 +77,7 @@ android/keystores/debug.keystore
7677

7778
# generated by bob
7879
lib/
80+
81+
# React Native Codegen
82+
ios/generated
83+
android/generated

.npmignore

-157
This file was deleted.

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.18.1
1+
v18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/lib/utils/patchCodegenAndroidPackage.js b/lib/utils/patchCodegenAndroidPackage.js
2+
index 2c5165815c37daa008ff6a7c246a44d51ba5f963..9ac208c458f517274d1e4f3d5c2cb9f034b2afa5 100644
3+
--- a/lib/utils/patchCodegenAndroidPackage.js
4+
+++ b/lib/utils/patchCodegenAndroidPackage.js
5+
@@ -57,8 +57,22 @@ packageJson, report) {
6+
const newFilePath = _path.default.resolve(newPackagePath, file);
7+
await _fsExtra.default.rename(filePath, newFilePath);
8+
}));
9+
- await _fsExtra.default.rm(_path.default.resolve(codegenAndroidPath, 'java/com/facebook'), {
10+
- recursive: true
11+
- });
12+
+ if (
13+
+ await _fsExtra.default.pathExists(
14+
+ _path.default.resolve(codegenAndroidPath, 'java/com/facebook/react/viewmanagers')
15+
+ )
16+
+ ) {
17+
+ // Keep the view managers
18+
+ await _fsExtra.default.rm(
19+
+ _path.default.resolve(codegenAndroidPath, 'java/com/facebook/fbreact'),
20+
+ { recursive: true }
21+
+ );
22+
+ } else {
23+
+ // Delete the entire facebook namespace
24+
+ await _fsExtra.default.rm(
25+
+ _path.default.resolve(codegenAndroidPath, 'java/com/facebook'),
26+
+ { recursive: true }
27+
+ );
28+
+ }
29+
}
30+
//# sourceMappingURL=patchCodegenAndroidPackage.js.map
31+
\ No newline at end of file

0 commit comments

Comments
 (0)