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
-
- Object
- JobArguments
- BuildArguments
- Implementers
Constructors
-
BuildArguments.new(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.
final
- buildNumber → String?
-
Version code/build number for the application.
final
- buildSourceDir → String
-
Source directory where build artifacts are initially created.
final
-
customArgs
→ List<
String> ? -
Additional custom arguments for the Flutter build command.
final
- 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
- target → String?
-
Target Dart file to build from.
final
- variables → Variables
-
Variable processor for substituting placeholders in arguments.
finalinherited
Methods
-
build(
) → Future< int> - Executes the complete build process.
-
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 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