fix(formulus): align Android release packaging and version codes - #783
Merged
najuna-brian merged 1 commit intoAug 31, 2026
Conversation
najuna-brian
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align Android release packaging and version codes
Acknowledgements
Many thanks and ❤️ to @licaon-kter for identifying and clearly explaining the F-Droid version-code collision in #746.
We also greatly appreciate the ongoing work of the F-Droid maintainers and contributors. Their review, packaging, and reproducible-build efforts help make Formulus available through a trusted FOSS distribution channel.
Summary
Fix the Formulus Android release packaging and version-code strategy following the transition from ABI-specific GitHub APKs to a single universal APK.
This PR:
versionCodefrom36to40.CURRENT_PROJECT_VERSIONvalues to40.40,44,48, etc.armeabi-v7aarm64-v8ax86andx86_64.Closes #746.
Background
Version-code collision
The previous ABI-specific APK setup assigned consecutive version codes to different ABIs. For example, a base code of
36could produce GitHub APKs with codes36–39.F-Droid similarly derives four codes from the upstream source code:
40armeabi-v7a40arm64-v8a41x8642x86_6443After switching the GitHub artifact to a universal APK, the universal build used the unmodified base code
36. Android therefore treated it as a downgrade on devices with an ABI-specific APK using code37,38, or39.Base
40is the first code above:1.3.0block (35–38).1.3.1split range (36–39).APK size
The four-ABI universal APK included native libraries for ARM32, ARM64, x86, and x86_64, increasing its size from approximately 36 MB to 85 MB.
Normal GitHub and Play builds now target only:
armeabi-v7aarm64-v8aThis retains coverage for 32-bit and 64-bit physical Android devices without carrying emulator-focused x86 libraries in every direct download.
F-Droid remains able to build all four ABIs because its metadata explicitly invokes Gradle with
-PabiFilters=<abi>, bypassing the normal ARM-universal configuration.Version-code policy
Going forward, each distinct APK/AAB shipped on a GitHub Release or uploaded to Play should use the next four-code-aligned base:
The validator checks that:
versionCodeis divisible by four.versionNamematchesformulus/package.json.CURRENT_PROJECT_VERSIONvalues match Android.MARKETING_VERSIONmatchesformulus/package.json.The Android workflow runs this validation before building.
Validation
pnpm run validate:native-versionsgit diff --check-PabiFilters=x86A complete signed APK/AAB build was not run locally; CI will build and report the resulting artifact sizes.