I have configured a build for an Android project in Bitrise. Now I need to setup automatic deployment for beta testing in Fabric/Crashlytics, just don´t know how to add a step to accomplish that. Any ideas?
The same way you would on your Mac/PC.
You have to configure your project for Fabric/Crashlytics, following their official guides. At the end of the setup (current guide link: https://fabric.io/kits/android/crashlytics/install) you'll have Fabric/Crashlytics integrated into your Gradle project.
After the setup, to deploy to Fabric/Crashlytics, just run any of the Gradle tasks which invoke the Fabric/Crashlytics deploy.
On bitrise.io / with bitrise CLI you can run the Gradle task e.g. with the Gradle Runner
step (or with a Script step).
Thanks to @Viktor's answer I managed to figure out the exact steps to autmatically upload the apk to Crashlytics-Beta from Bitrise. Here are the details.
- Click your build definition, then Workflows tab and finally Manage Workflows button.
- Add a new environment variable, for that click the green "Manage env. vars" button, add a new environment variable named "GRADLE_TASK_RELEASE" or whatever name suits you, then set its value to "assembleRelease crashlyticsUploadDistributionRelease" and close the environment variables window.
- Select the Gradle Runner step to edit it. Inside the section "Gradle task to run", change the value and put the recently created variable "$GRADLE_TASK_RELEASE", save the changes and you will be good to go.
At the end of the step in the log something like the following:
Uploading /bitrise/src/YOUR_PROJECT/build/outputs/apk/YOUR_PROJECT-release.apk to Crashlytics...
Just add assembleRelease crashlyticsUploadDistributionRelease
to your gradle task.
© 2022 - 2024 — McMap. All rights reserved.