mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-04 23:28:19 -05:00
33 lines
1.0 KiB
Groovy
33 lines
1.0 KiB
Groovy
|
apply plugin: 'java'
|
||
|
apply plugin: 'kotlin'
|
||
|
apply plugin: 'jacoco'
|
||
|
|
||
|
def androidModule = project(':app')
|
||
|
|
||
|
dependencies {
|
||
|
compile androidModule
|
||
|
|
||
|
testCompile androidModule.android.applicationVariants.toList().first().javaCompile.classpath
|
||
|
testCompile androidModule.android.applicationVariants.toList().first().javaCompile.outputs.files
|
||
|
testCompile files(androidModule.plugins.findPlugin("com.android.application").getBootClasspath())
|
||
|
|
||
|
testCompile 'junit:junit:4.+'
|
||
|
testCompile 'org.robolectric:robolectric:2.2'
|
||
|
}
|
||
|
|
||
|
jacocoTestReport {
|
||
|
// Add Android sources/classes for coverage
|
||
|
additionalSourceDirs files(androidModule.android.sourceSets.main.java.srcDirs)
|
||
|
additionalClassDirs androidModule.android.applicationVariants
|
||
|
.toList().first().javaCompile.outputs.files
|
||
|
|
||
|
reports {
|
||
|
xml.enabled true
|
||
|
csv.enabled false
|
||
|
html.destination "${buildDir}/jacocoHtml"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Code coverage should depend on the tests
|
||
|
project.jacocoTestReport.dependsOn project.test
|