Repository navigation
[tool] Add flutter build linux --config-only #93407
Description
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:
gradlewisn't generated until building. - Linux:
ninjafiles 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
jonahwilliams commentedon Nov 18, 2021
We sort of added this a while back for ios, with a
--config-onlyflag. The reason was that folks were building just to have an update xcconfig file, and then rebuilding again, which took ages on CI.stuartmorgan-g commentedon Nov 18, 2021
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.matanlurey commentedon Jul 11, 2025
@stuartmorgan-g:
To make this issue actionable, is there a list of platforms where it's not supported today? Just desktop?
stuartmorgan-g commentedon Jul 11, 2025
I believe it's now just Windows and Linux.
7 remaining items
Add `--config-only` build option for Linux and Windows (#172239)
Add `--config-only` build option for Linux and Windows (flutter#172239)
github-actions commentedon Aug 11, 2025
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 -vand a minimal reproduction of the issue.Add `--config-only` build option for Linux and Windows (flutter#172239)
Add `--config-only` build option for Linux and Windows (flutter#172239)
Add `--config-only` build option for Linux and Windows (flutter#172239)
Add `--config-only` build option for Linux and Windows (flutter#172239)
Add `--config-only` build option for Linux and Windows (#172239)