-
Notifications
You must be signed in to change notification settings - Fork 163
/
build.yaml
29 lines (28 loc) · 1.19 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
targets:
$default:
builders:
mockito|mockBuilder:
generate_for:
- example/**.dart
- test/end2end/*.dart
options:
# build_extensions takes a source pattern and if it matches it will transform the output
# to your desired path. The default behaviour is to the .mocks.dart file to be in the same
# directory as the source .dart file. As seen below this is customizable, but the generated
# file must always end in `.mocks.dart`.
#
# If you specify custom build_extensions you MUST ensure that they cover all input files
build_extensions:
'^example/build_extensions/{{}}.dart' : 'example/build_extensions/mocks/{{}}.mocks.dart'
'^example/example.dart' : 'example/example.mocks.dart'
'^example/iss/{{}}.dart' : 'example/iss/{{}}.mocks.dart'
'^test/end2end/{{}}.dart' : 'test/end2end/{{}}.mocks.dart'
builders:
mockBuilder:
import: "package:mockito/src/builder.dart"
builder_factories: ["buildMocks"]
build_extensions: {".dart": [".mocks.dart"]}
build_to: source
auto_apply: dependents
defaults:
generate_for: ['test/**']