Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Support for using Spring when developing native Android applications.

branch: master
README.md

Spring for Android

Spring for Android is an extension of the Spring Framework that aims to simplify the development of native Android applications.

Check Out and Build from Source

  1. Clone the repository from GitHub:

    $ git clone --recursive git://github.com/SpringSource/spring-android.git
    

    Note: the --recursive switch is important, because Spring for Android uses git submodules, which must also be cloned and initialized.

  2. Navigate into the cloned repository directory:

    $ cd spring-android
    
  3. The project uses Gradle to build:

    $ ./gradlew build
    

Alternatively, if "--recursive" is omitted, the following steps are required for a full check out of the source:

  1. Clone the repository from GitHub:

    $ git clone git://github.com/SpringSource/spring-android.git
    
  2. Initialize the submodule

    $ git submodule init
    
  3. Update the submodule in your local repository

    $ git submodule update
    

Eclipse

To generate Eclipse metadata (.classpath and .project files), use the following Gradle task:

$ ./gradlew eclipse

Once complete, you may then import the projects into Eclipse as usual:

File -> Import -> Existing projects into workspace

Alternatively, SpringSource Tool Suite has built in support for Gradle, and you can simply import as Gradle projects.

IDEA

To generate IDEA metadata (.iml and .ipr files), use the following Gradle task:

$ ./gradlew idea

JavaDoc

Use the following Gradle task to build the JavaDoc

$ ./gradlew :docs:api

Note: The result will be available in 'docs/build/api'.

Tests

There are three Android Test Projects located in the repository that correspond to the three Spring for Android Modules (Core, Rest Template, and Auth). These projects are executed separately from the Gradle build process. To run the suite of tests, perform the following steps. A parent POM located in the root of the repository will execute each test project on all attached devices and emulators.

  1. Build Spring for Android JARs and install them to the local Maven repository:

    $ ./gradlew build install
    
  2. The tests are run using the Android Maven Plugin:

    $ mvn clean install
    

    Note: Each test project can also be executed individually, by running the previous command from within the respective test project's directory.

Something went wrong with that request. Please try again.