flavor_tools 2.2.0
flavor_tools: ^2.2.0 copied to clipboard
CLI tool for creating and managing Flutter flavors. Configures iOS (Xcode, xcconfig, schemes) and Android (Gradle) automatically.
2.2.0 #
AGP 9 / Gradle 9 support #
buildFeatures { resValues = true }is now added automatically tobuild.gradle.ktswhen creating a flavor. AGP 9 disables theresValuesbuild feature by default, which broke builds using the generatedresValue("string", "app_name", ...). Groovybuild.gradle(old Gradle/AGP) is intentionally left untouched —resValuesis enabled by default there.- Fixed duplicate
android:labelin AndroidManifest.xml — an existing label (e.g.android:label="my_app"from the Flutter template) is now replaced with@string/app_nameinstead of adding a second attribute, which produced invalid XML.
2.1.0 #
New features #
DEVELOPMENT_TEAMis now written to thePBXNativeTarget "Runner"build configurations (previously only set on thePBXProjectlevel). This removes the "Signing for 'Runner' requires a development team" error on firstflutter build ipafor a fresh flavor. The team value is taken fromteam_idinflavor_tools.yamlor the-tCLI flag.- Optional
pod installstep — after creating a flavor,flavor_toolscan automatically runpod installinios/so CocoaPods generates flavor-specificPods-Runner.{debug,profile,release}-<flavor>.xcconfigfiles immediately (previously they appeared only on the nextflutter build). Enable via:- YAML:
pod_install: trueinside a flavor block - CLI:
--podInstallflag forcreateandcreate-all
- YAML:
2.0.3 #
- Added validation for Gradle file existence before Android flavor creation
- Added validation for invalid YAML flavor entries in
create-allcommand
2.0.2 #
- Fixed dart analyze warnings
- Updated dependencies
- Updated README.md documentation
2.0.0 #
New features #
create-allcommand — batch flavor creation from YAML config file (flavor_tools.yaml)updatecommand — update package name and display name for existing flavors (iOS xcconfig + Android Gradle)- Smart diff detection —
create-allautomatically detects config changes and updates only modified flavors - Kotlin DSL support — auto-detection and support for
build.gradle.ktsalongside Groovybuild.gradle - Duplicate check — skips flavor creation if it already exists in the project
Improvements #
- XCBuildConfiguration modernized to Xcode 16 standards:
- Removed
ENABLE_BITCODE CODE_SIGN_IDENTITY:iPhone Developer→Apple DevelopmentCLANG_CXX_LANGUAGE_STANDARD:gnu++0x→gnu++20GCC_C_LANGUAGE_STANDARD:gnu99→gnu17IPHONEOS_DEPLOYMENT_TARGET:12.0→13.0SWIFT_VERSION:5.0→6.0
- Removed
- Auto-detection of project settings — reads
SWIFT_VERSION,IPHONEOS_DEPLOYMENT_TARGET,TARGETED_DEVICE_FAMILY,CLANG_CXX_LANGUAGE_STANDARD,GCC_C_LANGUAGE_STANDARDfrom existing Xcode configurations instead of hardcoding - Scheme generation rewritten with
xmlpackage — correctBlueprintIdentifierfrom PBXNativeTarget, scheme version1.7,customLLDBInitFilesupport - Removed unused Profile xcconfig file references (Profile reuses Release xcconfig per Flutter standard)
- Refactored
create_xc_flavor.dart— eliminated duplication across build types using loops and UUID maps - Error handling — proper exit codes (
exit(1)instead ofexit(404)), descriptive context messages for all error points
1.0.6 #
- Updated XCBuildConfiguration.