From 9d5686ae133b947406e9961d8dca8da3204efb82 Mon Sep 17 00:00:00 2001 From: Andrew Brogdon Date: Fri, 31 Aug 2018 09:29:04 -0700 Subject: [PATCH] Fixes the dependencies for the examples, unbreaks Travis. (#11) * Updated jsonexample for new dep versions. * Fixes for other examples. --- .../built_value/built_complex_object.g.dart | 18 ++--- .../built_value/built_simple_object.g.dart | 18 ++--- .../built_value_serializers.g.dart | 8 +- .../serializable_complex_object.dart | 5 +- .../serializable_complex_object.g.dart | 80 ++++++++----------- .../serializable_simple_object.dart | 5 +- .../serializable_simple_object.g.dart | 55 ++++++------- jsonexample/pubspec.yaml | 18 +++-- platform_view_swift/.gitignore | 15 ++++ platform_view_swift/ios/.gitignore | 44 ++++++++++ platform_view_swift/pubspec.yaml | 2 - shrine/pubspec.yaml | 6 +- 12 files changed, 157 insertions(+), 117 deletions(-) create mode 100644 platform_view_swift/.gitignore create mode 100644 platform_view_swift/ios/.gitignore diff --git a/jsonexample/lib/built_value/built_complex_object.g.dart b/jsonexample/lib/built_value/built_complex_object.g.dart index 51aeb6f97..f483b2084 100644 --- a/jsonexample/lib/built_value/built_complex_object.g.dart +++ b/jsonexample/lib/built_value/built_complex_object.g.dart @@ -1,7 +1,3 @@ -// 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 part of 'built_complex_object.dart'; @@ -13,10 +9,14 @@ part of 'built_complex_object.dart'; // 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(); @@ -30,7 +30,7 @@ class _$BuiltComplexObjectSerializer @override Iterable serialize(Serializers serializers, BuiltComplexObject object, - {FullType specifiedType: FullType.unspecified}) { + {FullType specifiedType = FullType.unspecified}) { final result = []; if (object.aString != null) { result @@ -90,7 +90,7 @@ class _$BuiltComplexObjectSerializer @override BuiltComplexObject deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType: FullType.unspecified}) { + {FullType specifiedType = FullType.unspecified}) { final result = new BuiltComplexObjectBuilder(); final iterator = serialized.iterator; @@ -188,10 +188,10 @@ class _$BuiltComplexObject extends BuiltComplexObject { new BuiltComplexObjectBuilder()..replace(this); @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; - if (other is! BuiltComplexObject) return false; - return aString == other.aString && + return other is BuiltComplexObject && + aString == other.aString && anInt == other.anInt && aDouble == other.aDouble && anObject == other.anObject && diff --git a/jsonexample/lib/built_value/built_simple_object.g.dart b/jsonexample/lib/built_value/built_simple_object.g.dart index 16ebd2eec..1fd05e496 100644 --- a/jsonexample/lib/built_value/built_simple_object.g.dart +++ b/jsonexample/lib/built_value/built_simple_object.g.dart @@ -1,7 +1,3 @@ -// 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 part of 'built_simple_object.dart'; @@ -13,10 +9,14 @@ part of 'built_simple_object.dart'; // 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(); @@ -30,7 +30,7 @@ class _$BuiltSimpleObjectSerializer @override Iterable serialize(Serializers serializers, BuiltSimpleObject object, - {FullType specifiedType: FullType.unspecified}) { + {FullType specifiedType = FullType.unspecified}) { final result = []; if (object.aString != null) { result @@ -77,7 +77,7 @@ class _$BuiltSimpleObjectSerializer @override BuiltSimpleObject deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType: FullType.unspecified}) { + {FullType specifiedType = FullType.unspecified}) { final result = new BuiltSimpleObjectBuilder(); final iterator = serialized.iterator; @@ -158,10 +158,10 @@ class _$BuiltSimpleObject extends BuiltSimpleObject { new BuiltSimpleObjectBuilder()..replace(this); @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; - if (other is! BuiltSimpleObject) return false; - return aString == other.aString && + return other is BuiltSimpleObject && + aString == other.aString && anInt == other.anInt && aDouble == other.aDouble && aListOfStrings == other.aListOfStrings && diff --git a/jsonexample/lib/built_value/built_value_serializers.g.dart b/jsonexample/lib/built_value/built_value_serializers.g.dart index cd4549bf7..b3dd3caae 100644 --- a/jsonexample/lib/built_value/built_value_serializers.g.dart +++ b/jsonexample/lib/built_value/built_value_serializers.g.dart @@ -1,7 +1,3 @@ -// 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 part of serializers; @@ -13,10 +9,14 @@ part of serializers; // 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) diff --git a/jsonexample/lib/json_serializable/serializable_complex_object.dart b/jsonexample/lib/json_serializable/serializable_complex_object.dart index 0183c8fb8..467e48e0c 100644 --- a/jsonexample/lib/json_serializable/serializable_complex_object.dart +++ b/jsonexample/lib/json_serializable/serializable_complex_object.dart @@ -8,8 +8,7 @@ import 'package:jsonexample/json_serializable/serializable_simple_object.dart'; part 'serializable_complex_object.g.dart'; @JsonSerializable() -class SerializableComplexObject extends Object - with _$SerializableComplexObjectSerializerMixin { +class SerializableComplexObject { SerializableComplexObject({ this.aString, this.anInt, @@ -32,4 +31,6 @@ class SerializableComplexObject extends Object factory SerializableComplexObject.fromJson(Map json) => _$SerializableComplexObjectFromJson(json); + + Map toJson() => _$SerializableComplexObjectToJson(this); } diff --git a/jsonexample/lib/json_serializable/serializable_complex_object.g.dart b/jsonexample/lib/json_serializable/serializable_complex_object.g.dart index d02767658..36f7cad63 100644 --- a/jsonexample/lib/json_serializable/serializable_complex_object.g.dart +++ b/jsonexample/lib/json_serializable/serializable_complex_object.g.dart @@ -1,7 +1,3 @@ -// 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 part of 'serializable_complex_object.dart'; @@ -11,46 +7,38 @@ part of 'serializable_complex_object.dart'; // ************************************************************************** SerializableComplexObject _$SerializableComplexObjectFromJson( - Map json) => - new SerializableComplexObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: (json['aDouble'] as num)?.toDouble(), - anObject: json['anObject'] == null - ? null - : new SerializableSimpleObject.fromJson( - json['anObject'] as Map), - aListOfStrings: - (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), - aListOfInts: - (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), - aListOfDoubles: (json['aListOfDoubles'] as List) - ?.map((e) => (e as num)?.toDouble()) - ?.toList(), - aListOfObjects: (json['aListOfObjects'] as List) - ?.map((e) => e == null - ? null - : new SerializableSimpleObject.fromJson( - e as Map)) - ?.toList()); - -abstract class _$SerializableComplexObjectSerializerMixin { - String get aString; - int get anInt; - double get aDouble; - SerializableSimpleObject get anObject; - List get aListOfStrings; - List get aListOfInts; - List get aListOfDoubles; - List get aListOfObjects; - Map toJson() => { - 'aString': aString, - 'anInt': anInt, - 'aDouble': aDouble, - 'anObject': anObject, - 'aListOfStrings': aListOfStrings, - 'aListOfInts': aListOfInts, - 'aListOfDoubles': aListOfDoubles, - 'aListOfObjects': aListOfObjects - }; + Map json) { + return SerializableComplexObject( + aString: json['aString'] as String, + anInt: json['anInt'] as int, + aDouble: (json['aDouble'] as num)?.toDouble(), + anObject: json['anObject'] == null + ? null + : SerializableSimpleObject.fromJson( + json['anObject'] as Map), + aListOfStrings: + (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), + aListOfInts: + (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), + aListOfDoubles: (json['aListOfDoubles'] as List) + ?.map((e) => (e as num)?.toDouble()) + ?.toList(), + aListOfObjects: (json['aListOfObjects'] as List) + ?.map((e) => e == null + ? null + : SerializableSimpleObject.fromJson(e as Map)) + ?.toList()); } + +Map _$SerializableComplexObjectToJson( + SerializableComplexObject instance) => + { + 'aString': instance.aString, + 'anInt': instance.anInt, + 'aDouble': instance.aDouble, + 'anObject': instance.anObject, + 'aListOfStrings': instance.aListOfStrings, + 'aListOfInts': instance.aListOfInts, + 'aListOfDoubles': instance.aListOfDoubles, + 'aListOfObjects': instance.aListOfObjects + }; diff --git a/jsonexample/lib/json_serializable/serializable_simple_object.dart b/jsonexample/lib/json_serializable/serializable_simple_object.dart index 8c5b434a9..f762c9441 100644 --- a/jsonexample/lib/json_serializable/serializable_simple_object.dart +++ b/jsonexample/lib/json_serializable/serializable_simple_object.dart @@ -9,8 +9,7 @@ part 'serializable_simple_object.g.dart'; /// An annotation for the code generator to know that this class needs the /// JSON serialization logic to be generated. @JsonSerializable() -class SerializableSimpleObject extends Object - with _$SerializableSimpleObjectSerializerMixin { +class SerializableSimpleObject { SerializableSimpleObject({ this.aString, this.anInt, @@ -29,4 +28,6 @@ class SerializableSimpleObject extends Object factory SerializableSimpleObject.fromJson(Map json) => _$SerializableSimpleObjectFromJson(json); + + Map toJson() => _$SerializableSimpleObjectToJson(this); } diff --git a/jsonexample/lib/json_serializable/serializable_simple_object.g.dart b/jsonexample/lib/json_serializable/serializable_simple_object.g.dart index e985450b9..a27b60850 100644 --- a/jsonexample/lib/json_serializable/serializable_simple_object.g.dart +++ b/jsonexample/lib/json_serializable/serializable_simple_object.g.dart @@ -1,7 +1,3 @@ -// 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 part of 'serializable_simple_object.dart'; @@ -11,32 +7,27 @@ part of 'serializable_simple_object.dart'; // ************************************************************************** SerializableSimpleObject _$SerializableSimpleObjectFromJson( - Map json) => - new SerializableSimpleObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: (json['aDouble'] as num)?.toDouble(), - aListOfStrings: - (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), - aListOfInts: - (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), - aListOfDoubles: (json['aListOfDoubles'] as List) - ?.map((e) => (e as num)?.toDouble()) - ?.toList()); - -abstract class _$SerializableSimpleObjectSerializerMixin { - String get aString; - int get anInt; - double get aDouble; - List get aListOfStrings; - List get aListOfInts; - List get aListOfDoubles; - Map toJson() => { - 'aString': aString, - 'anInt': anInt, - 'aDouble': aDouble, - 'aListOfStrings': aListOfStrings, - 'aListOfInts': aListOfInts, - 'aListOfDoubles': aListOfDoubles - }; + Map json) { + return SerializableSimpleObject( + aString: json['aString'] as String, + anInt: json['anInt'] as int, + aDouble: (json['aDouble'] as num)?.toDouble(), + aListOfStrings: + (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), + aListOfInts: + (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), + aListOfDoubles: (json['aListOfDoubles'] as List) + ?.map((e) => (e as num)?.toDouble()) + ?.toList()); } + +Map _$SerializableSimpleObjectToJson( + SerializableSimpleObject instance) => + { + 'aString': instance.aString, + 'anInt': instance.anInt, + 'aDouble': instance.aDouble, + 'aListOfStrings': instance.aListOfStrings, + 'aListOfInts': instance.aListOfInts, + 'aListOfDoubles': instance.aListOfDoubles + }; diff --git a/jsonexample/pubspec.yaml b/jsonexample/pubspec.yaml index afaf7cf30..09e616e30 100644 --- a/jsonexample/pubspec.yaml +++ b/jsonexample/pubspec.yaml @@ -1,20 +1,21 @@ name: jsonexample description: A demonstration of JSON parsing -dependencies: +environment: + sdk: '>=2.0.0-dev <3.0.0' - json_annotation: ^0.2.3 - built_collection: '>=2.0.0 <4.0.0' - built_value: ^5.5.1 +dependencies: + json_annotation: ^1.0.0 + built_collection: '>=2.0.0 <5.0.0' + built_value: ^6.1.0 flutter: sdk: flutter dev_dependencies: - - build_runner: ^0.8.0 - json_serializable: ^0.5.0 - built_value_generator: ^5.5.0 + build_runner: '>=0.9.0 <0.11.0' + built_value_generator: ^6.1.0 + json_serializable: ^1.0.0 flutter_test: sdk: flutter @@ -22,3 +23,4 @@ dev_dependencies: flutter: uses-material-design: true + diff --git a/platform_view_swift/.gitignore b/platform_view_swift/.gitignore new file mode 100644 index 000000000..0442f30ea --- /dev/null +++ b/platform_view_swift/.gitignore @@ -0,0 +1,15 @@ +.DS_Store +.dart_tool/ +.packages +.pub/ +.idea +.atom +.flutter-plugins +build/ +*.iml + +.symlinks/ +Podfile.lock +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m +GeneratedPluginRegistrant.java \ No newline at end of file diff --git a/platform_view_swift/ios/.gitignore b/platform_view_swift/ios/.gitignore new file mode 100644 index 000000000..2a8c8b606 --- /dev/null +++ b/platform_view_swift/ios/.gitignore @@ -0,0 +1,44 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/app.flx +/Flutter/app.zip +/Flutter/flutter_assets/ +/Flutter/App.framework +/Flutter/Flutter.framework +/Flutter/Generated.xcconfig +/ServiceDefinitions.json + +Pods/ diff --git a/platform_view_swift/pubspec.yaml b/platform_view_swift/pubspec.yaml index c7d0c6ce8..ad50c8ebd 100644 --- a/platform_view_swift/pubspec.yaml +++ b/platform_view_swift/pubspec.yaml @@ -9,5 +9,3 @@ flutter: uses-material-design: true assets: - assets/flutter-mark-square-64.png - -# PUBSPEC CHECKSUM: 2aa2 diff --git a/shrine/pubspec.yaml b/shrine/pubspec.yaml index b5129de5f..e567354bc 100644 --- a/shrine/pubspec.yaml +++ b/shrine/pubspec.yaml @@ -6,9 +6,9 @@ dependencies: sdk: flutter cupertino_icons: ^0.1.2 - intl: 0.15.6 - scoped_model: 0.2.0 - shrine_images: 1.0.0 + intl: ^0.15.7 + scoped_model: ^0.3.0 + shrine_images: ^1.0.0 dev_dependencies: flutter_test: