Skip to content

Continuous Integration

Leonard Ng'eno edited this page Dec 30, 2013 · 2 revisions

To support continuous integration, we use the Travis CI platform. The file .travis.yml contains the configurations that the Travis service requires to run a build. The before_install sections instructs the server to download the android skd and the build tools. It also needs to download gradle which is used in compiling the build.

The build.gradle file contains the configurations required by gradle to compile the source code as well as the unit tests. To run everything, just run 'gradle build' from the root folder of the project. To run the unit tests only, type 'gradle unitTest'. Follow these installation instructions to configure your local environment to use gradle.

The build.gradle file does not follow the structure described here (this is the structure to follow in setting up your project if using the Android Studio IDE). The robolectric unit tests are put in a sourceSet of its own and are run by the unitTest task. The dependencies section compiles all the libraries required by the src folder as well as those required by test folder. The beforeBuild task configures the AndroidManifest file so that it can work with the RobolectricTestRunner.