From fe43fec98c6692599036b6420a5e88fbc24e1885 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 21 Aug 2018 12:09:37 -0400 Subject: [PATCH] config error --- angel_container_generator/build.yaml | 14 +++++++++++++- .../lib/angel_container_generator.dart | 3 ++- .../lib/src/library_generator.dart | 1 + angel_container_generator/pubspec.yaml | 3 ++- angel_container_generator/test/reflector.dart | 10 ++++++++++ 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 angel_container_generator/test/reflector.dart diff --git a/angel_container_generator/build.yaml b/angel_container_generator/build.yaml index 4f2ed8ac..86bf0cb1 100644 --- a/angel_container_generator/build.yaml +++ b/angel_container_generator/build.yaml @@ -7,4 +7,16 @@ builders: .dart: - .reflector.g.dart auto_apply: root_package - build_to: source \ No newline at end of file + build_to: source + required_inputs: + - .dart +targets: + $default: + sources: + - test/reflector.dart + builders: + angel_container_generator|angel_container: + generate_for: + - test/reflector.dart + - test/**.dart + - test/*.dart \ No newline at end of file diff --git a/angel_container_generator/lib/angel_container_generator.dart b/angel_container_generator/lib/angel_container_generator.dart index 5bb390f9..61b6163d 100644 --- a/angel_container_generator/lib/angel_container_generator.dart +++ b/angel_container_generator/lib/angel_container_generator.dart @@ -1,7 +1,8 @@ import 'package:build/build.dart'; import 'package:source_gen/source_gen.dart'; + import 'src/generator.dart'; -Builder angelContainerBuilder(BuilderOptions builderOptions) { +Builder angelContainerBuilder(_) { return new PartBuilder([new AngelContainerGenerator()], '.reflector.g.dart'); } diff --git a/angel_container_generator/lib/src/library_generator.dart b/angel_container_generator/lib/src/library_generator.dart index 4f2998df..cefa53b2 100644 --- a/angel_container_generator/lib/src/library_generator.dart +++ b/angel_container_generator/lib/src/library_generator.dart @@ -1,4 +1,5 @@ import 'package:analyzer/dart/element/element.dart'; +import 'package:angel_container/angel_container.dart'; import 'package:code_builder/code_builder.dart'; import 'package:recase/recase.dart'; diff --git a/angel_container_generator/pubspec.yaml b/angel_container_generator/pubspec.yaml index 6d640582..03265930 100644 --- a/angel_container_generator/pubspec.yaml +++ b/angel_container_generator/pubspec.yaml @@ -13,4 +13,5 @@ dependencies: recase: ^2.0.0 source_gen: ^0.9.0 dev_dependencies: - build_runner: ^0.10.0 \ No newline at end of file + build_runner: ^0.10.0 + test: ^1.0.0 \ No newline at end of file diff --git a/angel_container_generator/test/reflector.dart b/angel_container_generator/test/reflector.dart new file mode 100644 index 00000000..83bddf83 --- /dev/null +++ b/angel_container_generator/test/reflector.dart @@ -0,0 +1,10 @@ +@GenerateReflector(types: [Artist]) +library angel_container_generator_test; + +import 'package:angel_container/angel_container.dart'; + +class Artist {} + +r() { + var r = new Artist(); +}