Android: Easy (and free) continuous integration with Travis-CI

Posted on Jan 13, 2016

Ever seen those fancy green icons on Github, saying things like “Build Passing”? That’s a service like Travis-CI stating that the current project branch builds.

In this article I will explain you how to integrate it with your Android projects, with some improvements I’ve had to face.

This service is free for open source projects, and so easy to use that you will wonder why didn’t you use it before.

The first step is to register in Travis-CI, and you can do that with your Github account.

Once you have selected the project you want, you need to add the .travis.yml file to your code.

Adding the configuration file

The following Gist shows the .travis.yml file from my example project:

As you can see, my file is a bit different to what Android tutorial explains.

Push it!

The last step is just pushing your changes with the new configuration file. Travis-CI will start building immediately and will present you with your results.

If you want to add the “Build Passing” icon, just copy the image location on your project page into your README.md file.

![Travis-ci](https://api.travis-ci.org/youruser/yourproject.svg)
Share Tweet