Skip to content

Commit

Permalink
Merge pull request sky-map-team#137 from barbeau/travis
Browse files Browse the repository at this point in the history
Steal Sean's travis configuration
  • Loading branch information
jaydeetay authored Jul 17, 2016
2 parents 5b0fc3a + 8845958 commit d1580e7
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
language: android
jdk: oraclejdk7
# Don't use the Travis Container-Based Infrastructure - causes memory issues
sudo: true

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

env:
global:
- ANDROID_API_LEVEL=23
- ANDROID_BUILD_TOOLS_VERSION=23.0.3
- ANDROID_ABI=armeabi-v7a
- ADB_INSTALL_TIMEOUT=10 # minutes (2 minutes by default)

android:
components:
- platform-tools
- tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
# Google Play Services
- extra-google-google_play_services
# Support library
- extra-android-support
# Latest artifacts in local repository
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image
- sys-img-armeabi-v7a-android-$ANDROID_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 &
- android-wait-for-emulator

script:
- ./gradlew app:connectedAndroidTest -PdisablePreDex
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Sky Map [![Build Status](https://travis-ci.org/sky-map-team/stardroid.svg?branch=master)](https://travis-ci.org/sky-map-team/stardroid)

This is the source repository for Sky Map. You should see the following
two directories:
* app: Application source
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,20 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}
/**
* Improve build server performance by allowing disabling of pre-dexing
* (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
*/
project.ext.preDexLibs = !project.hasProperty('disablePreDex')

subprojects {
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}


0 comments on commit d1580e7

Please sign in to comment.