Skip to content

Commit bd40e71

Browse files
Deprecate legacy gen_defaults tool (flutter#191911)
Related to flutter#184950 This PR is to deprecate the legacy `dev/tools/gen_defaults` tool. The PR: * stops the framework test shard from running the legacy `dev/tools/gen_defaults` unit tests. * marks the legacy tool as deprecated in its README * points developers to `packages/material_ui/tool/gen_defaults` in `flutter/packages` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 684c004 commit bd40e71

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎dev/bots/suite_runners/run_framework_tests.dart‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ Future<void> frameworkTestsRunner() async {
306306
await runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'));
307307
await runFlutterTest(path.join(flutterRoot, 'dev', 'tools'));
308308
await runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'));
309-
await runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'gen_defaults'));
310309
await runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'gen_keycodes'));
311310
await runFlutterTest(path.join(flutterRoot, 'dev', 'benchmarks', 'test_apps', 'stocks'));
312311
await runFlutterTest(

‎dev/tools/gen_defaults/README.md‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
## Token Defaults Generator
1+
## Legacy Token Defaults Generator
22

3-
Script that generates component theme data defaults based on token data.
3+
> [!WARNING]
4+
> This legacy tool is deprecated. It only targets the frozen SDK Material library
5+
> under `packages/flutter/lib/src/material`, and should not be used for new
6+
> Material defaults work.
47
5-
## Usage
8+
Active Material defaults generation has moved to the standalone `material_ui`
9+
package in the `flutter/packages` repository. Use
10+
[`packages/material_ui/tool/gen_defaults`](https://github.com/flutter/packages/tree/main/packages/material_ui/tool/gen_defaults)
11+
there instead.
12+
13+
## Legacy Usage
614
Run this program from the root of the git repository:
715
```sh
816
dart dev/tools/gen_defaults/bin/gen_defaults.dart [-v]
917
```
1018

11-
This updates `generated/used_tokens.csv` and the various component theme files.
19+
This updates `generated/used_tokens.csv` and the frozen SDK Material component
20+
theme files.
1221

1322
## Templates
1423

0 commit comments

Comments
 (0)