File tree 4 files changed +20
-13
lines changed
4 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ environment:
7
7
sdk : ' >=1.24.0 <2.0.0-dev.infinity'
8
8
dependencies :
9
9
analyzer : ' >=0.29.10 <0.31.0'
10
- build : ^ 0.9.0
10
+ build : ' >= 0.9.0 <0.11.0 '
11
11
cli_util : ^0.1.0
12
12
path : ^1.3.2
13
13
source_gen : ^0.7.0
14
14
dev_dependencies :
15
- build_runner : ^0.3.2
15
+ build_runner : ^0.4.0
16
16
build_test : ^0.6.0
17
17
collection : ^1.14.0
18
18
test : ^0.12.3
Original file line number Diff line number Diff line change 3
3
// for details. All rights reserved. Use of this source code is governed by a
4
4
// BSD-style license that can be found in the LICENSE file.
5
5
6
+ import 'dart:io' ;
7
+
6
8
import 'package:build_runner/build_runner.dart' ;
7
9
8
- import 'phases .dart' ;
10
+ import 'build_actions .dart' ;
9
11
10
12
main () async {
11
- await build (phases, deleteFilesByDefault: true );
13
+ var result = await build (buildActions, deleteFilesByDefault: true );
14
+ if (result.status == BuildStatus .failure) {
15
+ exitCode = 1 ;
16
+ }
12
17
}
Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ import 'package:build_runner/build_runner.dart';
6
6
import 'package:json_serializable/generators.dart' ;
7
7
import 'package:source_gen/source_gen.dart' ;
8
8
9
- final PhaseGroup phases = new PhaseGroup .singleAction (
10
- new PartBuilder (const [
11
- const JsonSerializableGenerator (),
12
- const JsonLiteralGenerator ()
13
- ]),
14
- new InputSet ('json_serializable' ,
15
- const ['example/*.dart' , 'test/test_files/*.dart' ]));
9
+ final List <BuildAction > buildActions = [
10
+ new BuildAction (
11
+ new PartBuilder (const [
12
+ const JsonSerializableGenerator (),
13
+ const JsonLiteralGenerator ()
14
+ ]),
15
+ 'json_serializable' ,
16
+ inputs: const ['example/*.dart' , 'test/test_files/*.dart' ])
17
+ ];
Original file line number Diff line number Diff line change 4
4
5
5
import 'package:build_runner/build_runner.dart' ;
6
6
7
- import 'phases .dart' ;
7
+ import 'build_actions .dart' ;
8
8
9
9
main () {
10
- watch (phases , deleteFilesByDefault: true );
10
+ watch (buildActions , deleteFilesByDefault: true );
11
11
}
You can’t perform that action at this time.
0 commit comments