Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed Mar 14, 2024
1 parent 9a05a87 commit 053b677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_with_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ jobs:
- name: Generate AOT Snapshot
working-directory: ./lib/flutter_frontend_server
run: |
dart compile aot-snapshot frontend_server_starter.dart
cp frontend_server_starter.aot ../../build/${{ matrix.output }}/frontend_server_aot.dart.snapshot
dart compile aot-snapshot \
--output=frontend_server_aot.dart.snapshot \
frontend_server_starter.dart
cp frontend_server_aot.dart.snapshot ../../build/${{ matrix.output }}/frontend_server_aot.dart.snapshot
- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Growingio Dart Frontend AOP Project
### 下载AOP文件
请根据自己项目的flutter版本下载对应tag的 `frontend_server.dart.snapshot`.
比如说 flutter 3.3.9版本,需要下载 tag 3.3.9 下的 `frontend_server.dart.snapshot` 文件。
flutter 3.19.0起,还需下载`frontend_server_aot.dart.snapshot`文件。
flutter 3.19.0起,还需下载对应您当前的平台架构的`frontend_server_aot.dart.snapshot`文件。

### 覆盖源文件
需要在 flutter sdk下进行替换,位置分别为:
Expand Down Expand Up @@ -126,11 +126,9 @@ dart --deterministic --snapshot=frontend_server.dart.snapshot frontend_server_st
#### Flutter version 3.19.0

```cmd
dart compile aot-snapshot frontend_server_starter.dart
dart compile aot-snapshot --output=frontend_server_aot.dart.snapshot frontend_server_starter.dart
```

并将产物 frontend_server_starter.aot 手动重命名为 frontend_server_aot.dart.snapshot

> 注意:在当前架构 (darwin_arm64/darwin_x64/windows_x64) 运行该命令生成的产物只能在同一架构使用,因此需要对不同的架构分别进行打包,推荐使用 Github Actions 进行多环境打包而不是本地环境打包
>
> https://github.com/dart-lang/sdk/issues/28617
Expand Down

0 comments on commit 053b677

Please sign in to comment.