Skip to content

Commit 5de48e4

Browse files
author
Asher
committed
Merge origin/master into copilot/fix-d92777e4 (RN 0.85 升级线)
背景 - 本轮 RN 0.85 升级所基于的 master 节点(4164792)比 origin/master 头部 a41c316 落后 28 个提交 - 上游 28 提交包含: RN 0.74 -> 0.80.2 升级(55bbe20) + GitHub Actions CI/Release workflow + README/README_EN 更新 + doc/*.png 架构图资源 + ios/PrivacyInfo.xcprivacy + 部分 patches (spinkit/version-number) - 因此把 origin/master 合入当前升级线, 保留 0.85 升级所有产出, 同时纳入上游的 CI / 文档 / 资源等纯增量 冲突解决策略 - 取 --ours (RN 0.85 升级最终态): - android/build.gradle (SDK 36 / Kotlin 2.1 / NDK 27 / aliyun mirror) - android/gradle/wrapper/gradle-wrapper.properties (gradle 8.13) - package.json / package-lock.json (RN 0.85 / react 19.2.3 / reanimated 4.3 / worklets 0.8.3 / screens 4.24 / gesture-handler 2.31 等) - ios/Podfile.lock / ios/GSYGithubApp.xcodeproj/project.pbxproj (RN 0.85 prebuilt + RCT_REMOVE_LEGACY_ARCH=1) - patches/realm+20.1.0.patch (0.85 完整版含 RealmReactModule.mm nil-guard, 见 KI-016) - 手动合并: - .gitignore: 同时保留 .cxx/ + ios/.xcode.env.local - README.md: 标题"RN 0.85.0 版本"; 第三方框架表使用本轮升级后的精确版本号 - auto-merge 纳入上游纯增量: - .github/workflows/ci.yml (新增 CI 流程) - doc/*.png 4 个架构图资源 - ios/GSYGithubApp/PrivacyInfo.xcprivacy - patches/react-native-spinkit-fix-new+1.1.4.patch - patches/react-native-version-number-fix-new+0.3.6.patch - app/components/{AboutPage,RepositoryDetailFilePage}.js / app/components/widget/{CustomWebComponent,UserHeadItem}.js / babel.config.js (上游纯改动, 与 0.85 升级不冲突) 验证 - npm test: 26 passed / 1 skipped (KI-015) / 0 failed / 0.352s - 工作树无残余冲突标记
2 parents 7319866 + a41c316 commit 5de48e4

14 files changed

Lines changed: 293 additions & 93 deletions

.github/workflows/ci.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
pull_request:
10+
paths-ignore:
11+
- '**/*.md'
12+
- '**/*.txt'
13+
- '**/*.png'
14+
- '**/*.jpg'
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Free Disk Space
22+
uses: jlumbroso/free-disk-space@main
23+
with:
24+
tool-cache: false
25+
android: false
26+
dotnet: true
27+
haskell: true
28+
large-packages: true
29+
docker-images: true
30+
swap-storage: true
31+
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: '20'
39+
cache: 'npm'
40+
41+
- name: Setup Java
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: 'zulu'
45+
java-version: '21'
46+
47+
- name: Create ignoreConfig.js
48+
run: |
49+
cat > app/config/ignoreConfig.js << 'EOF'
50+
export const CLIENT_ID = "${{ secrets.CLIENT_ID }}";
51+
export const CLIENT_SECRET = "${{ secrets.CLIENT_SECRET }}";
52+
export const ACCESS_KEY = "";
53+
export const SECRET_KEY = "";
54+
export const QN_HOST = "";
55+
export const SCOPE = "";
56+
EOF
57+
58+
- name: Install dependencies
59+
run: npm install
60+
61+
- name: Build Android Release APK
62+
run: npx react-native build-android --mode=release
63+
64+
- name: Setup bundletool
65+
run: |
66+
curl -L -o bundletool.jar https://github.com/google/bundletool/releases/download/1.15.6/bundletool-all-1.15.6.jar
67+
68+
- name: Extract APK from AAB
69+
run: |
70+
java -jar bundletool.jar build-apks \
71+
--bundle=android/app/build/outputs/bundle/release/app-release.aab \
72+
--output=app.apks \
73+
--mode=universal \
74+
--ks=android/gsygithubapp-debug.jks \
75+
--ks-pass=pass:123456 \
76+
--ks-key-alias=debug \
77+
--key-pass=pass:123456
78+
mkdir -p android/app/build/outputs/apk/release
79+
unzip -p app.apks universal.apk > android/app/build/outputs/apk/release/app-release.apk
80+
81+
82+
83+
apk:
84+
name: Generate APK
85+
if: startsWith(github.ref, 'refs/tags/')
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Free Disk Space
89+
uses: jlumbroso/free-disk-space@main
90+
with:
91+
tool-cache: false
92+
android: false
93+
dotnet: true
94+
haskell: true
95+
large-packages: true
96+
docker-images: true
97+
swap-storage: true
98+
99+
- name: Checkout
100+
uses: actions/checkout@v4
101+
102+
- name: Setup Node.js
103+
uses: actions/setup-node@v4
104+
with:
105+
node-version: '20'
106+
cache: 'npm'
107+
108+
- name: Setup Java
109+
uses: actions/setup-java@v4
110+
with:
111+
distribution: 'zulu'
112+
java-version: '21'
113+
114+
- name: Create ignoreConfig.js
115+
run: |
116+
cat > app/config/ignoreConfig.js << 'EOF'
117+
export const CLIENT_ID = "${{ secrets.CLIENT_ID }}";
118+
export const CLIENT_SECRET = "${{ secrets.CLIENT_SECRET }}";
119+
export const ACCESS_KEY = "";
120+
export const SECRET_KEY = "";
121+
export const QN_HOST = "";
122+
export const SCOPE = "";
123+
EOF
124+
125+
- name: Install dependencies
126+
run: npm install
127+
128+
- name: Build Android Release APK
129+
run: npx react-native build-android --mode=release
130+
131+
132+
- name: Setup bundletool
133+
run: |
134+
curl -L -o bundletool.jar https://github.com/google/bundletool/releases/download/1.15.6/bundletool-all-1.15.6.jar
135+
136+
- name: Extract APK from AAB
137+
run: |
138+
java -jar bundletool.jar build-apks \
139+
--bundle=android/app/build/outputs/bundle/release/app-release.aab \
140+
--output=app.apks \
141+
--mode=universal \
142+
--ks=android/gsygithubapp-debug.jks \
143+
--ks-pass=pass:123456 \
144+
--ks-key-alias=debug \
145+
--key-pass=pass:123456
146+
mkdir -p android/app/build/outputs/apk/release
147+
unzip -p app.apks universal.apk > android/app/build/outputs/apk/release/app-release.apk
148+
149+
- name: Upload APK
150+
uses: actions/upload-artifact@v4
151+
with:
152+
name: apk
153+
path: android/app/build/outputs/apk/release/app-release.apk
154+
155+
release:
156+
name: Release APK
157+
needs: apk
158+
if: startsWith(github.ref, 'refs/tags/')
159+
runs-on: ubuntu-latest
160+
steps:
161+
- name: Download APK from build
162+
uses: actions/download-artifact@v4
163+
with:
164+
name: apk
165+
166+
- name: Display structure of downloaded files
167+
run: ls -R
168+
169+
- name: Create Release
170+
id: create_release
171+
uses: actions/create-release@v1.1.4
172+
env:
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174+
with:
175+
tag_name: ${{ github.ref }}
176+
release_name: ${{ github.ref }}
177+
178+
- name: Upload Release APK
179+
id: upload_release_asset
180+
uses: actions/upload-release-asset@v1.0.1
181+
env:
182+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183+
with:
184+
upload_url: ${{ steps.create_release.outputs.upload_url }}
185+
asset_path: ./app-release.apk
186+
asset_name: app-release.apk
187+
asset_content_type: application/zip

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}

README.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
1010
* ### 同款Weex版本 ( https://github.com/CarGuo/GSYGithubAppWeex
1111
* ### 同款Flutter版本 ( https://github.com/CarGuo/GSYGithubAppFlutter
12-
* ### 同款Android Kotlin版本( https://github.com/CarGuo/GSYGithubAppKotlin
12+
* ### 同款Android Kotlin View版本( https://github.com/CarGuo/GSYGithubAppKotlin
13+
* ### 同款Android Compose版本( https://github.com/CarGuo/GSYGithubAppKotlinCompose
1314

1415
```
15-
基于React Native开发,适配Android与IOS
16+
基于React Native开发,适配 Android 与 iOS
1617
1718
项目的目的是为方便个人日常维护和查阅Github,更好的沉浸于码友之间的互基,Github就是你的家。
1819
@@ -22,6 +23,8 @@
2223
```
2324
-----
2425

26+
27+
[![Github Actions](https://github.com/CarGuo/GSYGithubAPP/workflows/CI/badge.svg)](https://github.com/CarGuo/GSYGithubAPP/actions)
2528
[![GitHub stars](https://img.shields.io/github/stars/CarGuo/GSYGithubAPP.svg)](https://github.com/CarGuo/GSYGithubAPP/stargazers)
2629
[![GitHub forks](https://img.shields.io/github/forks/CarGuo/GSYGithubAPP.svg)](https://github.com/CarGuo/GSYGithubAPP/network)
2730
[![GitHub issues](https://img.shields.io/github/issues/CarGuo/GSYGithubAPP.svg)](https://github.com/CarGuo/GSYGithubAPP/issues)
@@ -105,30 +108,40 @@
105108

106109
## 相关文章
107110

108-
- ### [1、从Android到React Native开发(一、入门)](https://juejin.im/post/58ac5b4c8ac2474faab25d1c)
111+
- ### [React Native 系列文章](https://juejin.cn/column/7535355162316505142)
109112

110-
- ### [2、从Android到React Native开发(二、通信与模块实现)](https://juejin.im/post/58bc07c5ac502e006b07f434)
111113

112-
- ### [3、从Android到React Native开发(三、自定义原生控件支持)](https://juejin.im/post/5946253561ff4b006cee4d65)
114+
### 示例图片
113115

114-
- ### [4、从Android到React Native开发(四、打包流程和发布为Maven库)](https://juejin.im/post/5b2116466fb9a01e3128359f)
116+
![](./1.gif)
115117

116-
- ### [React Native 的未来与React Hooks](https://juejin.im/post/5cb34404f265da0384127fcd)
118+
<img src="http://img.cdn.guoshuyu.cn/showapp1.jpg" width="426px"/>
117119

118-
- ### [移动端跨平台开发的深度解析](https://juejin.im/post/5b395eb96fb9a00e556123ef)
120+
<img src="http://img.cdn.guoshuyu.cn/showapp2.jpg" width="426px"/>
119121

120-
- ### [全网最全 Flutter 与 React Native 深入对比分析](https://juejin.im/post/5d0bac156fb9a07ec56e7f15)
122+
<img src="http://img.cdn.guoshuyu.cn/showapp3.jpg" width="426px"/>
121123

122124

123-
### 示例图片
125+
### 架构图
124126

125-
![](./1.gif)
127+
#### 系统结构
126128

127-
<img src="http://img.cdn.guoshuyu.cn/showapp1.jpg" width="426px"/>
129+
![](./doc/SystemArchitecture.png)
130+
131+
#### 导航结构
132+
133+
![](./doc/NavigationStructure.png)
134+
135+
#### 授权流程
136+
137+
![](./doc/AuthenticationSystem.png)
138+
139+
140+
#### 数据流程
141+
142+
![](./doc/CoreComponentsandDataFlow.png)
128143

129-
<img src="http://img.cdn.guoshuyu.cn/showapp2.jpg" width="426px"/>
130144

131-
<img src="http://img.cdn.guoshuyu.cn/showapp3.jpg" width="426px"/>
132145

133146
### 第三方框架
134147

0 commit comments

Comments
 (0)