|
@@ -1,6 +1,5 @@
|
1
|
1
|
apply plugin: 'com.android.library'
|
2
|
2
|
apply from: '../prepare-robolectric.gradle'
|
3
|
|
-apply plugin: 'jacoco'
|
4
|
3
|
|
5
|
4
|
android {
|
6
|
5
|
compileSdkVersion 25
|
|
@@ -48,24 +47,7 @@ android {
|
48
|
47
|
}
|
49
|
48
|
}
|
50
|
49
|
|
51
|
|
-task unitTest(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
|
52
|
|
- reports {
|
53
|
|
- xml.enabled = false
|
54
|
|
- html.enabled = true
|
55
|
|
- }
|
56
|
|
-
|
57
|
|
- def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
|
58
|
|
- def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
|
59
|
|
- def mainSrc = "${project.projectDir}/src/main/java"
|
60
|
|
-
|
61
|
|
- sourceDirectories = files([mainSrc])
|
62
|
|
- classDirectories = files([debugTree])
|
63
|
|
- executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec")
|
64
|
|
-
|
65
|
|
- doLast {
|
66
|
|
- println "See code coverage at file://${jacoco.reportsDir}/unitTest/html/index.html"
|
67
|
|
- }
|
68
|
|
-}
|
|
50
|
+task unitTest(dependsOn: 'testDebugUnitTest') {}
|
69
|
51
|
|
70
|
52
|
dependencies {
|
71
|
53
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|