diff --git a/.travis.yml b/.travis.yml index 9308dbaa9e..fb247942e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: android jdk: oraclejdk8 env: - - testCoverageEnabled=true matrix: - ANDROID_TARGET=android-23 ANDROID_ABI=x86 android: @@ -19,7 +18,7 @@ before_install: script: # Unit Test - - ./gradlew test jacocoTestReport + - ./gradlew -Pcoverage test jacocoTestReport after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 64f05b0def..3f7dac00a9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -82,7 +82,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { - testCoverageEnabled System.getenv("testCoverageEnabled") ? System.getenv("testCoverageEnabled").toBoolean() : false + testCoverageEnabled (project.hasProperty('coverage') ? true : false) } } productFlavors {