[Breaking Change] $FLUTTER_ROOT/version will not be emitted by the tool

393 views
Skip to first unread message

Matan Lurey

unread,
Aug 14, 2025, 6:40:16 PMAug 14
to flutter-...@googlegroups.com
In 2023, the flutter tool introduced a new version metadata (JSON) format, $FLUTTER_ROOT/bin/cache/flutter.version.json, which replaces the older (flat-file) $FLUTTER_ROOT/version file as a strict upgrade with the ability to add more information over time.

When will the change happen?
We estimate that in N+1 stable releases (not the one yet to be released, but the following), i.e. the first stable release after 3.25, we will stop (by default) generating $FLUTTER_ROOT/version and (only) generate $FLUTTER_ROOT/bin/cache/flutter.version.json and in a release after that, the flag will no longer be available.

How to prepare for this change?
In short, most users will have to do nothing. Users with custom tools that previously read the $FLUTTER_ROOT/version file will instead need to parse $FLUTTER_ROOT/bin/cache/flutter.version.json, and the read the (string) value of the key "flutterVersion". An example of this within our own repository is #172601.

In an upcoming master channel release, the $FLUTTER_ROOT/version file will no longer be emitted. It is possible to opt-out and continue the file being emitted (temporarily) by using the flag flutter config --no-enable-omit-legacy-version-file

These same instructions will be posted (and kept updated) on our breaking changes site.

Matan Lurey

unread,
Aug 14, 2025, 6:45:48 PMAug 14
to Flutter Public Announcements (flutter-announce)
Apologies, I meant to write "first stable release after 3.35" (which was released today).
Reply all
Reply to author
Forward
0 new messages