Arguments class

Comprehensive Android build arguments configuration.

Extends the base BuildArguments class with Android-specific build options including APK/AAB generation, ABI splitting, debug symbols, obfuscation, and various optimization settings.

Key Android features:

  • APK and Android App Bundle (AAB) generation
  • ABI-specific APK splitting for reduced download sizes
  • Debug symbol generation for crash analysis
  • Code obfuscation for release builds
  • Build dependency validation controls
  • Size analysis and widget tracking options

Example usage:

final args = Arguments(
  variables,
  binaryType: 'apk',
  buildMode: 'release',
  splitPerAbi: true,
  obfuscate: true,
  generateDebugSymbols: true,
);
Inheritance

Constructors

Arguments.new(Variables variables, {String? buildMode = 'release', required String binaryType, String? target, String? flavor, String? dartDefines, String? dartDefinesFile, List<String>? customArgs, String? buildName, String? buildNumber, bool pub = true, String? output, bool splitPerAbi = false, bool generateDebugSymbols = true, bool? configOnly, bool? trackWidgetCreation, bool? androidSkipBuildDependencyValidation, bool? analyzeSize, bool? ignoreDeprecation, bool? obfuscate, String? targetPlatform, String? androidProjectArg, String? codeSizeDirectory, String? splitDebugInfo})
Creates a new Android build arguments instance.
Arguments.defaultConfigs(ArgResults? globalResults)
Returns the default configuration for Android builds.
factory
Arguments.fromArgResults(ArgResults results, ArgResults? globalResults)
Creates an instance of Arguments from parsed command-line arguments.
factory
Arguments.fromJson(Map<String, dynamic> json, {required Variables variables})
Creates an instance of Arguments from a JSON object.
factory

Properties

analyzeSize bool?
Enables size analysis of the built application.
final
androidProjectArg String?
Additional arguments to pass to the Android project build.
final
androidSkipBuildDependencyValidation bool?
Skips Android build dependency validation.
final
argumentBuilder List<String>
Builds the command-line arguments list for the Android build process.
getter/setter pairinherited-setteroverride-getter
arguments Future<List<String>>
Processes variables in arguments and returns the final command-line arguments.
no setterinherited
binaryType String
Type of binary to build (e.g., 'apk', 'aab', 'ipa').
finalinherited
buildMode String?
Build mode for the application.
finalinherited
buildName String?
Version name for the application build.
finalinherited
buildNumber String?
Version code/build number for the application.
finalinherited
buildSourceDir String
Source directory where build artifacts are initially created.
finalinherited
codeSizeDirectory String?
Directory path for storing code size analysis output.
final
configOnly bool?
Whether to only generate build configuration without building.
final
customArgs List<String>?
Additional custom arguments for the Flutter build command.
finalinherited
dartDefines String?
Dart compilation defines as a single string.
finalinherited
dartDefinesFile String?
Path to a file containing Dart compilation defines.
finalinherited
flavor String?
Build flavor for multi-flavor applications.
finalinherited
generateDebugSymbols bool
Controls debug symbol generation for crash reporting and debugging.
final
hashCode int
The hash code for this object.
no setterinherited
ignoreDeprecation bool?
Ignores deprecation warnings during build.
final
logger ColorizeLogger
Logger instance for outputting colored messages.
getter/setter pairinherited
obfuscate bool?
Enables code obfuscation for release builds.
final
output String?
Custom output path for the build artifacts.
getter/setter pairinherited
parent BuilderJob
Reference to the parent builder job.
getter/setter pairinherited
pub bool
Whether to run flutter pub get before building.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splitDebugInfo String?
Path for split debug information storage.
final
splitPerAbi bool
Enables APK splitting by Application Binary Interface (ABI).
final
target String?
Target Dart file to build from.
finalinherited
targetPlatform String?
Specifies the target platform architecture.
final
trackWidgetCreation bool?
Controls widget creation tracking for debugging.
final
variables Variables
Variable processor for substituting placeholders in arguments.
finalinherited

Methods

build() Future<int>
Executes the complete build process.
inherited
copyWith(Arguments? data) BuildArguments
Creates a copy of this Android arguments instance with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printJob() Future
Prints job configuration information to the console.
inherited
toJson() Map<String, dynamic>
Converts this Arguments instance to a JSON object.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

parser ↔ ArgParser
The argument parser for Android build arguments.
getter/setter pair