Showing posts from September, 2016

Tips those may help your Android project from failing test on CircleCI

As you may notice, in my previous blog entry, I mentioned CircleCI, one of many continuous integration services allowing your projects be built and tested automatically on predefined environments.

In this post I will give some tips to increase the chance to run successfully and pass test on CircleCI.

Background If you are not familiar with CircleCI, you may want to read this. There are something involved:
- CircleCI needs a file named circle.yml put in the root directory of your project, in which you write commands to be executed on CircleCI.
- In common, the process is like: CircleCI first created a virtual machine, then it pulls your code from your repository and sets up the environment, finally it runs the tests. Particularly, CircleCI starts an emulator in the virtual machine they creates (sounds VM in another VM, VM-ception), and uses the Gradle wrapper to run Gradle tasks for testing purpose.
- Remember, the emulator on CircleCI is super-weak.
- Have a quick look (or slow l…

Build your release APK with CircleCI

This entry is about Android development.

It has been quite long since the last time I wrote an actual technical blog entry. Then I was too much busy being inactive, and I did change my job. Now I am in a position that I have learnt every day. I should have written this post a year ago in order to summarize the knowledge I got, but whenever I type a few words, I feel exhausted. This time is my big try. *hat off*

I assume that you are familiar with:
- Gradle, a build system where you can write scripts to automate your tasks, in the scope of this entry, Android build/test tasks.
- Test-driven development (TDD), a software development process in which test cases are written before you code; or at least when you finished coding, the test cases are finished also.
- Continuous Integration (CI), a development practice that requires you to integrate code into a shared repository several times a day.

 The combination of Gradle, TDD and CI gives a result that every time you push code into a rep…