diff --git a/.travis.yml b/.travis.yml index 75be95bf..62e376a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: android jdk: oraclejdk8 -sudo: false +sudo: required cache: directories: @@ -31,12 +31,12 @@ android: before_script: - echo no | android create avd --force -n test -t android-$EMULATOR_SDK_LEVEL --abi $ABI --tag $TAG - - emulator -avd test -no-skin -no-audio -no-window & + - emulator -avd test -no-audio -no-window & - android-wait-for-emulator - adb shell input keyevent 82 & script: - - travis_wait 60 ./gradlew clean jacocoDebugTestReport -PdisablePreDex --stacktrace + - travis_wait 60 ./gradlew clean jacocoDebugTestReport --stacktrace after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/build.gradle b/build.gradle index 9991176b..14f65f8b 100644 --- a/build.gradle +++ b/build.gradle @@ -45,6 +45,10 @@ subprojects { } ext { + travisBuild = System.getenv("TRAVIS") == "true" + // allows for -Dpre-dex=false to be set + preDexEnabled = "true".equals(System.getProperty("pre-dex", "true")) + GROUP = "com.isupatches" VERSION_NAME = "2.0.0" diff --git a/wisefy/build.gradle b/wisefy/build.gradle index 30457742..f32957ed 100644 --- a/wisefy/build.gradle +++ b/wisefy/build.gradle @@ -15,6 +15,11 @@ dexcount { android { + dexOptions { + // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false. + preDexLibraries = preDexEnabled && !travisBuild + } + adbOptions { timeOutInMs 15 * 60 * 1000 // 15 minutes installOptions "-d","-t"