Story: E01.S01 (Phase 1 Pilot v1, Sprint P1)
Epic: EPIC-PROD-01 Foundation Hardening
Points: 2
Problem
app/google-services.json is gitignored. A fresh checkout fails AGP's :app:processDebugGoogleServices task because the file doesn't exist — a known blocker called out in epic-prod-overview.md (10 silent stubs, item 5).
Fix
Implements the AC's "Option B" gate (the AC explicitly allows this when license/security forbids committing real Firebase config — which is the right call here):
- Commit
app/google-services.json.template with stub but structurally valid values. AGP's parser accepts it; processGoogleServices succeeds; runtime Firebase calls fail loudly via AppStartupInitializer.confirmFirebase (E01.S07) instead of silently no-op'ing
- Add a Gradle configuration-time hook in
app/build.gradle.kts that materialises app/google-services.json if missing:
- Honor
-Pfirebase.config.path=/abs/path if provided (CI + developers with real creds)
- Otherwise copy from the template with a warning log
- Hard-fail with an actionable error if neither exists
app/google-services.json stays gitignored — real Firebase config never enters version control
- README section under "Getting Started" documents both setup paths
Acceptance criteria
Deferred (out of P1 scope)
- "Staging and release flavors point to separate Firebase projects" AC bullet — the app has no
staging productFlavor today; adding flavors is a larger refactor. Template covers org.hogwarts.android (release) + org.hogwarts.android.debug (debug). Staging flavor folds into E27 release pipeline work in Phase 2.
Source: .bmad/epics/epic-prod-01-foundation-hardening.md
Story: E01.S01 (Phase 1 Pilot v1, Sprint P1)
Epic: EPIC-PROD-01 Foundation Hardening
Points: 2
Problem
app/google-services.jsonis gitignored. A fresh checkout fails AGP's:app:processDebugGoogleServicestask because the file doesn't exist — a known blocker called out inepic-prod-overview.md(10 silent stubs, item 5).Fix
Implements the AC's "Option B" gate (the AC explicitly allows this when license/security forbids committing real Firebase config — which is the right call here):
app/google-services.json.templatewith stub but structurally valid values. AGP's parser accepts it;processGoogleServicessucceeds; runtime Firebase calls fail loudly viaAppStartupInitializer.confirmFirebase(E01.S07) instead of silently no-op'ingapp/build.gradle.ktsthat materialisesapp/google-services.jsonif missing:-Pfirebase.config.path=/abs/pathif provided (CI + developers with real creds)app/google-services.jsonstays gitignored — real Firebase config never enters version controlAcceptance criteria
./gradlew :app:processDebugGoogleServicessucceeds with no manual file placement-Pfirebase.config.path=/abs/pathoverrides the templateapp/google-services.jsonremains gitignored (template is the only file in version control)Deferred (out of P1 scope)
stagingproductFlavor today; adding flavors is a larger refactor. Template coversorg.hogwarts.android(release) +org.hogwarts.android.debug(debug). Staging flavor folds into E27 release pipeline work in Phase 2.Source:
.bmad/epics/epic-prod-01-foundation-hardening.md