| name | setup-variants |
| description | Automates the setup of build variants (flavors) for Android and iOS in a default Flutter project, including signing and VS Code launch configuration. |
Setup Variants Skill
This skill configures dev, stg, and prd build variants for both Android and iOS in a standard Flutter project.
Reference Guide: Setup Development Environments Guide
Prerequisites
- A standard Flutter project structure
secureFiles directory with signing keys and flavor configurations (json)
Steps
1. Android Setup
- Modify
android/app/build.gradle.kts:
- Apply the flavor and signing configuration.
- Use the template from local resources:
.agent/skills/setup_variants/resources/android/build_gradle_flavors.kts.
- Ensure
signingConfigs map to secureFiles correctly.
- Update .gitignore:
- Add
keystore.properties to android/.gitignore (defensive, in case it is copied locally).
- Verify Android Build:
- Run
./gradlew bundleRelease (or assembleRelease) to ensure gradle syncs and builds correctly.
2. iOS Setup
- Clean Default Scheme:
- Remove
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme.