From 1c0ba0771d6c461a078c9c054d1097f12afbe694 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 21 Aug 2018 17:19:48 -0400 Subject: [PATCH] `jsonModelBuilder` now uses `SharedPartBuilder`, rather than `PartBuilder`. --- angel_serialize_generator/CHANGELOG.md | 2 ++ angel_serialize_generator/build.yaml | 3 ++- .../lib/angel_serialize_generator.dart | 6 ++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/angel_serialize_generator/CHANGELOG.md b/angel_serialize_generator/CHANGELOG.md index 76492909..dd895869 100644 --- a/angel_serialize_generator/CHANGELOG.md +++ b/angel_serialize_generator/CHANGELOG.md @@ -1,6 +1,8 @@ # 2.1.0 * Removed dependency on `package:id`. * Update dependencies for Dart2Stable. +* `jsonModelBuilder` now uses `SharedPartBuilder`, rather than +`PartBuilder`. # 2.0.10 * Generate `XFields.allFields` constant. diff --git a/angel_serialize_generator/build.yaml b/angel_serialize_generator/build.yaml index 6d8b75f4..2885ea5d 100644 --- a/angel_serialize_generator/build.yaml +++ b/angel_serialize_generator/build.yaml @@ -10,11 +10,12 @@ builders: build_to: source build_extensions: .dart: - - ".g.dart" + - "angel_serialize.g.part" - ".serializer.g.dart" - ".d.ts" required_inputs: - .dart + applies_builders: ["source_gen|combining_builder"] targets: _book: sources: diff --git a/angel_serialize_generator/lib/angel_serialize_generator.dart b/angel_serialize_generator/lib/angel_serialize_generator.dart index 076f46ce..747fb024 100644 --- a/angel_serialize_generator/lib/angel_serialize_generator.dart +++ b/angel_serialize_generator/lib/angel_serialize_generator.dart @@ -23,10 +23,8 @@ part 'serialize.dart'; part 'typescript.dart'; Builder jsonModelBuilder(_) { - return new PartBuilder( - const [const JsonModelGenerator()], - '.g.dart', - ); + return new SharedPartBuilder( + const [const JsonModelGenerator()], 'angel_serialize'); } Builder serializerBuilder(_) {