Replace manual generate_version.dart script with a custom build_runner builder that automatically generates lib/version.g.dart from pubspec.yaml during the build process. This eliminates manual steps and ensures version info stays in sync. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9 lines
296 B
YAML
9 lines
296 B
YAML
builders:
|
|
version_builder:
|
|
import: "tool/version_builder.dart"
|
|
builder_factories: ["versionBuilder"]
|
|
build_extensions: { r"$package$": ["lib/version.g.dart"] }
|
|
auto_apply: root_package
|
|
build_to: source
|
|
runs_before: ["freezed", "riverpod_generator", "json_serializable"]
|