Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

build(android): default release APK to arm64

tianma-if820044f18397
diff --git a/AGENTS.md b/AGENTS.md
index df1c5c0a..cc9ac8f1 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -34,7 +34,7 @@ Release 以上一个实际发布的正式 Release 为基线,审计完整提交
验证失败时不得发布正式 Release。
-每个正式 Release 必须附带可安装的 Android APK。若完整变更区间影响移动端代码、其共享依赖、原生配置或 APK 构建,则从本次发布提交重新构建生产签名 APK;否则可复用最近的兼容 APK,并在正文中注明来源 Release。发布前验证 APK 版本、签名、SHA-256 及下载可用性。
+每个正式 Release 必须附带可安装的 Android APK。GitHub APK 默认仅构建 `arm64-v8a`;只有出现明确兼容需求时才额外提供其他 ABI,Play AAB 仍保留全部架构。若完整变更区间影响移动端代码、其共享依赖、原生配置或 APK 构建,则从本次发布提交重新构建生产签名 APK;否则可复用最近的兼容 APK,并在正文中注明来源 Release。发布前验证 APK 版本、签名、SHA-256 及下载可用性。
## Cloudflare 自动部署约束
diff --git a/docs/mobile-build.md b/docs/mobile-build.md
index 5fcf2b72..70669596 100644
--- a/docs/mobile-build.md
+++ b/docs/mobile-build.md
@@ -36,13 +36,13 @@ The APK is uploaded as a GitHub Actions artifact named `edgeever-android-debug-a
### GitHub Release APK
-Every formal GitHub Release must include a directly installable APK. Build the production-signed, multi-architecture APK on the release Mac:
+Every formal GitHub Release must include a directly installable APK. Build the production-signed `arm64-v8a` APK on the release Mac:
```sh
bun run build:android:apk:local
```
-This produces `apps/mobile/android/app/build/outputs/apk/release/app-release.apk`. Verify its application version, signer, and SHA-256 before uploading it to the matching GitHub Release. A release whose audited change range affects mobile runtime code, shared code used by mobile, mobile dependencies, native configuration, or APK build tooling must rebuild the APK from that release commit.
+This produces `apps/mobile/android/app/build/outputs/apk/release/app-release.apk`. Verify its application version, signer, and SHA-256 before uploading it to the matching GitHub Release. Additional ABIs should only be published for an explicit compatibility need; the Play AAB continues to include all supported architectures. A release whose audited change range affects mobile runtime code, shared code used by mobile, mobile dependencies, native configuration, or APK build tooling must rebuild the APK from that release commit.
If the audited change range does not affect the mobile binary, the most recent compatible, verified APK may be attached again without rebuilding. Keep its original versioned filename and checksum, and state the source release explicitly; never rename an older binary to the current release version.
diff --git a/scripts/build-android-local.sh b/scripts/build-android-local.sh
index 9c51dbfa..ce23cbea 100755
--- a/scripts/build-android-local.sh
+++ b/scripts/build-android-local.sh
@@ -84,13 +84,14 @@ fi
: "${ANDROID_KEY_PASSWORD:?请设置 ANDROID_KEY_PASSWORD}"
PLAY_ARCHS="${EDGE_EVER_ANDROID_ARCHS:-armeabi-v7a,arm64-v8a,x86,x86_64}"
+APK_ARCHS="${EDGE_EVER_ANDROID_APK_ARCHS:-arm64-v8a}"
KEYSTORE_FILE="$(cd "$(dirname "$ANDROID_KEYSTORE_FILE")" && pwd)/$(basename "$ANDROID_KEYSTORE_FILE")"
if [[ "$MODE" == "apk" ]]; then
- echo "构建生产签名 APK(${PLAY_ARCHS})..."
+ echo "构建生产签名 APK(${APK_ARCHS})..."
./gradlew assembleRelease \
"${COMMON_ARGS[@]}" \
- -PreactNativeArchitectures="$PLAY_ARCHS" \
+ -PreactNativeArchitectures="$APK_ARCHS" \
-Pandroid.injected.signing.store.file="$KEYSTORE_FILE" \
-Pandroid.injected.signing.store.password="$ANDROID_KEYSTORE_PASSWORD" \
-Pandroid.injected.signing.key.alias="$ANDROID_KEY_ALIAS" \