Flutter Build and Release
Produce reproducible artifacts for the requested platforms while preserving secrets and external-release authority.
Preflight
Read SDK constraints, flavors/schemes, bundle/application IDs, version source, signing configuration, environment injection, CI, native deployment targets, and store requirements. Never print or commit secrets, keystores, provisioning material, or service credentials.
Rules
- Keep environment selection explicit and fail safely when required values are missing.
- Align Dart defines, Android variants, Apple schemes/configurations, and service files by environment.
- Increment versions according to the repository's release policy.
- Build the exact requested artifact and keep symbols needed for crash deobfuscation.
- Treat obfuscation as code-hardening, not secret protection.
- Validate icons, names, permissions, privacy declarations, and target-specific metadata.
- Make CI use pinned or declared tool versions where practical.
- Require explicit authorization immediately before store upload, signing-credential mutation, tagging, or publishing.
Verification
Run formatting, analysis, tests, and a clean release build for each intended target/flavor. Install or serve the built artifact and smoke-test startup plus a critical flow. Record artifact path, version, flavor, target, and remaining store-side work.
References
- Read flavor and scheme alignment when coordinating product flavors, Xcode schemes, application IDs, and service configuration files.
- Read obfuscation and symbols when configuring Dart AOT obfuscation, symbol splitting, mapping archives, or stack trace deobfuscation.
Sources
1---2name: flutter-build-release3description: Configure and verify Flutter flavors, environments, signing, versioning, release artifacts, obfuscation symbols, and store-ready builds. Use for local artifact configuration; route CI provider workflows to flutter-ci-cd, and do not publish or change live credentials without explicit authorization.4---56# Flutter Build and Release78Produce reproducible artifacts for the requested platforms while preserving secrets and external-release authority.910## Preflight1112Read SDK constraints, flavors/schemes, bundle/application IDs, version source, signing configuration, environment injection, CI, native deployment targets, and store requirements. Never print or commit secrets, keystores, provisioning material, or service credentials.1314## Rules1516- Keep environment selection explicit and fail safely when required values are missing.17- Align Dart defines, Android variants, Apple schemes/configurations, and service files by environment.18- Increment versions according to the repository's release policy.19- Build the exact requested artifact and keep symbols needed for crash deobfuscation.20- Treat obfuscation as code-hardening, not secret protection.21- Validate icons, names, permissions, privacy declarations, and target-specific metadata.22- Make CI use pinned or declared tool versions where practical.23- Require explicit authorization immediately before store upload, signing-credential mutation, tagging, or publishing.2425## Verification2627Run formatting, analysis, tests, and a clean release build for each intended target/flavor. Install or serve the built artifact and smoke-test startup plus a critical flow. Record artifact path, version, flavor, target, and remaining store-side work.2829## References3031- Read [flavor and scheme alignment](references/flavor-and-scheme-alignment.md) when coordinating product flavors, Xcode schemes, application IDs, and service configuration files.32- Read [obfuscation and symbols](references/obfuscation-and-symbols.md) when configuring Dart AOT obfuscation, symbol splitting, mapping archives, or stack trace deobfuscation.3334## Sources3536- [Flutter deployment](https://docs.flutter.dev/deployment)37- [Build and release an Android app](https://docs.flutter.dev/deployment/android)38- [Build and release an iOS app](https://docs.flutter.dev/deployment/ios)