Skip to content

Commit b693399

Browse files
authored
misc: support Dart2 in current release of json_annotation/serializable (#262)
...and the example
1 parent 9d8c547 commit b693399

File tree

11 files changed

+23
-15
lines changed

11 files changed

+23
-15
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ stages:
6060

6161
# Only building master means that we don't run two builds for each pull request.
6262
branches:
63-
only: [master]
63+
only: [master,0_5_x]
6464

6565
cache:
6666
directories:

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
json_annotation: ^0.2.5
1212

1313
dev_dependencies:
14-
build_runner: ^0.8.9
14+
build_runner: ^0.9.0
1515
json_serializable: ^0.5.4
1616
```
1717

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: example
22
author: Dart Team <misc@dartlang.org>
33

44
environment:
5-
sdk: '>=2.0.0-dev.54 <2.0.0'
5+
sdk: '>=2.0.0-dev.54 <3.0.0'
66

77
dependencies:
88
json_annotation: ^0.2.5
99

1010
dev_dependencies:
11-
build_runner: ^0.8.9
11+
build_runner: ^0.9.0
1212
json_serializable: ^0.5.4
1313

1414
# Used by tests. Not required to use `json_serializable`.
1515
path: ^1.5.1
16-
test: ^0.12.38
16+
test: ^1.3.0

example/test/ensure_build_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ final _whitespace = new RegExp(r'\s');
4545
Set<String> _changedGeneratedFiles() {
4646
var output = _runProc('git', ['status', '--porcelain']);
4747

48-
return LineSplitter
49-
.split(output)
48+
return LineSplitter.split(output)
5049
.map((line) => line.split(_whitespace).last)
5150
.where((path) => path.endsWith('.dart'))
5251
.toSet();

example/test/readme_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ dependencies:
2323
json_annotation: ^0.2.5
2424
2525
dev_dependencies:
26-
build_runner: ^0.8.9
26+
build_runner: ^0.9.0
2727
json_serializable: ^0.5.4
2828
''';

json_annotation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.9+1
2+
3+
* Support the Dart 2.0 stable release.
4+
15
## 0.2.9
26

37
* When `FormatException` is caught in "checked mode", use the `message`

json_annotation/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: json_annotation
2-
version: 0.2.9
2+
version: 0.2.9+1
33
description: >-
44
Classes and helper functions that support JSON code generation via the
55
`json_serializable` package.
66
homepage: https://github.com/dart-lang/json_serializable
77
author: Dart Team <misc@dartlang.org>
88
environment:
9-
sdk: '>=2.0.0-dev.54.0 <2.0.0'
9+
sdk: '>=2.0.0-dev.54.0 <3.0.0'

json_serializable/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.8+1
2+
3+
* Support the Dart 2.0 stable release.
4+
15
## 0.5.8
26

37
* Small fixes to support Dart 2 runtime semantics.

json_serializable/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: json_serializable
2-
version: 0.5.8
2+
version: 0.5.8+1
33
author: Dart Team <misc@dartlang.org>
44
description: Generates utilities to aid in serializing to/from JSON.
55
homepage: https://github.com/dart-lang/json_serializable
66
environment:
7-
sdk: '>=2.0.0-dev.54 <2.0.0'
7+
sdk: '>=2.0.0-dev.54 <3.0.0'
88

99
dependencies:
1010
analyzer: ^0.32.0
@@ -19,7 +19,7 @@ dependencies:
1919
source_gen: ^0.8.2
2020

2121
dev_dependencies:
22-
build_runner: ^0.8.0
22+
build_runner: ^0.9.0
2323
build_web_compilers: ^0.4.0+1
2424
build_test: ^0.10.0
2525
collection: ^1.14.0

json_serializable/test/ensure_build_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ final _whitespace = new RegExp(r'\s');
4444
Set<String> _changedGeneratedFiles() {
4545
var output = _runProc('git', ['status', '--porcelain']);
4646

47-
return LineSplitter
48-
.split(output)
47+
return LineSplitter.split(output)
4948
.map((line) => line.split(_whitespace).last)
5049
.where((path) => path.endsWith('.dart'))
5150
.toSet();

json_serializable/test/literal/json_literal.g.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ final _$dataJsonLiteral = [
5252
'bool': true
5353
}
5454
];
55+
5556
const _$asConstJsonLiteral = const [
5657
const {
5758
'backspace': '\b',
@@ -94,6 +95,7 @@ const _$asConstJsonLiteral = const [
9495
'bool': true
9596
}
9697
];
98+
9799
const _$naughtyStringsJsonLiteral = const [
98100
'',
99101
'undefined',

0 commit comments

Comments
 (0)