build library

Classes

AssetId
Identifies an asset within a package.
AssetReader
Standard interface for reading an asset within in a package. [...]
AssetWriter
Standard interface for writing an asset into a package's outputs.
AssetWriterSpy
An AssetWriter which tracks all assetsWritten during its lifetime.
Builder
The basic builder class, used to build new files from existing ones.
BuilderOptions
BuildStep
A single step in a build process. [...]
FileDeletingBuilder
A PostProcessBuilder which can be configured to consume any input extensions and always deletes it primary input.
MultiPackageAssetReader
The same as an AssetReader, except that findAssets takes an optional argument package which allows you to glob any package. [...]
MultiplexingBuilder
A Builder that runs multiple delegate builders asynchronously. [...]
PostProcessBuilder
A builder which runes in a special phase at the end of the build. [...]
PostProcessBuildStep
A simplified BuildStep which can only read its primary input, and can't get a Resolver or any Resources, at least for now.
ReleasableResolver
A resolver that should be manually released at the end of a build step.
Resolver
Standard interface for resolving Dart source code as part of a build.
Resolvers
A factory that returns a resolver for a given BuildStep.
Resource<T>
A Resource encapsulates the logic for creating and disposing of some expensive object which has a lifecycle. [...]
ResourceManager
Manages fetching and disposing of a group of Resources. [...]
StageTracker

Properties

log Logger
The log instance for the currently running BuildStep. [...]
read-only

Functions

expectedOutputs(Builder builder, AssetId input) → Iterable<AssetId>
Collects the expected AssetIds created by builder when given input based on the extension configuration.
runBuilder(Builder builder, Iterable<AssetId> inputs, AssetReader reader, AssetWriter writer, Resolvers resolvers, { Logger logger, ResourceManager resourceManager, String rootPackage, StageTracker stageTracker: NoOpStageTracker.instance }) → Future<void>
Run builder with each asset in inputs as the primary input. [...]
runPostProcessBuilder(PostProcessBuilder builder, AssetId inputId, AssetReader reader, AssetWriter writer, Logger logger, { void addAsset(AssetId) void deleteAsset(AssetId) }) → Future<void>
Run builder with inputId as the primary input. [...]

Typedefs

BeforeExit() → FutureOr<void>
BuilderFactory(BuilderOptions options) Builder
Creates a Builder honoring the configuation in options.
CreateInstance<T>() → FutureOr<T>
DisposeInstance<T>(T instance) → FutureOr<void>
PostProcessBuilderFactory(BuilderOptions) PostProcessBuilder

Exceptions / Errors

AssetNotFoundException
BuildStepCompletedException
InvalidInputException
InvalidOutputException
NonLibraryAssetException
Thrown when attempting to read a non-Dart library in a Resolver.
PackageNotFoundException
UnexpectedOutputException
UnresolvableAssetException