Skip to content

Commit

Permalink
Another potential travis fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isuPatches committed Oct 29, 2016
1 parent 095aed8 commit e645fd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ language: android
sudo: required
jdk: oraclejdk8

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

env:
global:
- ANDROID_API_LEVEL=24
Expand All @@ -28,7 +23,6 @@ android:
- extra-android-support
# Latest artifacts in local repository
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image
- sys-img-armeabi-v7a-google_apis-$ANDROID_API_LEVEL

Expand All @@ -39,4 +33,4 @@ before_script:
- adb shell input keyevent 82 &

script:
- travis_wait 20 ./gradlew clean connectedAndroidTest --stacktrace
- travis_wait 20 ./gradlew build connectedCheck
10 changes: 10 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,17 @@ dexcount {
verbose = false
}

ext {
travisBuild = System.getenv("TRAVIS") == "true"
// allows for -Dpre-dex=false to be set
preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
}

android {
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !travisBuild
}

testOptions {
// Allows Android code to be called from unit tests without causing a crash.
Expand Down

0 comments on commit e645fd8

Please sign in to comment.