misc: upgraded to json_serializable v1 (dart-lang/pubspec_parse#20)

- Updated generated output
- Use latest build_runner
- Update test to pass with Dart 2 stable
- Test on the stable SDK, too
diff --git a/pkgs/pubspec_parse/.travis.yml b/pkgs/pubspec_parse/.travis.yml
index ea54694..8c6a4b8 100644
--- a/pkgs/pubspec_parse/.travis.yml
+++ b/pkgs/pubspec_parse/.travis.yml
@@ -2,6 +2,7 @@
 
 dart:
   - dev
+  - stable
 
 dart_task:
   - test: -x presubmit-only
diff --git a/pkgs/pubspec_parse/build.yaml b/pkgs/pubspec_parse/build.yaml
index 930aad1..69bcb1f 100644
--- a/pkgs/pubspec_parse/build.yaml
+++ b/pkgs/pubspec_parse/build.yaml
@@ -10,9 +10,3 @@
         options:
           any_map: true
           checked: true
-          header: |+
-           // Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-           // for details. 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/pkgs/pubspec_parse/lib/src/dependency.g.dart b/pkgs/pubspec_parse/lib/src/dependency.g.dart
index e4bca58..cba3364 100644
--- a/pkgs/pubspec_parse/lib/src/dependency.g.dart
+++ b/pkgs/pubspec_parse/lib/src/dependency.g.dart
@@ -1,7 +1,3 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. 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 'dependency.dart';
@@ -12,10 +8,8 @@
 
 SdkDependency _$SdkDependencyFromJson(Map json) {
   return $checkedNew('SdkDependency', json, () {
-    $checkKeys(json,
-        requiredKeys: const ['sdk'], disallowNullValues: const ['sdk']);
-    var val = new SdkDependency(
-        $checkedConvert(json, 'sdk', (v) => v as String),
+    $checkKeys(json, requiredKeys: ['sdk'], disallowNullValues: ['sdk']);
+    var val = SdkDependency($checkedConvert(json, 'sdk', (v) => v as String),
         version: $checkedConvert(json, 'version',
             (v) => v == null ? null : _constraintFromString(v as String)));
     return val;
@@ -24,9 +18,8 @@
 
 GitDependency _$GitDependencyFromJson(Map json) {
   return $checkedNew('GitDependency', json, () {
-    $checkKeys(json,
-        requiredKeys: const ['url'], disallowNullValues: const ['url']);
-    var val = new GitDependency(
+    $checkKeys(json, requiredKeys: ['url'], disallowNullValues: ['url']);
+    var val = GitDependency(
         $checkedConvert(
             json, 'url', (v) => v == null ? null : parseGitUri(v as String)),
         $checkedConvert(json, 'ref', (v) => v as String),
@@ -38,13 +31,12 @@
 HostedDependency _$HostedDependencyFromJson(Map json) {
   return $checkedNew('HostedDependency', json, () {
     $checkKeys(json,
-        allowedKeys: const ['version', 'hosted'],
-        disallowNullValues: const ['hosted']);
-    var val = new HostedDependency(
+        allowedKeys: ['version', 'hosted'], disallowNullValues: ['hosted']);
+    var val = HostedDependency(
         version: $checkedConvert(json, 'version',
             (v) => v == null ? null : _constraintFromString(v as String)),
         hosted: $checkedConvert(json, 'hosted',
-            (v) => v == null ? null : new HostedDetails.fromJson(v)));
+            (v) => v == null ? null : HostedDetails.fromJson(v)));
     return val;
   });
 }
@@ -52,10 +44,10 @@
 HostedDetails _$HostedDetailsFromJson(Map json) {
   return $checkedNew('HostedDetails', json, () {
     $checkKeys(json,
-        allowedKeys: const ['name', 'url'],
-        requiredKeys: const ['name'],
-        disallowNullValues: const ['name', 'url']);
-    var val = new HostedDetails(
+        allowedKeys: ['name', 'url'],
+        requiredKeys: ['name'],
+        disallowNullValues: ['name', 'url']);
+    var val = HostedDetails(
         $checkedConvert(json, 'name', (v) => v as String),
         $checkedConvert(
             json, 'url', (v) => v == null ? null : parseGitUri(v as String)));
diff --git a/pkgs/pubspec_parse/lib/src/pubspec.g.dart b/pkgs/pubspec_parse/lib/src/pubspec.g.dart
index 921b7e4..dfb0bcf 100644
--- a/pkgs/pubspec_parse/lib/src/pubspec.g.dart
+++ b/pkgs/pubspec_parse/lib/src/pubspec.g.dart
@@ -1,7 +1,3 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. 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 'pubspec.dart';
@@ -12,7 +8,7 @@
 
 Pubspec _$PubspecFromJson(Map json) {
   return $checkedNew('Pubspec', json, () {
-    var val = new Pubspec($checkedConvert(json, 'name', (v) => v as String),
+    var val = Pubspec($checkedConvert(json, 'name', (v) => v as String),
         version: $checkedConvert(json, 'version',
             (v) => v == null ? null : _versionFromString(v as String)),
         author: $checkedConvert(json, 'author', (v) => v as String),
@@ -31,7 +27,7 @@
         dependencyOverrides: $checkedConvert(
             json, 'dependency_overrides', (v) => parseDeps(v as Map)));
     return val;
-  }, fieldKeyMap: const {
+  }, fieldKeyMap: {
     'devDependencies': 'dev_dependencies',
     'dependencyOverrides': 'dependency_overrides'
   });
diff --git a/pkgs/pubspec_parse/pubspec.yaml b/pkgs/pubspec_parse/pubspec.yaml
index 17ff7d3..490a6b2 100644
--- a/pkgs/pubspec_parse/pubspec.yaml
+++ b/pkgs/pubspec_parse/pubspec.yaml
@@ -2,7 +2,7 @@
 description: >-
   Simple package for parsing pubspec.yaml files with a type-safe API and rich
   error reporting.
-version: 0.1.2+2
+version: 0.1.3-dev
 homepage: https://github.com/dart-lang/pubspec_parse
 author: Dart Team <misc@dartlang.org>
 
@@ -10,13 +10,14 @@
   sdk: '>=2.0.0-dev.54 <3.0.0'
 
 dependencies:
+  # Verified that no new features since 0.2.9 are used - be careful!
   json_annotation: '>=0.2.9 <2.0.0'
   pub_semver: ^1.3.2
   yaml: ^2.1.12
 
 dev_dependencies:
-  build_runner: ^0.9.0
-  json_serializable: ^0.5.8
+  build_runner: ^0.10.0
+  json_serializable: ^1.0.0
   path: ^1.5.1
   stack_trace: ^1.9.2
   test: ^1.0.0
diff --git a/pkgs/pubspec_parse/test/parse_test.dart b/pkgs/pubspec_parse/test/parse_test.dart
index b3db0b0..71c0a58 100644
--- a/pkgs/pubspec_parse/test/parse_test.dart
+++ b/pkgs/pubspec_parse/test/parse_test.dart
@@ -26,7 +26,7 @@
 
   test('all fields set', () {
     var version = new Version.parse('1.2.3');
-    var sdkConstraint = new VersionConstraint.parse('>=2.0.0-dev.54 <2.0.0');
+    var sdkConstraint = new VersionConstraint.parse('>=2.0.0-dev.54 <3.0.0');
     var value = parse({
       'name': 'sample',
       'version': version.toString(),