parser property

ArgParser parser
getter/setter pair

The argument parser for Android build arguments.

Defines the available options and flags for the Android build command.

Implementation

static ArgParser parser = ArgParser()
  ..addOption('target',
      abbr: 't',
      help:
          'The main entry-point file of the application, as run on the device.')
  ..addOption('binary-type',
      abbr: 'b', help: 'Binary type (apk, aab)', defaultsTo: 'apk')
  ..addFlag('split-per-abi',
      abbr: 's', help: 'Split APKs by ABI', defaultsTo: false)
  ..addFlag('generate-debug-symbols',
      abbr: 'g', help: 'Generate debug symbols', defaultsTo: true)
  ..addOption('build-mode',
      abbr: 'm',
      help: 'Build mode (debug, profile, release)',
      defaultsTo: 'release')
  ..addOption('flavor', abbr: 'f', help: 'Build flavor')
  ..addOption('arguments',
      abbr: 'a', help: 'Custom arguments to pass to the build command')
  ..addOption('dart-defines', abbr: 'd', help: 'Dart defines')
  ..addOption('build-name', abbr: 'n', help: 'Build name')
  ..addOption('build-number', abbr: 'N', help: 'Build number')
  ..addOption('output',
      abbr: 'o',
      help: 'Output path for the build',
      defaultsTo: Files.androidDistributionOutputDir.path)
  ..addOption('dart-defines-file', help: 'Dart defines file')
  ..addFlag('pub',
      abbr: 'p', help: 'Run pub get before building', defaultsTo: true)
  ..addFlag('config-only',
      help: 'Only generate the configuration file', defaultsTo: false)
  ..addFlag('track-widget-creation',
      help: 'Track widget creation', defaultsTo: false)
  ..addFlag('android-skip-build-dependency-validation',
      help: 'Skip build dependency validation', defaultsTo: false)
  ..addFlag('analyze-size', help: 'Analyze size', defaultsTo: false)
  ..addFlag('ignore-deprecation',
      help: 'Ignore deprecation warnings', defaultsTo: false)
  ..addFlag('obfuscate', help: 'Obfuscate the code', defaultsTo: false)
  ..addOption('target-platform',
      help: 'Target platform (android-arm, android-arm64, android-x64)')
  ..addOption('android-project-arg', help: 'Android project argument')
  ..addOption('code-size-directory', help: 'Code size directory')
  ..addOption('split-debug-info', help: 'Split debug info');