AndroidSigning@2 - Android Signing v2 task

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

Inputs

apkFiles - APK files
Input alias: files. string. Required. Default value: **/*.apk.

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.

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

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


jarsignerKeystoreFile - Keystore file
Input alias: keystoreFile. 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.


jarsignerKeystorePassword - Keystore password
Input alias: keystorePass. string. Optional. Use when jarsign = true.

The password for the provided Android Keystore file.

Important

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


jarsignerKeystoreAlias - Alias
Input alias: keystoreAlias. string. Optional. Use when jarsign = true.

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


jarsignerKeyPassword - Key password
Input alias: keyPass. 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 tab 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.


zipalignFile - Zipalign location
Input alias: zipalignLocation. 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.


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 Agent, DeploymentGroup
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 2.116.0 or greater
Task category Build