## Setup Instructions for the Google API Client Library for Java

### Browse Online

- Browse Source

### Checkout Instructions

Prerequisites: install Java 6, Mercurial and Maven. You may need to set your `JAVA_HOME`.

    hg clone https://google-api-java-client.googlecode.com/hg/ google-api-java-client
    cd google-api-java-client
    mvn install

There are two named branches:

- The "default" branch has the stable 1.4 library. This is the default branch that is checked out with the instructions above.
- The "dev" branch has the development 1.5 library. To switch to this branch, run:

      hg update dev
      mvn clean install

### Setup Project in Eclipse 3.5

Prerequisites: install Eclipse, the Mercurial plugin, the Maven plugin, and the Android plugin.

- Setup Eclipse Preferences
  - Window > Preferences... (or on Mac, Eclipse > Preferences...)
  - Select Maven
    - check on "Download Artifact Sources"
    - check on "Download Artifact JavaDoc"
  - Select Android
    - setup SDK location
- Import projects
  - File > Import...
  - Select "General > Existing Project into Workspace" and click "Next"
  - Click "Browse" next to "Select root directory", find `[someDirectory]/google-api-java-client` and click OK
  - Click "Next" and "Finish"