rouse-context/api
Jason Monk ece9639d0f
Fix #233: Wire up Firebase Crashlytics for release builds (#261)
Post-ship crashes now surface in the Firebase console so we can react to
regressions without waiting for users to file manual bug reports. Debug
builds skip collection so local repros don't pollute the dashboard.

- Add Crashlytics Gradle plugin + dependency (piggybacks on the existing
  google-services.json already shipped for FCM, so no new secrets).
- Release builds upload R8 mapping files via the plugin so stack traces
  in the console stay deobfuscated; debug builds skip that slow step.
- Add a thin CrashReporter interface in :api so :app, :work, and other
  feature modules can log caught exceptions without taking a direct
  dependency on Firebase. Production impl (FirebaseCrashReporter) lives
  in :app; all other modules see only the contract plus CrashReporter.NoOp.
- Initialize collection state in RouseApplication.configureCrashReporting
  gated on BuildConfig.DEBUG — release builds collect by default, debug
  builds stay silent.
- Surface previously-swallowed failures at the sites called out in the
  issue: cert provisioning storage/key-gen failures in IntegrationSetup,
  tunnel connect/session-handler errors in TunnelForegroundService,
  terminal KeyGenerationFailed + CnMismatch outcomes in CertRenewalWorker,
  and KeyInfo inspection failures in AndroidKeystoreDeviceKeyManager.
  Uncaught exceptions are still handled automatically by Crashlytics'
  default UncaughtExceptionHandler, so these explicit reports only cover
  the paths we'd otherwise lose.

Privacy note: enabling Crashlytics collects crash stacks + Firebase
installation IDs, which will change the Play Store data-safety
declaration when we list. A user-facing opt-out toggle was scoped out
of this PR (see follow-up candidates) — current behaviour is on-by-
default for release builds.

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-18 21:46:22 -04:00
..
src Fix #233: Wire up Firebase Crashlytics for release builds (#261) 2026-04-18 21:46:22 -04:00
build.gradle.kts Fix #248: Add Kover coverage measurement + CI aggregated report (#254) 2026-04-18 17:11:09 -04:00