kflavor

A Flutter tool to automate and simplify multi-flavor app configuration for Android, iOS, and cross-platform development. kflavor helps you manage build flavors, Firebase configs, icons, Gradle and Xcode settings, and generates IDE run/debug configurations for Android Studio and VSCode.

Features

  • Generate and manage Android/iOS build flavors from a single YAML file
  • No need to maintain multiple messy looking main.dart entrypoint. uses single main.dart entrypoint.
  • Automatic configuration of Gradle (Kotlin & Groovy) and Xcode projects
  • Firebase integration and configuration per flavor
  • Icon generation for each flavor
  • Generates Android Studio and VSCode run/debug configurations
  • Supports custom arguments for CLI automation
  • Easy integration with CI/CD pipelines
  • Eliminates the need to maintain multiple AndroidManifest.xml files.
  • Splash screen generation

Getting started

  1. Add kflavor to your dev dependencies in pubspec.yaml:
    dev_dependencies:
      kflavor:
  2. Run dart pub get or flutter pub get.
  3. Create a flavors.yaml file in your project root or use the Prepare YAML tool to generate one.
  4. Run the CLI tool:
    dart run kflavor generate

Note: Recent releases introduce two explicit subcommands — generate and configure — that make automating specific workflows easier (details below). When no subcommand is provided kflavor defaults to the generate workflow.

Next: CLI Commands →