Skip to content

Flavors and Environments

aiserrock edited this page Jul 8, 2026 · 1 revision

Flavors and Environments

Overview

The app ships in two build flavors, dev and prod, distinguished by entry point, application ID, backend endpoint, and Firebase project. Both flavors share the same codebase and UI; only DI wiring and config differ.

dev

  • Entry point: test/dev/main.dart
  • DI: initDevDi() (test/dev/di/di_container.dart)
  • Backend: https://app.acits.ru
  • Android applicationId: io.github.andx2.acits.dev, versionName suffix -dev, app name "Acits dev"
  • Includes a debug screen and dev-only tooling not present in prod

prod

  • Entry point: lib/main.dart
  • Android applicationId: io.github.andx2.acits, app name "Acits"
  • Restricted NDK abiFilters: arm64-v8a, armeabi-v7a, x86_64

Firebase config per flavor

Firebase config files are per-flavor and gitignored (they contain project secrets):

  • android/app/src/dev/google-services.json
  • android/app/src/prod/google-services.json
  • ios/Runner/GoogleService-Info.plist

Committed *.example templates exist alongside each path (e.g. android/app/src/dev/google-services.json.example). To set up a local build:

  1. Copy each .example file to its real filename (strip the .example suffix).
  2. Fill in real Firebase project values, or pull them from your team's secret store.

Without these files, com.google.gms.google-services (applied in android/app/build.gradle) will fail the Android build.

Running

# dev
fvm flutter run -t test/dev/main.dart --flavor dev

# prod
fvm flutter run -t lib/main.dart --flavor prod

Building

# dev debug APK (matches CI)
flutter build apk --debug --flavor dev --target test/dev/main.dart

# prod release
flutter build apk --release --flavor prod --target lib/main.dart

iOS scheme selection mirrors the Android flavors (ios/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme and prod.xcscheme).

Clone this wiki locally