refactor(build): unify SDK configuration and release tooling
Gitea CI / Check code and tests (pull_request) Failing after 8m56s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 4s

Pin Flutter with FVM and share local environment loading across IDE, Python, and Dart entrypoints. Keep CI on the verified preinstalled SDK and skip local overrides.

Extract common build presets, process execution, and file hashing. Propagate project roots through SDK selection and release commands, and migrate macOS release, signing, and DMG orchestration to Python.

Reuse local check suites in CI, support Android source overrides, and update documentation and regression tests.
This commit is contained in:
lingjhf committed 2026-10-06 22:24:32 +08:00
1 parent ca2efdaf18
commit 152c051a29
57 files changed
+1858 -375

No files matched your search

+8 -6
View File
@@ -13,9 +13,7 @@ python3 tool/check_public_repository.py
该检查覆盖 Git 跟踪及未被忽略的待提交文件,可识别常见凭据格式、误纳入的本地产物和失效的本地文档链接;不代替 Git 历史审计,也不能识别任意自定义密码。
```sh
flutter pub get
dart analyze --fatal-infos
flutter test test packages/cutdex_ui/test packages/cutdex_native/test
fvm dart tool/flutter_local.dart pub get
# Python 3.11+
python3 tool/check.py
```
@@ -27,15 +25,19 @@ python3 tool/check.py
| [integration_test](../integration_test/README.md) | 对应平台上的真实预览、媒体编辑与处理任务 |
| [tool](../tool/README.md) | 脚本检查、发布包验证和平台诊断 |
本地完整检查与 CI 共用相同的套件,可用 `python3 tool/check.py --suite analyze`、
`--suite flutter` 或 `--suite tools` 单独执行或重试。静态分析启用 `--fatal-infos`;
Flutter 套件同时运行应用与内部包测试。所有入口使用项目 SDK 和相同环境加载规则。
App 测试验证宿主行为,底层算法、协议及插件生命周期在所属包测试。普通测试通过不代表真实播放或模型质量已经验证。
## 生成文件
```sh
dart run build_runner build
fvm dart run build_runner build
# UI 模型修改后,在 packages/cutdex_ui 中运行相同生成命令
flutter gen-l10n
flutter test test/generated_code_test.dart test/localization_resources_test.dart
fvm dart tool/flutter_local.dart gen-l10n
fvm dart tool/flutter_local.dart test test/generated_code_test.dart test/localization_resources_test.dart
```
生成文件应与源码一同提交。生成校验会重新生成应用与 UI 包并比较前后内容,同时检查应用生成文件的跟踪状态;不要暂存无关文件来掩盖失败。