feat(android): split release APK per ABI for F-Droid
All checks were successful
release / android (push) Successful in 13m47s

Adds a versionCodeOverride to build.gradle.kts (F-Droid requires distinct
versionCodes per split APK; Google Play's App Bundle is unaffected since
this only touches the application-variant/APK output). Bumps to 0.1.2+4.

Verified locally: flutter build apk --release --split-per-abi produces
app-{armeabi-v7a,arm64-v8a,x86_64}-release.apk with versionCode 31/32/33.
This commit is contained in:
vjrj 2026-07-17 17:36:18 +02:00
parent bfd29f19b9
commit 8bec7dcde2
5 changed files with 28 additions and 1 deletions

View file

@ -3,6 +3,13 @@
All notable changes to Tane are recorded here. Human-readable, newest
first. Dates are ISO (YYYY-MM-DD).
## [0.1.2] — 2026-07-17
### Changed
- Release builds now produce one split APK per CPU architecture (smaller
downloads) instead of a single universal APK, in addition to the App
Bundle Google Play already used. No user-visible change.
## [0.1.1] — 2026-07-17
### Changed

View file

@ -85,3 +85,21 @@ dependencies {
// Backport of Java 8+ APIs, required by flutter_local_notifications.
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
}
// F-Droid builds one split APK per ABI (smaller downloads than a universal
// APK) and needs each split to carry a distinct versionCode so its repo can
// tell them apart; `flutter build apk --split-per-abi` alone gives every
// split the same versionCode. This override only touches the APK
// (applicationVariants) output, not the App Bundle Google Play consumes, so
// Play's per-device delivery is unaffected.
val abiVersionCodes = mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86_64" to 3)
android.applicationVariants.all {
val variant = this
variant.outputs.all {
val output = this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
val abi = output.getFilter(com.android.build.OutputFile.ABI)
abiVersionCodes[abi]?.let { abiCode ->
output.versionCodeOverride = variant.versionCode * 10 + abiCode
}
}
}

View file

@ -0,0 +1 @@
Smaller downloads: release builds now ship one APK per phone architecture instead of one universal file. No other change.

View file

@ -0,0 +1 @@
Descargas más pequeñas: las versiones ahora reparten un APK por arquitectura de teléfono en vez de uno universal. Sin ningún otro cambio.

View file

@ -1,7 +1,7 @@
name: tane
description: "Tane — local-first, encrypted, decentralized traditional-seed inventory and market."
publish_to: 'none'
version: 0.1.1+3
version: 0.1.2+4
environment:
sdk: ^3.11.5