You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(telemetry): ship Firebase Analytics and Crashlytics in the Play build only
Adds a `distribution` flavor dimension to :app. `opensource` — the default, and
what the GitHub release APK is built from — carries no Google Play Services
libraries at all; `play` adds Analytics and Crashlytics for the Play Store AAB.
Everything else about the two is identical.
The `play` variants only exist when app/src/play/google-services.json is there.
Without it the Firebase plugins are never applied and the task list is exactly
what it was before this dimension existed, so a fresh clone builds unchanged and
a Play task fails with "task not found" rather than quietly producing a Play
build with Firebase missing. The file is gitignored — including at the module
root, where the plugin would apply it to *every* flavor and leak the config into
the open-source APK.
Code under src/main only ever calls `Telemetry`; each flavor binds it to
Firebase or to nothing. Events hang off BaseInstallController, where all five
install backends converge: install_started and install_result, with a failure
kind spelled out per case so R8 renaming can't change what a metric means.
Timber warnings become Crashlytics breadcrumbs and Timber.e(throwable) a
non-fatal. Nothing reports what the user installed — no package names, app
names, file names or URIs.
Verified by build: the opensource APK contains zero Crashlytics and measurement
classes and none of the Firebase config strings, the play APK contains both, and
the mapping-file upload task is wired into playRelease only.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments