Skip to content

Building Agit

rtyley edited this page Jun 26, 2011 · 32 revisions

Agit is Maven-based, and all of it's dependencies (apart from the Android SDK) are in Maven Central, so building from the command-line is easy:

export ANDROID_HOME=/home/roberto/tools/android-sdk   # Change to the location of your SDK!
git clone git://github.com/rtyley/agit.git agit-parent
cd agit-parent
mvn clean install

This will download all the project dependencies, compile the project, deploy the APK to your device, and run the integration tests.

APK Signing

You might find that your device doesn't let you install Agit if you already have the version from the Android Market installed - this is standard Android security, it won't let you directly replace an app that's been signed with a differing key. Just uninstall Agit under 'Manage Applications' and you'll then be able to install your own version.

Integration Tests (and how to survive them)

The integration tests will install toy-ssh-agent into the Android VM, this will interfere with the ConnectBot ssh-agent if you're using that for SSH support. If you want to use Agit with SSH, make sure that ConnectBot is installed before Agit and toy-ssh-agent - if necessary, uninstall all three apps and start again.

The tests also require the Android VM to hit the mini-git-server they set up in the Maven process - and thus need to know what the host for the Maven process is. If the Android VM is the emulator, this will default to '10.0.2.2', which will work, if the Android VM is a proper device, then you'll need to tell the device the hostname. Create a file called 'agit-integration-test.properties' on the root folder of your SD card, and give it a line like this:

gitserver.host.address=192.168.1.104

Make sure the device can hit your machine over that address, and the integration tests should pass :-)

Clone this wiki locally