From c68ee4ab9e35bb58bb2f53c8c5795cf3a53e7100 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 1 May 2019 17:56:55 -0700 Subject: [PATCH] Update jsonexample (#72) - use latest dependencies - update build.yaml for removed option - rebuilt generated code --- jsonexample/build.yaml | 10 ---- .../built_value/built_complex_object.g.dart | 26 ++++------ .../built_value/built_simple_object.g.dart | 25 ++++------ .../built_value_serializers.g.dart | 14 +----- jsonexample/pubspec.lock | 49 ++++++++----------- jsonexample/pubspec.yaml | 8 +-- 6 files changed, 46 insertions(+), 86 deletions(-) diff --git a/jsonexample/build.yaml b/jsonexample/build.yaml index 86bade68a..26c227479 100644 --- a/jsonexample/build.yaml +++ b/jsonexample/build.yaml @@ -14,13 +14,3 @@ targets: json_serializable|json_serializable: generate_for: - lib/json_serializable/*.dart - options: - header: | - // Copyright 2018 The Chromium Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - - // GENERATED CODE - DO NOT MODIFY BY HAND - - - diff --git a/jsonexample/lib/built_value/built_complex_object.g.dart b/jsonexample/lib/built_value/built_complex_object.g.dart index f483b2084..eedd03061 100644 --- a/jsonexample/lib/built_value/built_complex_object.g.dart +++ b/jsonexample/lib/built_value/built_complex_object.g.dart @@ -6,18 +6,6 @@ part of 'built_complex_object.dart'; // BuiltValueGenerator // ************************************************************************** -// ignore_for_file: always_put_control_body_on_new_line -// ignore_for_file: annotate_overrides -// ignore_for_file: avoid_annotating_with_dynamic -// ignore_for_file: avoid_catches_without_on_clauses -// ignore_for_file: avoid_returning_this -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: omit_local_variable_types -// ignore_for_file: prefer_expression_function_bodies -// ignore_for_file: sort_constructors_first -// ignore_for_file: unnecessary_const -// ignore_for_file: unnecessary_new - Serializer _$builtComplexObjectSerializer = new _$BuiltComplexObjectSerializer(); @@ -165,7 +153,8 @@ class _$BuiltComplexObject extends BuiltComplexObject { @override final BuiltList aListOfObjects; - factory _$BuiltComplexObject([void updates(BuiltComplexObjectBuilder b)]) => + factory _$BuiltComplexObject( + [void Function(BuiltComplexObjectBuilder) updates]) => (new BuiltComplexObjectBuilder()..update(updates)).build(); _$BuiltComplexObject._( @@ -180,7 +169,8 @@ class _$BuiltComplexObject extends BuiltComplexObject { : super._(); @override - BuiltComplexObject rebuild(void updates(BuiltComplexObjectBuilder b)) => + BuiltComplexObject rebuild( + void Function(BuiltComplexObjectBuilder) updates) => (toBuilder()..update(updates)).build(); @override @@ -297,12 +287,14 @@ class BuiltComplexObjectBuilder @override void replace(BuiltComplexObject other) { - if (other == null) throw new ArgumentError.notNull('other'); + if (other == null) { + throw new ArgumentError.notNull('other'); + } _$v = other as _$BuiltComplexObject; } @override - void update(void updates(BuiltComplexObjectBuilder b)) { + void update(void Function(BuiltComplexObjectBuilder) updates) { if (updates != null) updates(this); } @@ -343,3 +335,5 @@ class BuiltComplexObjectBuilder return _$result; } } + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/jsonexample/lib/built_value/built_simple_object.g.dart b/jsonexample/lib/built_value/built_simple_object.g.dart index 1fd05e496..dd31a3d54 100644 --- a/jsonexample/lib/built_value/built_simple_object.g.dart +++ b/jsonexample/lib/built_value/built_simple_object.g.dart @@ -6,18 +6,6 @@ part of 'built_simple_object.dart'; // BuiltValueGenerator // ************************************************************************** -// ignore_for_file: always_put_control_body_on_new_line -// ignore_for_file: annotate_overrides -// ignore_for_file: avoid_annotating_with_dynamic -// ignore_for_file: avoid_catches_without_on_clauses -// ignore_for_file: avoid_returning_this -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: omit_local_variable_types -// ignore_for_file: prefer_expression_function_bodies -// ignore_for_file: sort_constructors_first -// ignore_for_file: unnecessary_const -// ignore_for_file: unnecessary_new - Serializer _$builtSimpleObjectSerializer = new _$BuiltSimpleObjectSerializer(); @@ -137,7 +125,8 @@ class _$BuiltSimpleObject extends BuiltSimpleObject { @override final BuiltList aListOfDoubles; - factory _$BuiltSimpleObject([void updates(BuiltSimpleObjectBuilder b)]) => + factory _$BuiltSimpleObject( + [void Function(BuiltSimpleObjectBuilder) updates]) => (new BuiltSimpleObjectBuilder()..update(updates)).build(); _$BuiltSimpleObject._( @@ -150,7 +139,7 @@ class _$BuiltSimpleObject extends BuiltSimpleObject { : super._(); @override - BuiltSimpleObject rebuild(void updates(BuiltSimpleObjectBuilder b)) => + BuiltSimpleObject rebuild(void Function(BuiltSimpleObjectBuilder) updates) => (toBuilder()..update(updates)).build(); @override @@ -245,12 +234,14 @@ class BuiltSimpleObjectBuilder @override void replace(BuiltSimpleObject other) { - if (other == null) throw new ArgumentError.notNull('other'); + if (other == null) { + throw new ArgumentError.notNull('other'); + } _$v = other as _$BuiltSimpleObject; } @override - void update(void updates(BuiltSimpleObjectBuilder b)) { + void update(void Function(BuiltSimpleObjectBuilder) updates) { if (updates != null) updates(this); } @@ -285,3 +276,5 @@ class BuiltSimpleObjectBuilder return _$result; } } + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/jsonexample/lib/built_value/built_value_serializers.g.dart b/jsonexample/lib/built_value/built_value_serializers.g.dart index b3dd3caae..3bba43f4e 100644 --- a/jsonexample/lib/built_value/built_value_serializers.g.dart +++ b/jsonexample/lib/built_value/built_value_serializers.g.dart @@ -6,18 +6,6 @@ part of serializers; // BuiltValueGenerator // ************************************************************************** -// ignore_for_file: always_put_control_body_on_new_line -// ignore_for_file: annotate_overrides -// ignore_for_file: avoid_annotating_with_dynamic -// ignore_for_file: avoid_catches_without_on_clauses -// ignore_for_file: avoid_returning_this -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: omit_local_variable_types -// ignore_for_file: prefer_expression_function_bodies -// ignore_for_file: sort_constructors_first -// ignore_for_file: unnecessary_const -// ignore_for_file: unnecessary_new - Serializers _$serializers = (new Serializers().toBuilder() ..add(BuiltComplexObject.serializer) ..add(BuiltSimpleObject.serializer) @@ -43,3 +31,5 @@ Serializers _$serializers = (new Serializers().toBuilder() const FullType(BuiltList, const [const FullType(BuiltSimpleObject)]), () => new ListBuilder())) .build(); + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/jsonexample/pubspec.lock b/jsonexample/pubspec.lock index b482e4531..22528d645 100644 --- a/jsonexample/pubspec.lock +++ b/jsonexample/pubspec.lock @@ -7,14 +7,14 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.33.6+1" + version: "0.35.4" analyzer_plugin: dependency: transitive description: name: analyzer_plugin url: "https://pub.dartlang.org" source: hosted - version: "0.0.1-alpha.5" + version: "0.0.1-alpha.7" args: dependency: transitive description: @@ -42,42 +42,42 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.4" build_config: dependency: transitive description: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+4" + version: "0.3.2" build_daemon: dependency: transitive description: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "0.2.3" + version: "0.5.0" build_resolvers: dependency: transitive description: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "0.2.3" + version: "1.0.4" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.2.3" + version: "1.3.3" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "3.0.3" built_collection: dependency: "direct main" description: @@ -91,14 +91,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "6.3.2" + version: "6.4.0" built_value_generator: dependency: "direct dev" description: name: built_value_generator url: "https://pub.dartlang.org" source: hosted - version: "6.3.2" + version: "6.4.0" charcode: dependency: transitive description: @@ -140,14 +140,14 @@ packages: name: csslib url: "https://pub.dartlang.org" source: hosted - version: "0.14.6" + version: "0.15.0" dart_style: dependency: transitive description: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.4" fixnum: dependency: transitive description: @@ -171,7 +171,7 @@ packages: name: front_end url: "https://pub.dartlang.org" source: hosted - version: "0.1.6+9" + version: "0.1.14" glob: dependency: transitive description: @@ -192,7 +192,7 @@ packages: name: html url: "https://pub.dartlang.org" source: hosted - version: "0.13.4+1" + version: "0.13.4+2" http: dependency: transitive description: @@ -206,7 +206,7 @@ packages: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" http_parser: dependency: transitive description: @@ -234,21 +234,21 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "2.2.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "1.5.1" + version: "2.2.1" kernel: dependency: transitive description: name: kernel url: "https://pub.dartlang.org" source: hosted - version: "0.3.6+9" + version: "0.3.14" logging: dependency: transitive description: @@ -305,13 +305,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.4.0" - plugin: - dependency: transitive - description: - name: plugin - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+3" pool: dependency: transitive description: @@ -353,7 +346,7 @@ packages: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.2+5" + version: "0.2.3" sky_engine: dependency: transitive description: flutter @@ -365,7 +358,7 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "0.9.4+1" + version: "0.9.4+2" source_span: dependency: transitive description: @@ -465,4 +458,4 @@ packages: source: hosted version: "2.1.15" sdks: - dart: ">=2.1.0 <3.0.0" + dart: ">=2.1.1 <3.0.0" diff --git a/jsonexample/pubspec.yaml b/jsonexample/pubspec.yaml index a7323fab1..adad5aaa4 100644 --- a/jsonexample/pubspec.yaml +++ b/jsonexample/pubspec.yaml @@ -2,11 +2,11 @@ name: jsonexample description: A demonstration of JSON parsing environment: - sdk: '>=2.0.0-dev <3.0.0' + sdk: '>=2.1.0 <3.0.0' dependencies: - json_annotation: ^1.0.0 - built_collection: '>=2.0.0 <5.0.0' + json_annotation: ^2.0.0 + built_collection: ^4.0.0 built_value: ^6.1.5 flutter: @@ -15,7 +15,7 @@ dependencies: dev_dependencies: build_runner: ^1.0.0 built_value_generator: ^6.1.5 - json_serializable: ^1.0.0 + json_serializable: ^2.2.1 flutter_test: sdk: flutter