mirror of https://github.com/AMT-Cheif/drift.git
108 lines
2.7 KiB
YAML
108 lines
2.7 KiB
YAML
builders:
|
|
versions:
|
|
import: 'tool/write_versions.dart'
|
|
build_to: cache
|
|
builder_factories: ["writeVersions"]
|
|
build_extensions: {"$package$": ["lib/versions.json"]}
|
|
api_index:
|
|
import: 'package:code_snippets/indexer.dart'
|
|
build_to: cache
|
|
builder_factories: ['DartIndexBuilder.new']
|
|
auto_apply: all_packages
|
|
runs_before: [code_snippets]
|
|
build_extensions: {"lib/lib": ['api.json']}
|
|
code_snippets:
|
|
import: 'tool/snippets.dart'
|
|
build_to: cache
|
|
builder_factories: ["SnippetsBuilder.new"]
|
|
build_extensions: {"": [".excerpt.json"]}
|
|
auto_apply: none
|
|
defaults:
|
|
options:
|
|
release: false
|
|
release_options:
|
|
release: true
|
|
|
|
targets:
|
|
# We run drift and other builders first, syntax higlighting is more
|
|
# accurate if the generated classes exist.
|
|
source_gen:
|
|
auto_apply_builders: false
|
|
builders:
|
|
drift_dev:preparing_builder:
|
|
enabled: true
|
|
drift_dev:drift_dev:
|
|
enabled: true
|
|
options:
|
|
generate_connect_constructor: true
|
|
json_serializable:
|
|
enabled: true
|
|
sources:
|
|
- lib/**
|
|
- test/generated/**
|
|
|
|
prepare:
|
|
dependencies: [":source_gen"]
|
|
builders:
|
|
":versions":
|
|
enabled: true
|
|
":code_snippets":
|
|
enabled: true
|
|
generate_for:
|
|
include:
|
|
- "lib/snippets/**/*.dart"
|
|
- "lib/snippets/**/*.drift"
|
|
- "lib/snippets/*.dart"
|
|
exclude:
|
|
- "**/*.g.dart"
|
|
auto_apply_builders: false
|
|
sources:
|
|
- "$package$"
|
|
- "lib/versions.json"
|
|
- "lib/snippets/**"
|
|
- "tool/write_versions.dart"
|
|
- "tool/snippets.dart"
|
|
|
|
$default:
|
|
dependencies: [":prepare"]
|
|
builders:
|
|
built_site:
|
|
release_options:
|
|
environment: "preview"
|
|
build_web_compilers:entrypoint:
|
|
release_options:
|
|
# Turn of null assertions for release builds, it looks like this
|
|
# makes generated code slightly smaller.
|
|
native_null_assertions: false
|
|
dart2js_args:
|
|
- "-O4"
|
|
- "--csp"
|
|
# These builders should run in the source_gen target
|
|
drift_dev:preparing_builder:
|
|
enabled: false
|
|
drift_dev:drift_dev:
|
|
enabled: false
|
|
source_gen:combining_builder:
|
|
enabled: false
|
|
json_serializable:
|
|
enabled: false
|
|
sources:
|
|
- "lib/**"
|
|
- "pages/**"
|
|
- "templates/**"
|
|
- "web/**"
|
|
- "$package$"
|
|
- "pubspec.yaml"
|
|
- "theme.yaml"
|
|
- "website.yaml"
|
|
|
|
# Snippets referencing public API members from this package will get dartdoc links
|
|
# embedded in them.
|
|
global_options:
|
|
":api_index":
|
|
options:
|
|
packages: ['drift', 'drift_dev', 'sqlite3']
|
|
|
|
additional_public_assets:
|
|
- "pages/**"
|