BuildCommand constructor
BuildCommand()
Implementation
BuildCommand() {
argParser
..addMultiOption(
'client',
abbr: 'c',
splitCommas: true,
help: 'Client(s) to build. Repeat or comma-separate for a batch: '
'--client apple,google',
)
..addFlag(
'all-clients',
negatable: false,
help: 'Build every client in the clients/ directory.',
)
..addMultiOption(
'platform',
abbr: 'p',
splitCommas: true,
defaultsTo: ['android'],
allowed: ['android', 'ios'],
help: 'Target platform(s): --platform android,ios',
)
..addMultiOption(
'type',
abbr: 't',
splitCommas: true,
defaultsTo: ['aab'],
allowed: ['aab', 'apk'],
help: 'Android build type(s): --type aab,apk '
'(iOS always builds an IPA).',
)
..addMultiOption(
'build-version',
splitCommas: true,
valueHelp: '[client=]x.y.z[+n]',
help: 'Version to build, without editing pubspec.yaml. One value for '
'every client (1.4.0+12), or per client (acme=1.4.0+12,beta=2.0.0). '
'Without +n the pubspec build number is kept.',
)
..addOption(
'parallel',
abbr: 'j',
defaultsTo: 'auto',
valueHelp: 'auto|N',
help: 'How many builds run at the same time. "auto" picks 1-4 from '
'your RAM and CPU cores; 1 builds one after another.',
)
..addFlag(
'test',
negatable: false,
help: 'Build using the test environment (.env_test).',
)
..addFlag(
'fail-fast',
negatable: false,
help:
'Stop at the first failed build instead of continuing with the rest.',
)
..addFlag(
'slack',
negatable: false,
help: 'Send Slack notifications during build process.',
)
..addOption(
'slack-channel',
help:
'Slack channel for notifications (e.g., #builds, @username). Defaults to #builds',
defaultsTo: '#builds',
)
..addOption(
'progress-file',
valueHelp: 'path',
help: 'Keep a JSON progress snapshot (percent, ETA, per-build state) '
'in this file while building. Used by the IDE extensions.',
)
// Internal: used by parallel builds to run one job in a worker process.
..addOption('result-file', hide: true)
..addFlag('no-history', negatable: false, hide: true);
}