Skip to content

Platform templates (Flutter 3.50.1), flavors, platform fixes and setup.sh - #125

Open
amaury901130 wants to merge 8 commits into
mainfrom
chore/platform-templates-3.50
Open

amaury901130 wants to merge 8 commits into
mainfrom
chore/platform-templates-3.50

Conversation

@amaury901130

@amaury901130 amaury901130 commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Refreshes the Android and iOS projects against a clean Flutter 3.50.1 project (still the latest stable), adds dev/qa/prod flavors on both platforms, and fixes the issues a review of the native configuration found. One commit per step:

  1. Android template (87a2a61): Gradle scripts move to the Kotlin DSL (*.gradle.kts), keeping identity from build.properties, key.properties signing and the .debug suffix. The manifest gains taskAffinity="" and the PROCESS_TEXT query.

  2. iOS template (28d5d92): the template's SceneDelegate.swift, its new project settings in all 9 configurations, and Dev/QA schemes rebuilt from Runner (their Profile action now uses Profile dev/qa). The empty RunnerTests target and the generated DEVELOPMENT_TEAM are intentionally not copied. web/ already matched the template.

  3. DEV banner fix (b773c84): its controls sit inside the safe area instead of under the status bar; the page below doesn't get the top inset twice. Widget tests (they fail on the old banner).

  4. Flavors and platform fixes (11d2236):

    • Flavors: Android productFlavors dev/qa/prod and a new iOS Prod scheme, so --flavor works the same on both platforms. IDs and names match the iOS configurations, and default-flavor: dev is set in the app pubspec:

      Flavor Debug Release
      dev <id>.debug.dev, " Dev" <id>.dev
      qa <id>.debug.qa, " QA" <id>.qa
      prod <id>.debug, " Debug" <id>, ""
    • Android permissions: declares the photo and notification permissions PermissionManager requests (they always failed on Android 13+), and marks the camera as optional for Google Play.

    • Android release: an app bundle now needs key.properties outside CI (CI=true bypasses the check). Release builds use R8. The unused dart-defines block is removed.

    • iOS:

      • Clearer permission texts, translated into English and Spanish (InfoPlist.strings), plus CFBundleLocalizations.
      • Debug app names no longer include the version.
      • The deprecated UIViewControllerBasedStatusBarAppearance key is removed.
      • dev.xcconfig and qa.xcconfig are no longer copied into the app bundle.
    • CI: the Android build passes --flavor dev.

  5. Docs (225ca6e): README (run, release, IDE, CI, latest-upgrade notes, what changes for you), CLAUDE.md, overview, project initialization (ID/name table per flavor), customization checklist.

  6. Initializer --board (a4ad029): optional project board (issue tracker) URL. It is validated, linked from the PR template's "Issue" section, and recorded in flutter_base.json. The interactive init asks for it; Enter skips it. Tests included.

  7. setup.sh (40b10c7): one-command setup. It installs FVM, the pinned Flutter and Melos, runs init, then melos bootstrap and melos run verify. In an initialized project, running it with no options only sets up the toolchain, for teammates. --dry-run and --skip-verify are available. It keeps the committed .vscode/settings.json, which fvm use rewrites.

    ./setup.sh --name "My App" --bundle-id com.company.myapp --board https://company.atlassian.net/jira/boards/1
  8. Docs (ed4b27c): README "Start a new project" now starts with setup.sh, with the manual steps kept as a fallback. Also updated: project-initialization.md (the --board row, what init changes) and CLAUDE.md.

firebase_core is kept on purpose, for production projects.

What changes for developers

  • Release builds must pass --flavor prod. Without it, the default dev flavor is built.
  • Plain flutter run installs <id>.debug.dev on both platforms. An app installed earlier as <id>.debug stays on the device as a separate app.
  • Building a release app bundle locally requires app/android/key.properties.

Issue

N/A

Preview

Verified locally:

  • melos run verify passes, including the initializer tests.
  • Android: dev/qa/prod debug APKs and the prod release APK build. Each APK's ID and label checked with aapt. The app bundle fails without CI/key.properties with a clear message, and builds with CI=true.
  • iOS: dev, qa and prod debug simulator builds, and the prod release build without signing. Bundle IDs, names, the es.lproj texts, and that no xcconfig ships in the bundle all checked.
  • Web: builds.
  • setup.sh, on a copy of this branch:
    • A full run with a board: init and verify pass, and the PR template and flutter_base.json are updated.
    • A dry run, the teammate run with no options, and the error cases (bad option, bad board URL, no terminal, already initialized).
    • Runs on macOS's bash 3.2.
  • Runtime: the dev app on the iOS simulator and on the Android emulator, and the R8-shrunk prod release on the emulator. No errors; the DEV banner sits below the status bar.

Notes:

🤖 Generated with Claude Code

amaury901130 and others added 8 commits December 4, 2026 11:22
Compared with a clean 3.50.1 project: the Gradle scripts move to the
Kotlin DSL (settings, root and app build.gradle.kts), keeping the
identity from build.properties, the key.properties release signing and
the .debug suffix. The manifest gains taskAffinity="" and the
PROCESS_TEXT query; gradle.properties, .gitignore and MainActivity
match the template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compared with a clean 3.50.1 project: add the template's SceneDelegate
(a FlutterSceneDelegate subclass) and the new project-level settings
(asset symbol extensions, string catalog symbols, script sandboxing
off) in every build configuration. The Dev and QA schemes are rebuilt
from the Runner scheme; their Profile action now uses the Profile
dev/qa configurations. The empty RunnerTests target and the generated
DEVELOPMENT_TEAM are intentionally not copied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The debug banner drew its controls under the status bar. Its
background still extends behind the status bar, the controls sit in a
SafeArea, and the page below no longer receives the top inset (it would
add the status-bar padding a second time). Widget tests cover both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Android product flavors dev, qa and prod, and an iOS Prod scheme, so
  --flavor works the same on both platforms. Each variant's ID and name
  match the iOS configurations (<id>[.debug][.dev|.qa]). The app
  pubspec sets default-flavor: dev; CI passes --flavor dev.
- Android declares the photo and notification permissions that
  PermissionManager requests (they always failed on Android 13+) and
  marks the camera as optional for Google Play.
- Release app bundles require key.properties outside CI; release
  builds use R8. The unused dart-defines block is removed.
- iOS: clearer, translated permission texts (InfoPlist.strings en/es),
  CFBundleLocalizations, debug names without the version, no
  UIViewControllerBasedStatusBarAppearance, and the flavor xcconfig
  files are no longer copied into the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README (run, release, IDE and CI instructions, latest-upgrade notes and
what changes for existing checkouts), CLAUDE.md commands, overview,
project initialization (ID and name table per flavor) and the
customization checklist (signing, permissions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The initializer accepts an issue tracker URL (Jira, Linear, GitHub
Projects), validates it, links it from the pull request template's
Issue section and records it in flutter_base.json. The interactive
flow asks for it after the required values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Installs FVM, the Flutter version pinned in .fvmrc and Melos, runs the
initializer with the app name, bundle ID and optional board, then
melos bootstrap and melos run verify. In an initialized project it only
sets up the toolchain, for teammates cloning the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amaury901130 amaury901130 changed the title Platform templates (Flutter 3.50.1), dev/qa/prod flavors and platform fixes Platform templates (Flutter 3.50.1), flavors, platform fixes and setup.sh Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant