From e645fd867f4ca4835780c5c37adfb23960e0aecf Mon Sep 17 00:00:00 2001 From: isuPatches Date: Sat, 29 Oct 2016 11:56:55 -0500 Subject: [PATCH] Another potential travis fix --- .travis.yml | 8 +------- app/build.gradle | 10 ++++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07bc824c..d68e0879 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 @@ -39,4 +33,4 @@ before_script: - adb shell input keyevent 82 & script: - - travis_wait 20 ./gradlew clean connectedAndroidTest --stacktrace \ No newline at end of file + - travis_wait 20 ./gradlew build connectedCheck \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 5d536ac0..a0ce8bdc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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.