flavor_cli 0.0.10
flavor_cli: ^0.0.10 copied to clipboard
A production-grade CLI tool for automating Flutter flavor configuration, Firebase environment management, and boilerplate generation for scalable apps.
Changelog #
0.0.10 #
- Platform Compatibility Improvements: Removed the hardcoded
platformsrestriction frompubspec.yamlto enable automatic, accurate detection of supported platforms, resolving WASM/web runtime analyzer warnings. - Code Quality & Static Analysis: Integrated standard recommended lints and resolved all static analysis warnings and style lints across the codebase.
0.0.9 #
- Custom App Names per Flavor: Optionally set distinct display names for each flavor (e.g.,
MyApp Dev,MyApp Stage) instead of the defaultAppName-flavorpattern. Supported across Android (resValue), iOS (APP_NAMEin xcconfig), and macOS. - Gitignore Toggle for
.envFiles: The init wizard now asks whether to add.envfiles to.gitignore. Teams that prefer to commit environment files for onboarding convenience can now opt out. - Dynamic Platform Detection during Migration: The
migratecommand now auto-detects existing platform folders (likeandroid,ios,macos,web) when theplatformskey is absent in the legacy config instead of writing all four platforms. - Multi-Platform Support — macOS & Web: The CLI is no longer mobile-only.
- macOS: New
MacOSServiceapplies the same Zero-XCConfig strategy used for iOS, generating xcconfig files and automatingmacos/Runner.xcodeprojscheme creation. - Web: New
WebServiceinjects the app name intoweb/manifest.jsonand updates the<title>inweb/index.html.
- macOS: New
- Platform Selection Prompt: The init wizard now auto-detects which platform directories exist (
android/,ios/,macos/,web/) and presents a multi-select prompt so you can choose exactly which platforms to generate flavors for. The selection is persisted inflavor_cli.yamlunder theplatformskey.
0.0.8 #
- ENV-Only Architecture: Fully transitioned from JSON-based runtime configuration to a strictly ENV-based model using
flutter_dotenv. - Configuration Modernization: Migration from
.flavor_cli.jsontoflavor_cli.yamlfor better readability and industry standards. - Automatic Dependency Injection: The CLI now automatically manages the
flutter_dotenvdependency, asset registration, and.gitignoreentries. - Enhanced Migration Command: Completely revamped
migratecommand to handle legacy JSON to YAML conversion and runtime value migration to.envfiles. - Clean Source of Truth: Dynamic runtime values are now isolated in protected
.envfiles, keepingflavor_cli.yamlfocused on static project metadata.
0.0.7 #
- Main File Preservation: Automatically preserves existing
main.dartcontent when migrating to the "Separate Main Files" strategy by moving it to the production flavor entry point. - Enhanced Reset Command: The
resetcommand now restores original code from flavor entry points back tomain.dart, ensuring no code is lost when reverting flavor setups. - Smart Firebase Detection: Improved
ConfigServiceto distinguish between Firebase configuration and project integration, enabling more accurate setup prompts. - Automated Firebase Integration: The CLI now detects missing Firebase files in configured projects and offers to run the integration automatically during flavor additions or resets.
- Internal Refinements: Refactored
SetupRunnerandFileServicefor more robust file handling and synchronization.
0.0.6 #
- Fixed Main File Generation: Resolved an issue where adding a new flavor with the "Separate Main Files" strategy failed to generate the required Dart entry point.
- Firebase Optimization: Optimized the Firebase setup flow to skip redundant re-initialization prompts for projects using "Shared ID" strategies.
- Targeted Commands: Applied Firebase optimizations specifically to the
addandreplacecommands to avoid interrupting common flavor management workflows. - Refined Firebase Replacement: When renaming a flavor in "Unique ID" projects, old options are now automatically deleted and entry points are sanitized to ensure a clean re-initialization process.
- Deletion Optimization: Added a bypass for Firebase re-initialization prompts during flavor deletions to streamline the cleanup process.
- Simplified Project Structure: Disabled the automatic generation of the
scripts/folder by default to ensure a cleaner project root. - Internal Robustness: Enhanced
SetupRunnerandFirebaseCommandto maintain better context during flavor additions and renames.
0.0.5 #
- Enhanced documentation: Make it more concise and clear.
0.0.4 #
- Code Generation Improvements: Added "// GENERATED CODE - DO NOT MODIFY BY HAND" headers and removed redundant TODOs in the generated
AppConfig. - Enhanced Reset Command: Improved the
resetcommand to be more resilient by allowing it to run even when the configuration file is partially invalid. - Documentation Cleanup: Streamlined the main
README.mdand example documentation for improved clarity and conciseness. - Internal Refinements: Added support for bypassing validation in
ConfigServicewhen performing cleanup or reset operations.
0.0.3 #
- Migration Support: Added
migratecommand to safely upgrade existing.flavor_cli.jsonfiles to the latest format, including filling in missing per-flavor values. - Non-Interactive Initialization: Enhanced
initcommand to support--fromfor fully automated setups by persisting all configuration values in.flavor_cli.json. - Package ID Strategy: Added
package_id_strategyto support unique IDs or shared IDs for flavors.
0.0.2 #
- Android & iOS Focus: Restricted the CLI to strictly support Android and iOS environments.
- Enhanced Documentation: Updated the example project with a new README.
0.0.1 #
- Initial release of
flavor_cli.