flutter_gherkin
flutter_gherkin copied to clipboard
Getting code generation to work with build_runner watch
Hi, First of all, great work with this package!
I'm using 3.0.0-rc17
For other libraries using code generation (such as json_serializable), I'm used to keep a flutter pub run build_runner watch running somewhere in the background to update detect changes and update files automatically. However, while running watch, the generated code is updated only when I change the .dart file containing the @GherkinTestSuite, and never when I update .feature files. Is there any way to trigger an incremental rebuild when the .feature files are updated?
My guess would be that the build.yaml is not configured correctly. https://github.com/jonsamwell/flutter_gherkin/blob/integration_test__package_support/build.yaml
# Read about `build.yaml` at https://pub.dev/packages/build_config
builders:
gherkin_test_suite:
import: "package:flutter_gherkin/src/flutter/code_generation/builders/gherkin_test_suite_builder.dart"
builder_factories: ["gherkinTestSuiteBuilder"]
build_extensions: {".dart": ["gherkin_tests.g.part"]}
auto_apply: dependents
build_to: cache
applies_builders: ["source_gen|combining_builder"]
I'm not entirely familiar with this package, but there should be a reference here to the .feature in the build_extensions AFAIK.