APK is 27.7 MB since v1.3.2 (was 5.1 MB): ML Kit barcode scanner ships four ABIs

The Android build grew from 5.1 MB (v1.3.1) to 27.7 MB (v1.3.2 and v1.3.3). unzip -l on openGym-1.3.3.apk:

file size
classes.dex 9.5 MB
lib/x86/libbarhopper_v3.so 6.1 MB
lib/x86_64/libbarhopper_v3.so 5.9 MB
lib/arm64-v8a/libbarhopper_v3.so 4.9 MB
lib/armeabi-v7a/libbarhopper_v3.so 3.2 MB

libbarhopper_v3 is Google ML Kit's barcode model, pulled in by @capacitor-mlkit/barcode-scanning for the gym membership QR check-in (a797729d, v1.3.2). Nothing is wrong with the feature; the cost is 20 MB of native code for four ABIs plus the ML Kit classes, on a phone that only needs one ABI.

Options, cheapest first:

  1. ABI splits / abiFilters in frontend/android/app/build.gradle: ship arm64-v8a (and armeabi-v7a if we still care about 2016 phones); drop x86/x86_64 — no real phone runs them. Saves ~12 MB on its own.
  2. Unbundled ML Kit variant (barcode-scanning via Google Play services instead of barcode-scanning-bundled model): the model downloads on first use, the APK loses libbarhopper entirely. Trade-off: first scan needs Play services + network, which breaks on de-Googled phones — so probably not for openGym.
  3. ProGuard/R8 minify for release: classes.dex 9.5 MB is unminified. Needs a keep-rule check for Capacitor plugins.

Worth doing before the in-app updater (v1.3.3) makes people download this on every release.