Bitrise is a Continuous Integration and Delivery (CI/CD) Platform as a Service (PaaS) with a main focus on mobile app development (iOS, Android, React Native, Flutter, and so on). It’s a collection of tools and services that we’ll be using during the following lines to automate an Android App delivery.
The YouTube Channels in both English (En) and French (Fr) are now accessible, feel free to subscribe by clicking here.
Why use Bitrise?
Using a CI/CD platform like Bitrise for your Android app development has many benefits:
- Efficiency: Bitrise automates many manual steps in the development, testing, and deployment process, saving you time and effort.
- Faster Feedback: With Bitrise, you get feedback on your app’s performance and functionality much faster than manual testing, so you can address issues as they arise.
- Consistency: Bitrise ensures that all your builds are consistent, regardless of who runs them. This reduces the chances of introducing errors or inconsistencies in your app.
- Integration: Bitrise integrates with other development tools like GitHub, Jira, and Slack, making it easier to incorporate them into your existing workflow.
- Scalability: It can scale to accommodate projects of any size, from small apps to enterprise-level applications.
Overall, using Bitrise can help you streamline your Android app development process, improve the quality of your app, and stay ahead of the competition.
Setting Up a Bitrise Account
You can create a Bitrise account by visiting the Bitrise Sign-up page here. You can sign up using your Google or GitHub account or create a new Bitrise account using your email address. Signing up with either of the Git service providers means you connect your Bitrise account to your account on that service provider. With a connected account, you can grant Bitrise access to any of your repositories on that account.
Connecting Git Accounts to Bitrise
After signing up, you can connect your Bitrise account to all three supported Git service providers. For example, after you sign up with GitHub, you can connect your Bitrise account to both your GitLab and Bitbucket accounts and access any repositories you have on those accounts. To connect an account:
- Go to the Bitrise Profile page by clicking in the top-right corner.
- Click on the Settings icon to go to the profile page.
- Click on the toggle switch to connect the desired Git account.
Adding an Android App to Bitrise
1. Go to your Bitrise Dashboard.
2. Click the + sign on the top menu bar and select Add New App on the web UI, which takes you to the Create New App page.
3. Select Workspace, set the privacy of the app to either Private or Public, and click Next.
4. Choose Git Provider and select your repository from the popup list.
5. When prompted to set up repository access, click No for auto-add SSH key or manually copy the provided SSH key to Git Provider settings.
6. Select your main branch from the dropdown and choose Yes, auto-detect configuration. Bitrise will now start validating your project to detect it as an Android Project.
7. The Bitrise Scanner selects the main module of your project by default. If there are more modules to choose from in the Module list, select a module that works best for your project.
8. Select a variant for building (you can Select All Variants which will generate all variants in Artifacts) and select a variant for testing too. You can find the list of your build variants from Android Studio.
9. Click Register a Webhook for me when prompted so that Bitrise can start a build automatically when code is pushed to your repository. Skip this part if you want to manually trigger builds.
Congratulations! Bitrise will kick off your first test build now!
Signing Up your Android App
Now that you have successfully built your Android project, it’s time to sign your app for production release.
Add Code Signing Files
1. Generate a keystore file or use an existing one if you have one already.
2. Go to your Bitrise Dashboard and select your Android app.
3. Click on Edit workflow.
4. Go to the Code Signing & Files tab, drag and drop your keystore file to the ANDROID KEYSTORE FILE field.
5. Fill out the Keystore password, Keystore alias, and Private key password fields and click Save metadata.
Add Android Build and Sign steps
1. Go to the Workflows tab and choose a workflow from the dropdown.
2. Add Android Build step after Android Unit Tests OR Save Gradle Cache. Just make sure it is before the Android Sign and Deploy steps.
3. Select the Android Build step and Fill out the Input Variables section if the values are missing.
4. Add Android Sign step after Android Build. There is no need to change any input variables. Just make sure the Keystore file configuration is correct.
Your workflow steps order should now look like the figure below. Hit Run Workflow. Once the build finishes, you have now successfully Signed your Android app using Bitrise.
Access App Files and Test Reports
After the build finishes, Bitrise will produce artifacts: for example, test reports, images, and executable app binaries. To check out the artifacts generated during a build:
1. Go to your app page from the Bitrise Dashboard.
2. Click on the latest Build from the list.
3. Switch to Artifacts tab to access APK/AAB files.
We have just started our journey to build a network of professionals to grow even more our free knowledge-sharing community that will give you a chance to learn interesting things about topics like cloud computing, software development, and software architectures while keeping the door open to more opportunities.
Does this speak to you? If YES, feel free to Join our Discord Server to stay in touch with the community and be part of independently organized events.
In conclusion, using Bitrise for your Mobile apps can significantly improve the efficiency and quality of your app development process. With Bitrise, you can automate many of the manual steps involved in building, testing, and deploying your app, saving you time and effort while ensuring consistent, high-quality results. Whether you’re a solo developer or part of a larger team, Bitrise can help you streamline your Android app development process, reduce errors, and bring your app to market faster.