feat(android): bundle GeckoView and bump version to 1.0.2

This commit is contained in:
2026-10-18 19:19:58 +08:00
parent 867989e09b
commit 7f493e0f89
10 changed files with 532 additions and 408 deletions
+3 -4
View File
@@ -41,18 +41,17 @@ RUN curl -fsSL -o /tmp/tools.zip \
&& mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest" \
&& rm /tmp/tools.zip \
&& (yes | sdkmanager --licenses > /dev/null || true) \
&& sdkmanager "platform-tools" > /dev/null
&& sdkmanager "platform-tools" "platforms;android-37.0" > /dev/null
RUN flutter config --android-sdk "${ANDROID_HOME}" \
&& flutter --disable-analytics \
&& flutter precache --android \
&& flutter doctor
# 预热:跑一次与应用相同依赖的默认模板构建,把 Gradle 发行版/AGP/AndroidX
# 组件、插件 AAR 和 SDK 平台下载进镜像,之后挂载源码的正式构建不再重复下载
# 预热默认模板的 Gradle/AGP/AndroidX 和 SDK;GeckoView 的固定版本
# 在应用构建时从 Mozilla Maven 下载,不在这里预热旧 WebView 插件。
RUN flutter create --org dev.dsh --project-name warmup /tmp/warmup \
&& cd /tmp/warmup \
&& flutter pub add webview_flutter webview_flutter_android file_selector \
&& flutter build apk --release \
&& cd / && rm -rf /tmp/warmup \
&& flutter doctor