Skip to content

[tool] Add flutter build linux --config-only #93407

Closed

Description

@stuartmorgan-g

Currently on many platforms there are critical files for the native build system that are generated by building, such that you must flutter build or flutter run before using those systems directly. Some cases that I've run into:

  • Android: gradlew isn't generated until building.
  • Linux: ninja files for each configuration (debug, release) aren't created until building for that configuration.
  • Windows: the generated Visual Studio solution isn't created until building.
  • [ETA:] iOS/macOS: the Podfile isn't created until building.

As an example of things this affects, the flutter/plugin repository tooling must build examples before being able to run unit tests on most platforms, which is not ideal (especially on Linux, where since we're only building release mode, we can only run unit tests in release mode unless we make CI much slower).

In at least the Linux and Windows case, the step for generating the native build files is easily separable from the actual build, so with minor refactoring we could have a new command that would run just that (fast) step, without the expensive build.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: proposalA detailed proposal for a change to Flutter
    on Nov 10, 2021
  2. added
    P3Issues that are less important to the Flutter project
    on Nov 10, 2021
  3. jonahwilliams commented on Nov 18, 2021

    @jonahwilliams
    Contributor

    We sort of added this a while back for ios, with a --config-only flag. The reason was that folks were building just to have an update xcconfig file, and then rebuilding again, which took ages on CI.

  4. stuartmorgan-g commented on Nov 18, 2021

    @stuartmorgan-g
    ContributorAuthor

    Ah-ha, it looks that does exactly what I want. Sounds like we should just add that flag to the platforms where it would benefit plugins CI in the short term, and longer term we could evaluate promoting it to all of build.

  5. matanlurey commented on Jul 11, 2025

    @matanlurey
    Contributor

    @stuartmorgan-g:

    Sounds like we should just add that flag to the platforms where it would benefit plugins CI in the short term

    To make this issue actionable, is there a list of platforms where it's not supported today? Just desktop?

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 11, 2025
  7. stuartmorgan-g commented on Jul 11, 2025

    @stuartmorgan-g
    ContributorAuthor

    I believe it's now just Windows and Linux.

  8. added
    platform-windowsBuilding on or for Windows specifically
    platform-linuxBuilding on or for Linux specifically
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 11, 2025
  9. 7 remaining items

  10. github-actions commented on Aug 11, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: proposalA detailed proposal for a change to Flutterplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-linuxTriaged by the Linux platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions