上游源码合并与功能更新 #9
@@ -12,6 +12,10 @@ permissions:
|
||||
contents: write
|
||||
releases: write
|
||||
|
||||
env:
|
||||
PUB_HOSTED_URL: https://pub.flutter-io.cn
|
||||
FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn
|
||||
|
||||
jobs:
|
||||
android:
|
||||
name: Build Android APK
|
||||
@@ -113,7 +117,7 @@ jobs:
|
||||
flutter doctor -v
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile
|
||||
|
||||
- name: Restore Android signing files
|
||||
shell: bash
|
||||
@@ -145,7 +149,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
rm -rf build dist .dart_tool android/.gradle
|
||||
rm -rf build dist android/.gradle
|
||||
|
||||
pkg_dir="$PWD/dist/android"
|
||||
if [ -d "$pkg_dir" ]; then
|
||||
@@ -153,7 +157,7 @@ jobs:
|
||||
rm -rf "$pkg_dir"
|
||||
fi
|
||||
|
||||
build_args=(--release)
|
||||
build_args=(--release --no-pub)
|
||||
if [ -n "${IP_NODE_API_BASE_URL:-}" ]; then
|
||||
build_args+=("--dart-define=IP_NODE_API_BASE_URL=${IP_NODE_API_BASE_URL}")
|
||||
fi
|
||||
|
||||
@@ -160,6 +160,14 @@ Linux: Debian 12
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
如果当前网络无法解析 `pub.dev`,先设置 Pub/Flutter 镜像:
|
||||
|
||||
```powershell
|
||||
$env:PUB_HOSTED_URL="https://pub.flutter-io.cn"
|
||||
$env:FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn"
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
### 运行项目
|
||||
|
||||
```bash
|
||||
@@ -170,11 +178,11 @@ flutter run # pdf 和 音视频会再构建过程中下载github上的依赖,
|
||||
|
||||
```bash
|
||||
# Android
|
||||
flutter build apk --release
|
||||
flutter build apk --release --no-pub
|
||||
# Linux
|
||||
flutter build -d linux --release
|
||||
flutter build -d linux --release --no-pub
|
||||
# windows
|
||||
flutter build -d windows --release
|
||||
flutter build -d windows --release --no-pub
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user