Skip to content

Commit bccf4b3

Browse files
authored
example: cleanup readme and pubspec (#1270)
1 parent 832fc7b commit bccf4b3

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

example/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ dependencies to your `pubspec.yaml`.
55

66
```yaml
77
dependencies:
8-
json_annotation: ^4.7.0
8+
json_annotation: ^4.8.0
99

1010
dev_dependencies:
11-
build_runner: ^2.0.0
12-
json_serializable: ^6.0.0
11+
build_runner: ^2.3.3
12+
json_serializable: ^6.6.0
1313
```
1414
1515
Annotate your code with classes defined in
@@ -23,7 +23,7 @@ Annotate your code with classes defined in
2323
Run `dart run build_runner build` to generate files into your source directory.
2424

2525
```console
26-
> pub run build_runner build
26+
> dart pub run build_runner build
2727
[INFO] ensureBuildScript: Generating build script completed, took 368ms
2828
[INFO] BuildDefinition: Reading cached asset graph completed, took 54ms
2929
[INFO] BuildDefinition: Checking for updates since last build completed, took 663ms

example/pubspec.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,29 @@ environment:
55
sdk: '>=2.18.0 <3.0.0'
66

77
dependencies:
8-
json_annotation: ^4.7.0
8+
json_annotation: ^4.8.0
99

1010
dev_dependencies:
1111
# Used by tests. Not required to use `json_serializable`.
1212
_json_serial_shared_test:
1313
path: ../shared_test
14-
build_runner: ^2.0.0
14+
15+
# REQUIRED!
16+
build_runner: ^2.3.3
1517

1618
# Used by tests. Not required to use `json_serializable`.
1719
build_verify: ^3.0.0
1820

19-
json_serializable: ^6.0.0
21+
# REQUIRED!
22+
json_serializable: ^6.6.0
2023

2124
# Not required to use `json_serializable`.
2225
lints: ^2.0.0
2326
path: ^1.8.0
2427
test: ^1.16.0
2528

29+
# This section is used to verify changes to these packages. Do not include in
30+
# your code!
2631
dependency_overrides:
2732
json_annotation:
2833
path: ../json_annotation

example/test/readme_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ void _expect(String fileName) {
2525

2626
const _pubspecContent = r'''
2727
dependencies:
28-
json_annotation: ^4.7.0
28+
json_annotation: ^4.8.0
2929
3030
dev_dependencies:
31-
build_runner: ^2.0.0
32-
json_serializable: ^6.0.0
31+
build_runner: ^2.3.3
32+
json_serializable: ^6.6.0
3333
''';

0 commit comments

Comments
 (0)