Open zs-dima opened 2 years ago
You can specify the yaml file via:
fluttergen -c path/to/your/yaml/flie.yaml
@lcdsmao here build_runner documentation
Builders are configured with a build.yaml
@zs-dima What's your use case here? Can you give some examples?
@lcdsmao I mean default way to configure builders libraries.
Here your documentation:
[FlutterGen] generates dart files based on the key flutter
and flutter_gen
of pubspec.yaml
.
Default configuration can be found here.
# pubspec.yaml
# ...
flutter_gen:
but it have to be:
[FlutterGen] generates dart files based on the key flutter_gen
of build.yaml
.
Default configuration can be found here
.
# build.yaml
# ...
builders:
# ...
flutter_gen:
# ...
@zs-dima What's your use case here? Can you give some examples?
I'm guessing to be able to aggregate all codegen builders in the same command via: flutter pub run build_runner watch --delete-conflicting-outputs
rather than individually running flutter packages pub run build_runner build
or fluttergen
and other packages. Since in build.yaml you can specify the commands for each builder like:
targets:
$default:
builders:
slang_build_runner:
options:
flutter_gen:
options:
etc....
@zs-dima What's your use case here? Can you give some examples?
I'm guessing to be able to aggregate all codegen builders in the same command via:
flutter pub run build_runner watch --delete-conflicting-outputs
rather than individually runningflutter packages pub run build_runner build
orfluttergen
and other packages. Since in build.yaml you can specify the commands for each builder like:targets: $default: builders: slang_build_runner: options: flutter_gen: options: etc....
To move builders configurations out of the pubspec.yaml
Any plans to support this setup approach?
build.yaml intended for generators configuration. So could be nice to use build.yaml configuration instead of pubspec.yaml configuration.
❌ Bad
⭕️ Good