feat: Build and release per-architecture APKs (#550)

* feat: Build and release per-architecture APKs

This commit modifies the build process to generate separate APKs for different CPU architectures (arm64-v8a, x86_64) and a universal APK. This allows for smaller, optimized downloads for users and provides specific builds for platforms like Chromebooks.

Key changes:
- In `app/build.gradle.kts`, enables ABI splits to create `arm64-v8a`, `x86_64`, and `universal` APKs during the `assembleRelease` task.
- Updates the `release.yml` GitHub Actions workflow to rename and upload each of these APKs as distinct release assets.
- Removes the previous `arm64-v8a` only filter to allow for multi-architecture builds.

* feat: Allow manual triggering of Android CI workflow

This adds the `workflow_dispatch` event to the `android-build.yml` GitHub Actions workflow.

This change enables the Android CI pipeline to be run manually from the GitHub UI, in addition to the existing triggers for pushes and pull requests.
This commit is contained in:
Moe Hamade
2026-01-05 17:28:53 +07:00
committed by GitHub
parent eef831fe60
commit 68407e3b47
3 changed files with 32 additions and 23 deletions
+12 -5
View File
@@ -43,13 +43,20 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
ndk {
// ARM64-only to minimize APK size (~5.8MB savings)
// Excludes x86_64 as emulator not needed for production builds
abiFilters += listOf("arm64-v8a")
}
}
}
// APK splits for GitHub releases - creates arm64, x86_64, and universal APKs
// AAB for Play Store handles architecture distribution automatically
splits {
abi {
isEnable = true
reset()
include("arm64-v8a", "x86_64")
isUniversalApk = true // For F-Droid and fallback
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8