BuildArguments class abstract

Abstract base class for Flutter application build arguments.

Provides common functionality and configuration for building Flutter applications across different platforms. This class extends JobArguments to inherit variable processing and logging capabilities.

Key responsibilities:

  • Managing build configuration parameters
  • Generating Flutter CLI command arguments
  • Orchestrating the build process
  • Handling output file management
  • Supporting debug symbol generation

Platform-specific implementations should extend this class to provide additional platform-specific functionality and validation.

Inheritance
Implementers

Constructors

BuildArguments(Variables variables, {String? buildMode = 'release', String? output, String? target, required String binaryType, required String buildSourceDir, String? flavor, String? dartDefines, String? dartDefinesFile, List<String>? customArgs, String? buildName, String? buildNumber, bool pub = true})
Creates a new BuildArguments instance.

Properties

argumentBuilder ↔ List<String>
Generates the command-line arguments for the Flutter build command.
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').
final
buildMode → String?
Build mode for the application.
final
buildName ↔ String?
Version name for the application build.
getter/setter pair
buildNumber ↔ String?
Version code/build number for the application.
getter/setter pair
buildSourceDir → String
Source directory where build artifacts are initially created.
final
customArgs → List<String>?
Additional custom arguments for the Flutter build command.
final
dartDefineArguments → List<String>
Expands dartDefines into the --dart-define flags the Flutter CLI expects.
no setter
dartDefines → String?
Dart compilation defines as a single string.
final
dartDefinesFile → String?
Path to a file containing Dart compilation defines.
final
flavor → String?
Build flavor for multi-flavor applications.
final
hashCode → int
The hash code for this object.
no setterinherited
logger ↔ ColorizeLogger
Logger instance for outputting colored messages.
getter/setter pairinherited
output ↔ String?
Custom output path for the build artifacts.
getter/setter pair
parent ↔ BuilderJob
Reference to the parent builder job.
getter/setter pair
pub → bool
Whether to run flutter pub get before building.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secretKeys → Set<String>
Configuration keys whose values must never be printed or logged.
no setterinherited
target → String?
Target Dart file to build from.
final
variables → Variables
Variable processor for substituting placeholders in arguments.
finalinherited

Methods

build() → Future<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printJob() → Future
Prints the resolved configuration of a job.
inherited
registerSecrets() → Future<void>
Resolves every secret value and registers it with the logger.
inherited
toJson() → Map<String, dynamic>
Converts the job arguments to a JSON representation.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

findNativeSymbolsDirectory({required String mode, String? flavor, Directory? root}) → Directory?
Locates the merged native libraries directory produced by Gradle.