48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
# Build configuration for code generation
|
|
# This file configures build_runner for Riverpod, Freezed, Hive CE, and JSON serialization
|
|
|
|
targets:
|
|
$default:
|
|
builders:
|
|
# Hive CE type adapter generation is automatic - no configuration needed
|
|
|
|
# Riverpod code generation
|
|
riverpod_generator:
|
|
generate_for:
|
|
- lib/**_provider.dart
|
|
- lib/**/providers/*.dart
|
|
- lib/**/notifiers/*.dart
|
|
- lib/core/network/*.dart
|
|
options:
|
|
# Generate providers with proper naming
|
|
provider_name_prefix: ""
|
|
|
|
# Freezed code generation for immutable models
|
|
freezed:
|
|
generate_for:
|
|
- lib/**_model.dart
|
|
- lib/**/models/*.dart
|
|
- lib/**/entities/*.dart
|
|
options:
|
|
union_key: 'type'
|
|
union_value_case: 'snake'
|
|
|
|
# JSON serialization
|
|
json_serializable:
|
|
generate_for:
|
|
- lib/**_model.dart
|
|
- lib/**/models/*.dart
|
|
options:
|
|
any_map: false
|
|
checked: true
|
|
create_factory: true
|
|
create_to_json: true
|
|
disallow_unrecognized_keys: false
|
|
explicit_to_json: true
|
|
field_rename: snake
|
|
generic_argument_factories: true
|
|
ignore_unannotated: false
|
|
include_if_null: false
|
|
|
|
# Global options - removed as runs_before is not supported in this context
|