Skip to content

Commit 0d8193e

Browse files
committed
Enable test coverage only when performing CI.
Running test coverage on every single build while developing in the IDE is quite a waste of time.
1 parent efd2f44 commit 0d8193e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_script:
2828
- emulator -avd test -no-audio -no-window -no-boot-anim &
2929
- android-wait-for-emulator
3030
script:
31-
- "./gradlew clean check connectedCheck jacocoTestReport"
31+
- "./gradlew -Pcoverage clean check connectedCheck jacocoTestReport"
3232
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
3333
mkdir -p app/src/prodRelease/play/release-notes/en-US;
3434
fi

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ android {
139139
}
140140
debug {
141141
minifyEnabled true
142-
testCoverageEnabled true
142+
testCoverageEnabled project.hasProperty('coverage')
143143
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
144144
testProguardFile 'test-proguard-rules.txt'
145145
versionNameSuffix "-debug-" + getBranchName()

0 commit comments

Comments
 (0)