-
Notifications
You must be signed in to change notification settings - Fork 122
/
build.yaml
37 lines (34 loc) · 1.59 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
30
31
32
33
34
35
36
37
# See docs:
# https://pub.dev/packages/build_config
# https://github.com/dart-lang/build/blob/master/docs/build_yaml_format.md
# https://github.com/dart-lang/build/blob/master/docs/transforming_code.md
targets:
$default:
builders:
objectbox_generator|resolver:
enabled: true
objectbox_generator|generator:
enabled: true
builders:
# Finds all classes annotated with @Entity annotation and creates intermediate files for the generator.
# It's executed multiple times, once per file
resolver:
import: "package:objectbox_generator/objectbox_generator.dart"
builder_factories: ["entityResolverFactory"]
# build_extensions: Required. A map from input extension to the list of output extensions that may be created
# for that input. This must match the merged buildExtensions maps from each Builder in builder_factories.
build_extensions: {'.dart': ['.objectbox.info']}
auto_apply: dependents
build_to: cache
# Writes objectbox_model.dart and objectbox-model.json from the prepared .objectbox.info files found in the repo.
generator:
import: "package:objectbox_generator/objectbox_generator.dart"
builder_factories: ["codeGeneratorFactory"]
# build_extensions: Required. A map from input extension to the list of output extensions that may be created
# for that input. This must match the merged buildExtensions maps from each Builder in builder_factories.
build_extensions:
"$lib$": ["objectbox.g.dart"]
"$test": ["objectbox.g.dart"]
required_inputs: ['.objectbox.info']
auto_apply: dependents
build_to: source