easy_flavor 0.1.1
easy_flavor: ^0.1.1 copied to clipboard
A CLI that sets up Flutter flavors (dev, staging, prod, ...) for Android and iOS in new or existing projects, with optional Firebase integration.
0.1.1 #
- Fix iOS builds of projects that already used Firebase: an existing
GoogleService-Info.plistin the Runner's Copy Bundle Resources is now removed from that phase (the file reference is kept), since the[easy_flavor] Copy GoogleService-Info.plistbuild phase copies the flavor's plist to the same place ("Multiple commands produce .../GoogleService-Info.plist").doctorreports the conflict.
0.1.0 #
Initial release.
- Commands:
create,init,add,remove,doctor,restore. easy_flavor.yamlholds the whole setup; flags override it. Interactive prompts, or fully non-interactive for CI.- Dart:
lib/flavors.dart(Flavorenum andFlavorConfig),lib/main_<flavor>.dartentry points,lib/main.dartrefactored intorunMainApp()with amain()that starts the default flavor, andflutter: default-flavorinpubspec.yaml. - Android: a managed
productFlavorsblock for Groovy and Kotlin DSL withapplicationIdandresValueapp names (or per-flavorstrings.xmlwhenapp_namealready exists),@string/app_namemanifest label, andsrc/<flavor>/folders. - iOS: a Dart
project.pbxprojparser/writer that round-trips Xcode's formatting,Debug/Release/Profile-<flavor>configurations, per-flavor xcconfig files (bundle id, display name, CocoaPods include), shared schemes,CFBundleDisplayName = $(APP_DISPLAY_NAME), and the Podfile configuration map. - Firebase (
--firebase): tool and login checks,flutterfire configureper flavor,firebase_core, Firebase initialisation per entry point, and an Xcode build phase that copies the flavor'sGoogleService-Info.plist. - Existing projects: git status check, backups in
.easy_flavor_backup/,restore,--dry-runwith diffs (--verbose), idempotent re-runs, andinit --mergeto adopt flavors the project already declares. - IDE: VS Code
launch.jsonentries and Android Studio run configurations. doctorvalidates the whole setup, including the iOS deployment target against the installed Xcode.