Skip to content

Commit e24a136

Browse files
committed
Merge pull request #209 from barbeau/travis-rebase
Fix #207 - Add Travis CI support
2 parents dba3b0d + 807f515 commit e24a136

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

.travis.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
language: android
2+
jdk: oraclejdk7
3+
# Use the Travis Container-Based Infrastructure
4+
sudo: false
5+
6+
cache:
7+
directories:
8+
- ${TRAVIS_BUILD_DIR}/gradle/caches/
9+
- ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/
10+
11+
env:
12+
global:
13+
- ANDROID_API_LEVEL=23
14+
- EMULATOR_API_LEVEL=21
15+
- ANDROID_BUILD_TOOLS_VERSION=23.0.0
16+
- ANDROID_ABI=google_apis/armeabi-v7a
17+
- ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default)
18+
19+
android:
20+
components:
21+
- platform-tools
22+
- tools
23+
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
24+
- android-$ANDROID_API_LEVEL
25+
- android-$EMULATOR_API_LEVEL
26+
# For Google APIs
27+
- addon-google_apis-google-$ANDROID_API_LEVEL
28+
- addon-google_apis-google-$EMULATOR_API_LEVEL
29+
# Google Play Services
30+
- extra-google-google_play_services
31+
# Support library
32+
- extra-android-support
33+
# Latest artifacts in local repository
34+
- extra-google-m2repository
35+
- extra-android-m2repository
36+
# Specify at least one system image
37+
- sys-img-armeabi-v7a-addon-google_apis-google-$ANDROID_API_LEVEL
38+
- sys-img-armeabi-v7a-addon-google_apis-google-$EMULATOR_API_LEVEL
39+
40+
before_script:
41+
# Create and start emulator
42+
- echo no | android create avd --force -n test -t "Google Inc.:Google APIs:"$EMULATOR_API_LEVEL --abi $ANDROID_ABI
43+
- emulator -avd test -no-skin -no-audio -no-window &
44+
- android-wait-for-emulator
45+
46+
script:
47+
- ./gradlew connectedCheck -x library:signArchives -PdisablePreDex

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.google.maps.android/android-maps-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.google.maps.android/android-maps-utils)
1+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.google.maps.android/android-maps-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.google.maps.android/android-maps-utils)[![Build Status](https://travis-ci.org/googlemaps/android-maps-utils.svg?branch=master)](https://travis-ci.org/googlemaps/android-maps-utils)
22

33
# Google Maps Android API utility library
44

build.gradle

+15
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@ buildscript {
77
classpath 'com.android.tools.build:gradle:1.3.0'
88
}
99
}
10+
/**
11+
* Improve build server performance by allowing disabling of pre-dexing
12+
* (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
13+
*/
14+
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
15+
16+
subprojects {
17+
project.plugins.whenPluginAdded { plugin ->
18+
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
19+
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
20+
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
21+
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)