Files
crowd-funder-for-time-pwa/AGENTS.md
T

2.2 KiB

Agent Instructions for crowd-funder-for-time-pwa

Android Build — Google Play Services / FOSS Compatibility

Firebase is on by default for Android and iOS builds. Do not turn it off unless the build is an exceptional FOSS/F-Droid artifact.

android/app/google-services.json is required when Firebase is enabled. It does not decide the switch: a missing file fails the build, and a file on disk is ignored when Firebase is explicitly disabled.

  • Default (local, test, production, Play Store): ./gradlew assembleRelease or ./gradlew bundleRelease — do not pass -PfirebaseEnabled.
  • Opt out (F-Droid / FOSS): ./gradlew assembleRelease -PfirebaseEnabled=false, or an npm :nostore script such as npm run build:android:test:nostore:run. Those set FIREBASE_ENABLED=false, which forwards -PfirebaseEnabled=false. :nostore disables Firebase only; it does not remove every Play Services dependency.

iOS builds bundle ios/App/App/GoogleService-Info.plist by default (ios/App/scripts/bundle-firebase-config.sh, run from scripts/build-ios.sh and as an Xcode build phase). Opt out with FIREBASE_ENABLED=false (the build script forwards that to both the build and archive xcodebuild invocations), npm run build:ios:prod:nostore, or the Xcode build setting FIREBASE_ENABLED=NO. A missing plist fails an enabled build; the file's presence does not enable Firebase on its own.

The guard is in android/app/build.gradle. Do NOT activate Firebase from file presence alone — that was the bug that broke FOSS distribution in June 2026.

Never commit google-services.json.

Full details, incident history, and F-Droid notes: doc/android-firebase-gms.md

Android Build — MLKit Barcode Scanner

@capacitor-mlkit/barcode-scanning depends on com.google.android.gms:play-services-code-scanner, which merges com.google.android.gms.version into the APK manifest. This is a known long-term issue for strict FOSS/F-Droid builds. For now, the dependency is accepted; barcode scanning simply will not work on GMS-less devices (it fails gracefully at scan time, not at startup). Do not add additional GMS/Firebase dependencies without explicitly acknowledging this trade-off.