Set File Downloader destiny as an environment variable


Hi, y’all. My doubt is related to the Android build.

I’ve been following this guide here, regarding how to call a .jks keystore file from build.gradle.

In the example, this .jks file will be downloaded to “$HOME/keystores/my_keystore.jks” when the File Downloader step is used. Then, in my build.gradle file, I can access it with System.getenv("HOME") + "/keystores/my_keystore.jks")

My question is: Is it possible to set “$HOME/keystores/my_keystore.jks” as a single new environment variable, like $MY_KEYSTORE_PATH? And call it in the build.gradle? I’ve been trying it, but with no success :confused:

What I’m trying to do is someting like this:

File Downloader step:

Then, in the Bitrise Env Vars tab:

$MY_KEYSTORE_PATH <= $HOME/keystores/my_keystore.jks

Finally, in my build.gradle, call it by System.getenv("MY_KEYSTORE_PATH").

Considering Fastlane, I have a very similar problem also with my .json Play Store API, which I reference in Appfile, with json_key_file(ENV["MY_JSON_FILE"]). In the Env vars tab, I also have:

MY_JSON_FILE <= $HOME/keystores/my_json_file.json

but is not working.




Do you have Replace variables in inputs? switch enabled for that variable? It is disabled by default.



Hi, @koral. Thank you. You are correct, it worked!


closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.