Setting up a build server for ownCloud Android
7 August 2013

Part of the ownCloud ecosystem is the Android client. Unfortunately, this part has some catching up to do, as it lacks certain obvious features such as downloading an entire folder, picture thumbnails and a way of searching for files. So in this post, I’m covering how to set up a build server for the ownCloud Android client.

Lately, I’ve been looking into ownCloud, an alternative to various cloud services such as Dropbox, Skydrive and Google Drive. Although it’s still very much in development and not at the same level as it’s competitors, I’m really impressed by the concept. Cloud storage is an amazing idea, but I always struggled with having your files stored at some random place I can’t actually get to or control. Because I can host ownCloud myself, it pretty much solves those problems.

Setup environment

1. Base installation

For the build server, I’m using a virtual machine to ensure a clean installation with as few problems as possible. You can choose to do the same or simply install everything on your host machine. Anyway, should you want to use a virtual as well, here are the specs I’m using:

You should now be able to run 'git’, 'java’, 'ant’ and 'android’ from the command prompt.

8. Install Android API 17 or higher.

Setup resources

We now have all required software to build an .apk file. It’s time to download the latest sources from github.

9. Clone the latest sources from GitHub using the command line:

git clone --recursive https://github.com/owncloud/android.git

bash

Optionally, you can add the ’–recursive’ flag, which already downloads submodules. However, the next step will also take care of this.

This creates a directory called 'android’.

10. Run setup_env.bat from the android directory. This sets up everything android-related.

11. Create a key for signing the apk. I’m putting this in a bat file called '0 - generate-key.bat’. You only need to run this once, as long as you don’t delete the resulting key file or lose the password.