drift/drift_dev/drift_dev.build.yaml

44 lines
1.4 KiB
YAML
Raw Normal View History

2021-10-08 09:10:48 -07:00
# Build config without drift-specific builders. When running a build in this directory, this file replaces build.yaml,
# which is what we want! Our builders depend on generated code, so they break the generated build script at the start of
# a build.
targets:
2022-09-10 09:18:39 -07:00
analysis_results:
# Analysis result serialization is drift-internal and doesn't need any of
# the checks the default serialization builder runs on.
auto_apply_builders: false
sources:
2022-11-19 07:19:02 -08:00
include:
- "lib/src/analysis/**"
exclude:
- "lib/src/analysis/options.dart"
2022-09-10 09:18:39 -07:00
builders:
json_serializable:
enabled: true
options:
checked: false
disallow_unrecognized_keys: false
any_map: true
field_rename: snake
explicit_to_json: true
source_gen:combining_builder:
enabled: false # Run in default target
$default:
2022-09-10 09:18:39 -07:00
dependencies: [":analysis_results"]
builders:
json_serializable:
options:
checked: true
any_map: true
disallow_unrecognized_keys: true
field_rename: snake
explicit_to_json: true
2022-09-10 09:18:39 -07:00
generate_for:
2022-11-19 07:19:02 -08:00
include: ["lib/src/analysis/options.dart"]
2022-09-01 14:10:54 -07:00
# https://simonbinder.eu/posts/build_directory_moves/#generating-into-a-directory-with-source_gen
source_gen:combining_builder:
options:
build_extensions:
'^lib/src/{{}}.dart': 'lib/src/generated/{{}}.g.dart'