APK Size & Resource Hygiene
Detailed static-analysis report for apk size & resource hygiene.
Executive summary
The Costco APK / App Bundle ships both Coil and Glide for image loading, both Volley and Retrofit/OkHttp for HTTP, and both DBFlow and Room for persistence — duplicate stacks add real megabytes. ML Kit (barcode + text recognition), 11 Adobe Marketing Cloud modules, and 693 locale-resource directories also contribute. ABI splits and per-language bundle splits are not configured, so the APK is single-universal and untrimmed for global distribution.
Resource inventory
431 PNG · 411 XML vector
(main module values/)
Across all modules
Distinct in libs.versions.toml
geofence + productdetaillanding only
Heavy dependencies (estimated APK contribution)
Rough order-of-magnitude estimates based on typical install sizes. Real numbers can be verified with ./gradlew :Costco:bundleRelease + bundletool build-apks.
| Dependency | Version | Est. impact | Status |
|---|---|---|---|
| Glide + Coil (dual) | 5.0.5 / 2.7.0 | ~3-4 MB redundant | REMOVE ONE |
| Volley + Retrofit/OkHttp (dual) | 1.2.1 / 3.0.0 / 5.3.2 | ~1-2 MB redundant | REMOVE VOLLEY |
| Room + DBFlow (dual) | 2.8.4 / 4.2.4 | ~1 MB + duplicate codegen | REMOVE DBFLOW |
| Adobe Marketing Cloud (11 modules) | BOM 3.17.0 | ~2-3 MB | Required by analytics; consolidate if possible |
| ML Kit barcode + text recognition | 17.3.0 / 16.0.1 | ~4-5 MB | Use Play-on-demand modules |
| Firebase BOM (multiple) | 33.7.0 | ~3-4 MB | Standard cost |
| Compose BOM | 2026.02.01 | ~3-5 MB | Standard cost |
| Google Play Services (Maps + Location) | 20.0.0 / 21.3.0 | ~2-3 MB | Standard cost |
| NokNok FIDO2 + ThreatMetrix | 9.2.0 / 7.7-71 | ~2-3 MB | Required for passkey + fraud detection |
| ExoPlayer | 1.9.2 | ~1-2 MB | Required for media |
| Lottie | 6.7.1 | ~500 KB | Acceptable |
Findings
No ABI splits / language splits configured
./gradlew :Costco:bundleRelease) — Play Store handles language + ABI splits automatically. If APK is required, add splits { abi { enable = true } } in Costco/build.gradle.Dual image-loading libraries
coil-compose + coil-svg integrations.Dual networking stacks (Volley + Retrofit/OkHttp)
VolleyManager Hilt module.Dual persistence (Room + DBFlow)
431 PNG drawables (vs 411 XML vectors)
VectorDrawable.Dark-mode resources only in 2 modules
values-night/ exists in shared/geofence and feature/productdetaillanding only — the rest of the app has no dark variants.shared/pallet. Add values-night/colors.xml per design-token build.Lint baseline absent
lint-baseline.xml located. Lint runs likely produce a wall of legacy noise../gradlew :Costco:lintDebug + commit lint-baseline.xml); review baseline diffs in PR.Recommended size-tracking workflow
android-apk-size Gradle plugin or diffuse CLI in CI; publish the diff to the PR comments.