Skip to content

Commit

Permalink
Fix #720 - Fix ABI etc for Travis builds
Browse files Browse the repository at this point in the history
- Add separate ANDOID_TAG ABI tag variable
- Duplicate tools to get the new `repository-11.xml` and to install Android SDK tools 25.1.x
- Change system image names to match new Android SDK
- Change emulator start command to use new ABI tag variable to specify Google APIs
- Switch to 64-bit emulator image
- Remove extra API level emulator image

See travis-ci/travis-ci#6122 (comment) for details.

See also googlemaps/android-maps-utils#299.
  • Loading branch information
barbeau committed Dec 13, 2016
1 parent 37bc746 commit fb496ac
Showing 2 changed files with 26 additions and 12 deletions.
30 changes: 22 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -6,20 +6,33 @@ jdk: oraclejdk8
# Turn off caching to avoid any caching problems
cache: false
# Don't use the Travis Container-Based Infrastructure - See #476
sudo: true
sudo: false

cache:
directories:
- ${TRAVIS_BUILD_DIR}/gradle/caches/
- ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/

env:
global:
- ANDROID_API_LEVEL=23
- ANDROID_API_LEVEL=24
- EMULATOR_API_LEVEL=24
- ANDROID_BUILD_TOOLS_VERSION=25.0.1
- ANDROID_ABI=armeabi-v7a
- ANDROID_ABI=arm64-v8a
- ANDROID_TAG=google_apis
- ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default - see #247)

android:
components:
- tools # to get the new `repository-11.xml`
- platform-tools
- tools
- tools # to install Android SDK tools 25.1.x
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
- android-$EMULATOR_API_LEVEL
# For Google APIs
- addon-google_apis-google-$ANDROID_API_LEVEL
- addon-google_apis-google-$EMULATOR_API_LEVEL
# Google Play Services
- extra-google-google_play_services
# Support library
@@ -28,16 +41,17 @@ android:
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image
- sys-img-armeabi-v7a-android-$ANDROID_API_LEVEL
- sys-img-arm64-v8a-google_apis-$EMULATOR_API_LEVEL

before_script:
# Create and start emulator
- echo no | android create avd --force -n test -t android-$ANDROID_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- echo no | android create avd --force -n test -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG
- emulator -avd test -no-skin -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &

# Only run tests on the main two OneBusAway brand flavors
script:
- ./wait_for_emulator
- ./gradlew connectedObaGoogleDebugAndroidTest connectedObaAmazonDebugAndroidTest -PdisablePreDex

notifications:
8 changes: 4 additions & 4 deletions onebusaway-android/build.gradle
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
apply plugin: 'com.android.application'
@@ -42,7 +42,7 @@ repositories {
}

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "25.0.1"

defaultConfig {
@@ -313,8 +313,8 @@ dependencies {
// Google Play Services Location (we need this on Amazon flavor too)
compile 'com.google.android.gms:play-services-location:9.4.0'
// Support libraries
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'commons-io:commons-io:2.4'
// Open311 client library
compile 'edu.usf.cutr:open311client:1.0.9'

0 comments on commit fb496ac

Please sign in to comment.