argParser property
Argument parser for the run command with configuration and operation options.
Available options:
--configor-c- Path to the configuration file (defaults to "distribution.yaml")--operationor-o- Key of the operation to run (use "TaskKey.JobKey" for specific jobs)--dry-run- Resolve and print every command without executing it--fail-fast- Stop as soon as a task fails--list- Print the available tasks and jobs, then exit
Implementation
@override
ArgParser get argParser => ArgParser()
..addOption(
'config',
abbr: 'c',
help: 'Path to the configuration file.',
defaultsTo: 'distribution.yaml',
)
..addOption(
'operation',
abbr: 'o',
help: 'Run a single task ("android") or a single job ("android.build").',
defaultsTo: '',
)
..addFlag(
'dry-run',
negatable: false,
defaultsTo: false,
help: 'Resolve and print every command without executing it.',
)
..addFlag(
'fail-fast',
negatable: false,
defaultsTo: false,
help: 'Stop the run as soon as a task fails.',
)
..addFlag(
'list',
abbr: 'l',
negatable: false,
defaultsTo: false,
help: 'List the available tasks and jobs, then exit.',
)
..addFlag(
'json',
negatable: false,
defaultsTo: false,
help: 'Print a machine readable run report to stdout. '
'The human readable log moves to stderr.',
)
..addOption(
'json-file',
help: 'Write the machine readable run report to the given path.',
)
..addOption(
'jobs',
abbr: 'j',
help: 'Run up to this many tasks at once. '
'1 keeps the current sequential behaviour; "auto" uses the core count.',
)
..addOption(
'gap',
help: 'Minimum gap between task starts (for example 15s or 2m).',
)
..addOption(
'on-error',
allowed: const ['continue', 'stop'],
help: 'Continue independent tasks or stop starting new ones.',
)
..addFlag(
'resume',
negatable: false,
help: 'Resume the last compatible run from its state file.',
)
..addFlag(
'retry-failed',
negatable: false,
help: 'Resume and run failed/interrupted jobs while skipping successes.',
)
..addOption(
'state-file',
defaultsTo: '.distribute/last-run.json',
help: 'Path used to persist resumable run state.',
)
..addFlag(
'force-resume',
negatable: false,
help: 'Resume even when config, operation, or Git revision changed.',
)
..addFlag(
'status',
negatable: false,
help: 'Print the saved run status without executing jobs.',
)
..addFlag(
'no-notify',
negatable: false,
defaultsTo: false,
help: 'Skip the notifications declared in the configuration.',
);