- Using ENV vars
Inside your ~/.zshrc or ~/.bashrc file
Note: For CI, declare key-value pair under secrets section
export KEYSTORE_FILE_PATH = "/Users/your_user/App_Directory/keystore_file.keystore"
export KEYSTORE_PASSWORD = "********"
export KEY_ALIAS = "key_alias"
export KEY_PASSWORD = "************"
Inside build.gradle file
signingConfigs {
release {
storeFile file(String.valueOf(System.getenv("KEYSTORE_FILE_PATH")))
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
}