Getting started with Android and CircleCI

Continuous Integration provides many benefits to the software development process. Did I break the build? How many of our tests pass on the latest version? How can we distribute the latest version of our app to our testers smoothly? Continuous Integration can help answer all of these questions.

For those that have been around for a while, there have been many CI tools (CruiseControl) along the road to CircleCI and many are still relevant (Jenkins).

Yesterday, I started looking at CircleCI in depth after watching Donn Felker’s excellent video on Caster.io and here are a few simple steps to get started with CircleCI and Android.

To start, sign up for a CircleCI account here and sync your Github repositories.

Add a project that you would like to add to CircleCI. CircleCI will try to build your project automatically, but to maintain better control over your CI process you should use a circle.yml file. This file should be placed in the base directory of your project.

A sample circle.yml can be found below. Change the words CriminalIntent to the name of your project and make sure that the build-tools version in the circle.yml matches the build tools version in your build.gradle file for your app module.

https://gist.github.com/dazza5000/0a807de012c7281f14787cf30bf7be0e

Check in the circle.yml file and push it to GitHub.

CircleCI should now automatically build your project!

Screen Shot 2016-05-01 at 6.23.56 PMTo see what a passing build looks like you can check here:

https://circleci.com/gh/dazza5000/CriminalIntent

Full source for the project including the circle.yml file and build.gradle can be found here:

https://github.com/dazza5000/CriminalIntent

 

giphy