Abstract

You can define the location of the keystore file of an Android app in your build.gradle file. If the keystore file itself is missing from the location, you can use one of our file downloading Steps to download the keystore file from Bitrise and put it in the defined location.

A keystore file is required for Android code signing. You can define the location of the keystore file of an Android app in your build.gradle file. If the keystore file itself is missing from the location, you can use one of our file downloading Steps to download the keystore file from Bitrise and put it in the defined location.

Bitrise has two Steps which download files from the Code Signing tab. Which one to use in your workflow depends on where you uploaded your keystore file in the Code Signing tab:

• File Downloader Step: If you have uploaded your keystore file to the ANDROID KEYSTORE FILE section, which is the recommended place for your keystore file, this is the Step you should use. Once the file is uploaded, Bitrise assigns an Environment Variable (BITRISEIO_ANDROID_KEYSTORE_URL) to the download URL (which is a time-limited, read-only download URL) of the file as the value.

• Generic File Storage Step: If you have uploaded your keystore file to the GENERIC FILE STORAGE section on the Code Signing tab, this is the Step you should use. Bitrise assigns an Environment Variable ($GENERIC_FILE_STORAGE) to the download URL (which is a time-limited, read-only download URL) of the file as the value. If you use an Environment Variable in your build.gradle file, you can use a Script Step to overwrite the Environment Variable’s value with the destination path defined in the $GENERIC_FILE_STORAGE Environment Variable. Make sure you use envman and not just a simple export.

• Download destination path: Set the location of the keystore file as a relative path. This path should be the same as the keystore path already defined in your build.gradle file (for example, \$HOME/keystores/project_release.keystore).
With that said, if you have successfully added the Steps to download your keystore file to the same location that you specified in your build.gradle file, you do not need the Android Sign Step in your workflow. Our Gradle Runner Step will sign and assemble your project.