If the file path of your keystore file is defined in your
build.gradle file but the keystore file itself is missing from the location where the path points to, you can use one of our file downloading steps to download the keystore file from Bitrise and place 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
Code Signing tab:
File DownloaderStep: If you have uploaded your keystore file to the
ANDROID KEYSTORE FILEsection, which is the recommended place for your keystore file, this is the step you should use. Once the file is uploaded, Bitrise assigns an env var (
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 StorageStep: If you have uploaded your keystore file to the
GENERIC FILE STORAGEsection on the
Code Signingtab, this is the step you should use. Bitrise assigns an env var (
$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 env var in your
build.gradlefile, you can use a
ScriptStep to overwrite the env var’s value with the destination path defined in the
$GENERIC_FILE_STORAGEenv var. Make sure you use envman and not just a simple export.
- Add either the
File Downloaderor the
Generic File Storagestep to your workflow. The step should be added BEFORE the
- If you use the
File DownloaderStep, fill out the following 2 input fields:
Download source url: Set the generated keystore URL you get when you upload your file to the
ANDROID KEYSTORE FILEsection of the
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.gradlefile (for example,
- Add the
Gradle RunnerStep right after your file downloading step.
Note that 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
Sign APK Step to your workflow. Our
Gradle Runner Step will sign and assemble your project.