Skip to content

Commit 3bf9531

Browse files
committed
Fix coverage report file not being available to coveralls
1 parent 3cd09ca commit 3bf9531

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ android:
2828
- sys-img-armeabi-v7a-android-22
2929

3030
script:
31-
- ./gradlew clean createDebugAndroidTestCoverageReport coveralls
31+
- ./gradlew connectedAndroidTest coveralls

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:2.2.2'
9+
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3'
910

1011
// NOTE: Do not place your application dependencies here; they belong
1112
// in the individual module build.gradle files
1213
}
1314
}
14-
plugins {
15-
id 'jacoco'
16-
id 'com.github.kt3k.coveralls' version '2.6.3'
17-
}
1815

1916
allprojects {
2017
repositories {

library/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.kt3k.coveralls'
23

34
android {
45
compileSdkVersion 24
@@ -22,6 +23,14 @@ android {
2223
}
2324
}
2425

26+
coveralls {
27+
jacocoReportPath = "${buildDir}/reports/coverage/debug/report.xml"
28+
}
29+
30+
tasks.coveralls {
31+
dependsOn 'connectedAndroidTest'
32+
}
33+
2534
dependencies {
2635
compile fileTree(dir: 'libs', include: ['*.jar'])
2736
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {

0 commit comments

Comments
 (0)