ReleaseApkCommand class
Command for releasing Android APK files through Shorebird.
This command creates a Shorebird release for Android APK artifacts, allowing for over-the-air updates to be deployed to APK-based Android applications.
Usage
morpheme shorebird release apk --flavor dev
morpheme shorebird release apk --flavor prod --build-number 123
Options
All standard Shorebird options are supported:
--flavor: The build flavor (dev, staging, prod)--target: The main entry point file--morpheme-yaml: Path to morpheme.yaml configuration--build-number: Build number for versioning--build-name: Build name for versioning--obfuscate: Enable code obfuscation--split-debug-info: Path for split debug information--generate-l10n: Generate localization files
Examples
Basic APK release:
morpheme shorebird release apk
Production APK release with versioning:
morpheme shorebird release apk --flavor prod --build-number 42 --build-name 1.2.0
APK release with obfuscation:
morpheme shorebird release apk --flavor prod --obfuscate
- Inheritance
-
- Object
- Command
- ShorebirdBaseCommand
- ShorebirdReleaseBaseCommand
- ReleaseApkCommand
Constructors
Properties
-
aliases
→ List<
String> -
Alternate names for this command.
no setterinherited
- argParser → ArgParser
-
The argument parser for this command.
no setterinherited
- argResults → ArgResults?
-
The parsed argument results for this command.
no setterinherited
- artifactType → String
-
The artifact type for this release command (apk, aab, ios, ipa).
no setteroverride
- category → String
-
The command's category.
no setterinherited
- description → String
-
A description of this command, included in usage.
no setteroverride
- globalResults → ArgResults?
-
The parsed global argument results.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether or not this command should be hidden from help listings.
no setterinherited
- invocation → String
-
A single-line template for how to invoke this command (e.g.
"pub getpackage").no setterinherited - isAndroid → bool
-
Whether this is an Android release command.
no setterinherited
- isIos → bool
-
Whether this is an iOS release command.
no setterinherited
- name → String
-
The name of this command.
no setteroverride
- parent → Command?
-
The command's parent command, if this is a subcommand.
no setterinherited
- runner → CommandRunner?
-
The command runner for this command.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subcommands
→ Map<
String, Command> -
An unmodifiable view of all sublevel commands of this command.
no setterinherited
-
suggestionAliases
→ List<
String> -
Alternate non-functional names for this command.
no setterinherited
- summary → String
-
A short description of this command, included in parent's
CommandRunner.usage.
no setterinherited
- takesArguments → bool
-
Whether or not this command takes positional arguments in addition to
options.
no setterinherited
- usage → String
-
Generates a string displaying usage information for this command.
no setterinherited
-
An optional footer for usage.
no setterinherited
Methods
-
addPlatformSpecificOptions(
ArgParser argParser) → void -
Adds platform-specific options.
inherited
-
addStandardOptions(
ArgParser argParser) → void -
Adds standard options that are common to all Shorebird commands.
inherited
-
addSubcommand(
Command command) → void -
Adds Command as a subcommand of this.
inherited
-
buildDartDefines(
Map< String, String> flavorConfig) → List<String> -
Builds dart defines list from flavor configuration.
inherited
-
buildEnvironmentVariables(
Map< String, String> flavorConfig) → Map<String, String> -
Builds environment variables map for command execution.
inherited
-
executeCommand(
ShorebirdCommandConfig config) → Future< ShorebirdResult> -
Executes the actual Shorebird command.
inherited
-
extractCommonArguments(
) → Map< String, dynamic> -
Extracts common arguments from command line results.
inherited
-
handleError(
dynamic error, Duration duration) → void -
Handles command execution errors.
inherited
-
handleSuccess(
ShorebirdResult result, Duration duration) → void -
Handles successful command execution.
inherited
-
logCommand(
String command) → void -
Logs the command that is about to be executed.
inherited
-
logCommandComplete(
String commandName, Duration duration) → void -
Logs the completion of a command execution.
inherited
-
logCommandStart(
String commandName, String flavor) → void -
Logs the start of a command execution.
inherited
-
logDebug(
String message) → void -
Logs debug information (only when debug mode is enabled).
inherited
-
logError(
String message) → void -
Logs an error message.
inherited
-
logInfo(
String message, {String prefix = 'Info'}) → void -
Logs an informational message.
inherited
-
logSetup(
String component) → void -
Logs a setup step.
inherited
-
logStep(
String step) → void -
Logs a step in the execution process.
inherited
-
logSuccess(
String message) → void -
Logs a success message.
inherited
-
logValidation(
String item) → void -
Logs a validation step.
inherited
-
logWarning(
String message) → void -
Logs a warning message.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postExecutionCleanup(
ShorebirdResult result) → Future< void> -
Performs post-execution cleanup tasks.
inherited
-
preExecutionSetup(
ShorebirdCommandConfig config) → Future< void> -
Performs pre-execution setup tasks.
inherited
-
printUsage(
) → void -
Prints the usage information for this command.
inherited
-
run(
) → Future< void> -
Template method defining the command execution workflow.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
usageException(
String message) → Never -
Throws a UsageException with
message.inherited -
validateAndBuildConfig(
) → Future< ShorebirdCommandConfig> -
Validates command arguments and builds the command configuration.
inherited
-
validateAndGetFlavor(
ArgResults? argResults, {String defaultTo = Constants.dev}) → String -
Validates and extracts the flavor value from command arguments.
inherited
-
validateAndGetFlavorConfig(
String flavor, String morphemeYamlPath) → Map< String, String> -
Validates that a flavor exists in the configuration.
inherited
-
validateBuildNumber(
String? buildNumber) → void -
Validates build number format.
inherited
-
validateExportMethod(
String? exportMethod) → void -
Validates export method for iOS builds.
inherited
-
validateExportOptionsPlist(
String? exportOptionsPlist) → void -
Validates that export options plist file exists (if specified).
inherited
-
validateMorphemeYaml(
String morphemeYamlPath) → void -
Validates the morpheme.yaml configuration file.
inherited
-
validateRequiredArguments(
ArgResults? argResults) → bool -
Validates that all required arguments are present and valid.
inherited
-
validateShorebirdConfig(
String flavor, String morphemeYamlPath) → (String?, Map?) -
Validates that Shorebird configuration exists for the flavor.
inherited
-
validateTarget(
String target) → void -
Validates that a target file exists and is accessible.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited