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,
|
2021-03-09 12:33:54 -08:00
|
|
|
# which is what we want! Our builders depend on generated code, so they break the generated build script at the start of
|
|
|
|
# a build.
|
2021-11-11 05:40:41 -08:00
|
|
|
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
|
|
|
|
|
2021-11-11 05:40:41 -08:00
|
|
|
$default:
|
2022-09-10 09:18:39 -07:00
|
|
|
dependencies: [":analysis_results"]
|
2021-11-11 05:40:41 -08:00
|
|
|
builders:
|
|
|
|
json_serializable:
|
|
|
|
options:
|
|
|
|
checked: true
|
|
|
|
any_map: true
|
|
|
|
disallow_unrecognized_keys: true
|
|
|
|
field_rename: snake
|
2022-07-29 09:54:41 -07:00
|
|
|
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'
|