Skip to content

Commit

Permalink
Use Android 5.0 SDK when building with Maven.
Browse files Browse the repository at this point in the history
Fixed #205.
  • Loading branch information
peplin committed Nov 13, 2014
1 parent 4b6552c commit 5701e61
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,8 @@ android:
before_install:
- mkdir -p ~/.m2/repository
- cp -R $ANDROID_HOME/extras/android/m2repository/com ~/.m2/repository
- git clone https://github.com/mosabua/maven-android-sdk-deployer.git
- pushd maven-android-sdk-deployer; mvn install -P 5.0; popd
install:
- mvn clean install -DskipTests=true -pl openxc -am
script:
Expand Down
14 changes: 12 additions & 2 deletions README.mkd
Expand Up @@ -48,11 +48,21 @@ emulator):

The build requires [Maven](http://maven.apache.org/download.html)
v3.0.3+ and the [Android SDK](http://developer.android.com/sdk/index.html)
to be installed in your development environment. In addition you'll need to set
the `ANDROID_HOME` environment variable to the location of your SDK:
to be installed in your development environment.

Set the `ANDROID_HOME` environment variable to the location of your SDK:

export ANDROID_HOME=/opt/tools/android-sdk

Clone the maven-android-sdk-deployer tool and install the SDK to your local
Maven repository for the latest SDK:

$ git clone git@github.com:mosabua/maven-android-sdk-deployer.git
$ cd maven-android-sdk-deployer
$ mvn install -P 5.0

### Support Library

You also need the Android support library, but unfortunately Google doesn't
deploy the latest versions of this to the the Central Maven repository. Instead,
you must open the Android SDK manager and install the "Android Support
Expand Down
2 changes: 1 addition & 1 deletion enabler/pom.xml
Expand Up @@ -14,7 +14,7 @@

<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion openxc-it/pom.xml
Expand Up @@ -13,7 +13,7 @@
<description>Instrumentation test suite for OpenXC library</description>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion openxc/pom.xml
Expand Up @@ -18,7 +18,7 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Expand Up @@ -38,7 +38,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<android.version>4.1.1.4</android.version>
<android.version>5.0_r1</android.version>
<android.platform>21</android.platform>

<java.version>1.7</java.version>
Expand All @@ -48,14 +48,14 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>${android.version}</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>${android.version}</version>
<version>4.1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down

0 comments on commit 5701e61

Please sign in to comment.