Pipeline class
Runs a list of steps in order, stopping at the first failure.
Before executing anything, Pipeline.run validates the artifact chain: every step's BuildStep.requires must be satisfied by an earlier step's BuildStep.provides. A violation fails the build immediately with an actionable message — no tool is invoked.
final pipeline = Pipeline([
AssembleFlutterStep(),
StageLayoutStep(),
]);
final result = await pipeline.run(context);
if (!result.ok) {
stderr.writeln(result.error);
exit(1);
}
Pass onEvent to observe structured progress events (StepStarted,
StepFinished) — used by oka explain and machine-readable output.
Constructors
-
Pipeline(List<
BuildStep> steps, {bool verbose = false, void onEvent(PipelineEvent event)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onEvent → void Function(PipelineEvent event)?
-
Optional structured event sink (ADR-0007).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
steps
→ List<
BuildStep> -
Ordered steps to run.
final
- verbose → bool
-
Whether to print per-step progress to stdout.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
BuildContext ctx, {PipelineState? initialState, bool shouldCancel()?}) → Future< StepResult> -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → String? - Validates the artifact chain. Returns an error message, or null.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited