Overview › APK Size & Resource Hygiene

APK Size & Resource Hygiene

Detailed static-analysis report for apk size & resource hygiene.

Source: codebase scan · 2026-05-07

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

Drawable files
842

431 PNG · 411 XML vector

strings.xml entries
439

(main module values/)

colors.xml entries
69
Locale folders
693

Across all modules

External deps
126

Distinct in libs.versions.toml

values-night/
2

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.

DependencyVersionEst. impactStatus
Glide + Coil (dual)5.0.5 / 2.7.0~3-4 MB redundantREMOVE ONE
Volley + Retrofit/OkHttp (dual)1.2.1 / 3.0.0 / 5.3.2~1-2 MB redundantREMOVE VOLLEY
Room + DBFlow (dual)2.8.4 / 4.2.4~1 MB + duplicate codegenREMOVE DBFLOW
Adobe Marketing Cloud (11 modules)BOM 3.17.0~2-3 MBRequired by analytics; consolidate if possible
ML Kit barcode + text recognition17.3.0 / 16.0.1~4-5 MBUse Play-on-demand modules
Firebase BOM (multiple)33.7.0~3-4 MBStandard cost
Compose BOM2026.02.01~3-5 MBStandard cost
Google Play Services (Maps + Location)20.0.0 / 21.3.0~2-3 MBStandard cost
NokNok FIDO2 + ThreatMetrix9.2.0 / 7.7-71~2-3 MBRequired for passkey + fraud detection
ExoPlayer1.9.2~1-2 MBRequired for media
Lottie6.7.1~500 KBAcceptable

Findings

HIGH

No ABI splits / language splits configured

A single universal APK ships every architecture (arm64, armv7, x86_64) and every language. Users download megabytes they will never use.
Recommendation: Switch release distribution to App Bundle (./gradlew :Costco:bundleRelease) — Play Store handles language + ABI splits automatically. If APK is required, add splits { abi { enable = true } } in Costco/build.gradle.
HIGH

Dual image-loading libraries

Coil 2.7.0 (Compose-native) + Glide 5.0.5 (Views-native) — pick one. Each has its own disk cache and bitmap pool.
Recommendation: Migrate Glide call sites to Coil (Compose) or use Coil + the coil-compose + coil-svg integrations.
HIGH

Dual networking stacks (Volley + Retrofit/OkHttp)

Two HTTP clients double the surface for retries, timeouts, observability, and security. Volley is the legacy stack.
Recommendation: Migrate Volley call sites to Retrofit. Remove Volley + the VolleyManager Hilt module.
HIGH

Dual persistence (Room + DBFlow)

DBFlow 4.2.4 is unmaintained (last release 2018). Room is the Google-backed standard.
Recommendation: Migrate any DBFlow tables to Room. Remove DBFlow + KAPT processor.
MEDIUM

431 PNG drawables (vs 411 XML vectors)

Roughly half the drawables are still bitmap PNGs. Single-color iconography should always be VectorDrawable.
Recommendation: Convert single-color icons to vectors. For multi-color illustrations, use WebP at the appropriate density.
MEDIUM

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.
Recommendation: Define dark color tokens in shared/pallet. Add values-night/colors.xml per design-token build.
LOW

Lint baseline absent

No lint-baseline.xml located. Lint runs likely produce a wall of legacy noise.
Recommendation: Generate a baseline (./gradlew :Costco:lintDebug + commit lint-baseline.xml); review baseline diffs in PR.
INFO

Recommended size-tracking workflow

Track release-over-release APK size, fail PRs that exceed a budget by more than X%.
Recommendation: Adopt the android-apk-size Gradle plugin or diffuse CLI in CI; publish the diff to the PR comments.
Costco Android · Code Review Report · Generated 2026-05-07 · 626 machine-curated findings