I am trying to make my custom builder using Dart's https://github.com/dart-lang/source_gen.
The buildExtensions in builder.dart
is .dart
It builds for any dart file
buildExtensions = { '.dart': [generatedExtension]..addAll(additionalOutputExtensions) },
So even if in build.yaml, I set the build input to .source.dart
functionUnwrap:
import: 'package:my_generators/my_generators.dart'
builder_factories: ['functionUnwrapBuild']
auto_apply: dependents
build_extensions: {".source.dart": [".unwrapped.dart"]}
build_to: source
applies_builders: ["source_gen"]
It ignores the ".source.dart"
and still runs on any dart file.