2017-02-21 17:46:24 +01:00
|
|
|
apply plugin: 'kotlin'
|
2017-08-09 21:56:20 +02:00
|
|
|
apply plugin: 'jacoco'
|
2017-07-29 22:31:20 +02:00
|
|
|
apply from: '../gradle_scripts/code_quality.gradle'
|
2017-02-21 17:46:24 +01:00
|
|
|
|
2017-03-02 06:37:51 +01:00
|
|
|
sourceSets {
|
2017-08-09 21:56:20 +02:00
|
|
|
main.java.srcDirs += "${projectDir}/src/main/kotlin"
|
|
|
|
test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin"
|
|
|
|
test.resources.srcDirs += "${projectDir}/src/integrationTest/resources"
|
2017-03-02 06:37:51 +01:00
|
|
|
test.output.resourcesDir = test.output.classesDir
|
|
|
|
}
|
|
|
|
|
2017-02-21 17:46:24 +01:00
|
|
|
dependencies {
|
2017-04-01 18:40:14 +02:00
|
|
|
compile other.kotlinStdlib
|
2017-03-02 06:37:51 +01:00
|
|
|
compile other.retrofit
|
2017-04-01 18:40:14 +02:00
|
|
|
compile other.jacksonConverter
|
|
|
|
compile other.jacksonKotlin
|
2017-07-22 22:49:14 +02:00
|
|
|
compile other.okhttpLogging
|
2017-02-21 17:46:24 +01:00
|
|
|
|
|
|
|
testCompile testing.junit
|
|
|
|
testCompile testing.kotlinJunit
|
2017-07-23 19:46:06 +02:00
|
|
|
testCompile testing.kotlinReflect
|
2017-02-21 17:46:24 +01:00
|
|
|
testCompile testing.mockitoKotlin
|
|
|
|
testCompile testing.kluent
|
2017-03-02 06:37:51 +01:00
|
|
|
testCompile testing.mockWebServer
|
2017-07-23 19:46:06 +02:00
|
|
|
testCompile testing.apacheCodecs
|
2017-08-09 21:56:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = versions.jacoco
|
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
|
|
|
// Excluding data classes
|
|
|
|
jacocoExclude = [
|
|
|
|
'**/models/**'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
reports {
|
|
|
|
html.enabled true
|
|
|
|
csv.enabled false
|
|
|
|
xml.enabled true
|
|
|
|
}
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
classDirectories = files(classDirectories.files.collect {
|
|
|
|
fileTree(dir: it, excludes: jacocoExclude)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
test.finalizedBy jacocoTestReport
|
|
|
|
test {
|
|
|
|
jacoco {
|
|
|
|
excludes += jacocoExclude
|
|
|
|
}
|
|
|
|
}
|