FlutterBuildAppBundleSettings Class


Settings for flutter build apk. Build an Android APK file from your app..
Base Types
graph BT Type-->Base0["AutoToolSettings"] click Base0 "/api/Cake.Flutter/AutoToolSettings" Base0-->Base1["ToolSettings"] Type["FlutterBuildAppBundleSettings"] class Type type-node


public sealed class FlutterBuildAppBundleSettings : AutoToolSettings


Type Description



Name Value Summary
AnalyzeSize Nullable<bool>
--[no-]analyze-size Whether to produce additional profile information for artifact output size. This flag is only supported on "--release" builds.When building for Android, a single ABI must be specified at a time with the "--target-platform" flag.When building for iOS, only the symbols from the arm64 architecture are used to analyze code size. By default, the intermediate output files will be placed in a transient directory in the build directory.This can be overridden with the "--code-size-directory" option. This flag cannot be combined with "--split-debug-info".
AndroidProjectArg string
-P, --android-project-arg Additional arguments specified as key=value that are passed directly to the gradle project via the -P flag.These can be accessed in build.gradle via the "project.property" API.
BuildName string
--build-name=<x.y.z> A "x.y.z" string used as the version number shown to users. For each new version of your app, you will provide a version number to differentiate it from previous versions. On Android it is used as 'versionName'. On Xcode builds it is used as 'CFBundleShortVersionString'
BuildNumber Nullable<int>
--build-number=<int> An integer used as an internal version number. Each build must have a unique number to differentiate it from previous builds. It is used to determine whether one build is more recent than another, with higher numbers indicating more recent build. On Android it is used as 'versionCode'. On Xcode builds it is used as 'CFBundleVersion'
CodeSizeDirectory DirectoryPath
--code-size-directory The location to write code size analysis files. If this is not specified, files are written to a temporary directory under the build directory.
DartDefine string
--dart-define=<foo=bar> Additional key-value pairs that will be available as constants from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, and double.fromEnvironment constructors. Multiple defines can be passed by repeating "--dart-define" multiple times.
Debug Nullable<bool>
--debug Build a debug version of your app.
DeferredComponents Nullable<bool>
--[no-]deferred-components Setting to false disables building with deferred components. All deferred code will be compiled into the base app, and assets act as if they were defined under the regular assets section in pubspec.yaml.This flag has no effect on non-deferred components apps. (defaults to on)
DeviceId string
Target device id or name (prefixes allowed).
Inherited from AutoToolSettings
Flavor string
--flavor Build a custom app flavor as defined by platform-specific build setup. Supports the use of product flavors in Android Gradle scripts. Supports the use of custom Xcode schemes.
Help Nullable<bool>
-h, --help Print this usage information.
NullAssertions Nullable<bool>
--[no-]null-assertions Perform additional null assertions on the boundaries of migrated and un-migrated code. This setting is not currently supported on desktop devices.
Obfuscate Nullable<bool>
--[no-]obfuscate In a release build, this flag removes identifiers and replaces them with randomized values for the purposes of source code obfuscation.This flag must always be combined with "--split-debug-info" option, the mapping between the values and the original identifiers is stored in the symbol map created in the specified directory.For an app built with this flag, the "flutter symbolize" command with the right program symbol file is required to obtain a human readable stack trace. Because all identifiers are renamed, methods like Object.runtimeType, Type.toString, Enum.toString, Stacktrace.toString, Symbol.toString(for constant symbols or those generated by runtime system) will return obfuscated results.Any code or tests that rely on exact names will break.
Packages FilePath
Path to your ".packages" file. (required, since the current directory does not contain a ".packages" file)
Inherited from AutoToolSettings
Profile Nullable<bool>
--profile Build a version of your app specialized for performance profiling.
Pub Nullable<bool>
--[no-]pub Whether to run "flutter packages get" before executing this command. (defaults to on)
Release Nullable<bool>
--release Build a release version of your app (default mode).
SplitDebugInfo DirectoryPath
--split-debug-info= In a release build, this flag reduces application size by storing Dart program symbols in a file on the host rather than in the application.The value of the flag should be a directory where program symbol files can be stored for later use. These symbol files contain the information needed to symbolize Dart stack traces. For an app built with this flag, the "flutter symbolize" command with the right program symbol file is required to obtain a human readable stack trace. This flag cannot be combined with "--analyze-size".
SuppressAnalytics Nullable<bool>
Suppress analytics reporting when this command runs.
Inherited from AutoToolSettings
Target FilePath
-t, --target=<path> The main entry-point file of the application, as run on the device. If the --target option is omitted, but a file name is provided on the command line, then that is used instead. (defaults to "lib/main.dart")
TargetPlatform Nullable<TargetPlatform>
--target-platform [android-arm (default), android-arm64]
TrackWidgetCreation Nullable<bool>
--[no-]track-widget-creation Track widget creation locations. This enables features such as the widget inspector. This parameter is only functional in debug mode(i.e.when compiling JIT, not AOT). (defaults to on)
ValidateDeferredComponents Nullable<bool>
--[no-]validate-deferred-components When enabled, deferred component apps will fail to build if setup problems are detected that would prevent deferred components from functioning properly.The tooling also provides guidance on how to set up the project files to pass this verification.Disabling setup verification will always attempt to fully build the app regardless of any problems detected. Builds that are part of CI testing and advanced users with custom deferred components implementations should disable setup verification.This flag has no effect on non-deferred components apps. (defaults to on)

Extension Methods

Name Value Summary
Dump<FlutterBuildAppBundleSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<FlutterBuildAppBundleSettings>(FlutterBuildAppBundleSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<FlutterBuildAppBundleSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<FlutterBuildAppBundleSettings>(string) void
Requires the Cake.Issues addin
ThrowIfNull<FlutterBuildAppBundleSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<FlutterBuildAppBundleSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin