Compartir a través de


AndroidSigning@1 - Android Signing v1 task

Use this task in a pipeline to sign and align Android APK files.

Inputs

files - APK Files
string. Required.

The relative path from the repo root to the APK(s) you want to sign. You can use wildcards to specify multiple files. For example:

  • outputs\apk*.apk to sign all .APK files in the outputs\apk\ subfolder.
  • **/bin/*.apk to sign all .APK files in all bin subfolders.

The default value: /.apk Argument aliases: apkFiles


jarsign - Sign the APK
boolean. Default value: true.

Signs the APK with a provided Android Keystore file. Unsigned APKs can only run in an emulator. APKs must be signed to run on a device.


keystoreFile - Keystore File
string. Required when jarsign = true.

The file path to the Android Keystore file that is used to sign the APK. This file must be uploaded to the secure files library, where it is securely stored with encryption. The Android Keystore file is removed from the agent machine when the pipeline completes.

The file can either be checked into source control or placed on the build machine directly by an administrator. It is recommended to encrypt the keystore file in source control and use the Decrypt File task to decrypt the file during the build.

Argument aliases: apksignerKeystoreFile


keystorePass - Keystore Password
string. Optional. Use when jarsign = true.

The key password for the provided Android Keystore file.

Important

Use a new variable with its lock enabled on the Variables pane to encrypt this value. See secret variables.

Argument aliases: apksignerKeystorePassword


keystoreAlias - Alias
string. Optional. Use when jarsign = true.

The alias that identifies the public/private key pair to be used in the Android Keystore file.

Argument aliases: apksignerKeystoreAlias


keyPass - Key Password
string. Optional. Use when jarsign = true.

The key password for the alias and Android Keystore file.

Important

Use a new variable with its lock enabled on the Variables pane to encrypt this value. See secret variables.


jarsignerArguments - Jarsigner Arguments
string. Optional. Use when jarsign = true. Default value: -verbose -sigalg MD5withRSA -digestalg SHA1.

Provides options to pass to the jarsigner command line.


zipalign - Zipalign
boolean. Default value: true.

Select this boolean if you want to zipalign your package. This reduces the amount of RAM consumed by an app.


zipalignLocation - Zipalign Location
string. Optional. Use when zipalign = true.

Specifies the location of the zipalign executable used during signing. This defaults to the zipalign found in the Android SDK version folder that your application builds against.

Argument aliases: zipalignFile


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Requirements

Requirement Description
Pipeline types YAML, Classic build
Runs on All
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: JDK, AndroidSDK
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.98.1 or greater
Task category Build