다음을 통해 공유


Android signing task

TFS 2017 | TFS 2015

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

Demands

The build agent must have the following capabilities:

  • Java JDK

Arguments

Argument Description
files
APK files

(Required) 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

Default value: **/*.apk
Argument aliases: apkFiles

Signing options

Argument Description
apksign
Sign the APK
(Optional) Select this option to sign 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.
Default value: true
keystoreFile
Keystore file
(Required) Select or enter the file name of the Android Keystore file that should be 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 will be used to sign the APK, but will be removed from the agent machine when the pipeline completes.
Argument aliases: apksignerKeystoreFile
keystorePass
Keystore password

(Optional) Enter the 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
(Optional) Enter the alias that identifies the public/private key pair to be used in the keystore file.
Argument aliases: apksignerKeystoreAlias
keyPass
Key password
(Optional) Enter 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.

Argument aliases: apksignerKeyPassword
apksignerArguments
apksigner arguments

(Optional) Provide any options to pass to the apksigner command line. Default is: --verbose.

See the apksigner documentation.


Default value: --verbose
apksignerLocation
apksigner location

(Optional) Optionally specify the location of the apksigner executable used during signing. This defaults to the apksigner found in the Android SDK version folder that your application builds against.


Argument aliases: apksignerFile

Zipalign options

Argument Description
zipalign
Zipalign

(Optional) Select if you want to zipalign your package. This reduces the amount of RAM consumed by an app.


Default value: true
zipalignLocation
Zipalign location

(Optional) Optionally specify 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

Android build