Skip to content

fix(tooling): build.yml and the deploy workflows pass --flavor to a project with no product flavors #34

Description

@koniz-dev

Context

build.yml takes a flavor input (development/staging/production,
default development) and passes it to flutter build. But
android/app/build.gradle.kts defines no product flavors, so:

FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleDevelopmentRelease' not found in root project 'android' and its subprojects.

[!] Gradle project does not define a task suitable for the requested build.
    The android/app/build.gradle.kts file does not define any custom product
    flavors. You cannot use the --flavor option.

Evidence: run 32966668310
(platform=android, flavor=development).

The web build in the same workflow succeeded, so this was masked - only the
Android and iOS paths consume --flavor.

Discovered while safety-checking an unrelated Gradle edit for #30. Not caused by
that change: Gradle configured successfully and then could not find the task.

Scope

Check every --flavor consumer:

Two honest options

  1. Define the flavors. Add flavorDimensions and
    productFlavors { development / staging / production } to
    android/app/build.gradle.kts, plus the iOS scheme equivalents. Makes the
    workflow inputs real. More surface for a starter to carry, and iOS schemes
    cannot be created from a script here.
  2. Drop the flavor inputs. Remove --flavor from the workflows and use the
    existing --dart-define / .env layering, which is what
    docs/guides/configuration.md already describes as the configuration
    mechanism. Simpler, and matches how the project actually configures itself.

Option 2 looks right: the repo's documented configuration story is env layering
plus dart-defines, not Gradle flavors. But this changes a documented workflow
input, so it wants a decision.

Acceptance criteria

  1. grep -rn '\-\-flavor' .github/workflows/ is consistent with reality: either
    every referenced flavor exists as a product flavor, or --flavor is gone.
  2. A workflow_dispatch run of build.yml with platform=android succeeds
    and uploads an APK artifact. Record the run id.
  3. A workflow_dispatch run of build.yml with platform=web still succeeds
    (it does today - do not regress it).
  4. If the flavor input is removed, build.yml's input list and any doc that
    mentions choosing a flavor are updated together.
  5. deploy-android.yml and deploy-ios.yml are made consistent with whichever
    option is chosen, even though they cannot be dispatched here (they publish).
    State that they were not run.
  6. ./scripts/dev/audit_template.sh exits 0.

Metadata

Metadata

Assignees

Labels

epic:tooling-ci.github/workflows, scripts/, tool/, bricks/, git hookspriority:P1Next up: blocks adopters or a documented workflow is wrongstatus:in-progressClaimed by an assignee and being worked right nowtype:bugSomething that is broken relative to documented behavior

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions