2017-02-21 17:46:24 +01:00
|
|
|
apply plugin: 'kotlin'
|
2017-08-21 22:08:42 +02:00
|
|
|
apply plugin: 'java-library'
|
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
|
|
|
}
|
|
|
|
|
2017-02-21 17:46:24 +01:00
|
|
|
dependencies {
|
2017-08-21 22:08:42 +02:00
|
|
|
api other.kotlinStdlib
|
|
|
|
api other.retrofit
|
2018-01-07 13:20:59 +01:00
|
|
|
api other.jacksonConverter
|
2017-08-21 22:08:42 +02:00
|
|
|
implementation(other.jacksonKotlin) {
|
2017-08-12 20:17:32 +02:00
|
|
|
exclude module: 'kotlin-reflect'
|
|
|
|
}
|
2017-08-21 22:08:42 +02:00
|
|
|
implementation other.kotlinReflect // for jackson kotlin, but to use the same version
|
|
|
|
implementation other.okhttpLogging
|
|
|
|
|
|
|
|
testImplementation testing.junit
|
|
|
|
testImplementation testing.kotlinJunit
|
2017-12-02 21:21:23 +01:00
|
|
|
testImplementation testing.mockito
|
|
|
|
testImplementation testing.mockitoInline
|
2017-08-21 22:08:42 +02:00
|
|
|
testImplementation testing.mockitoKotlin
|
|
|
|
testImplementation testing.kluent
|
|
|
|
testImplementation testing.mockWebServer
|
|
|
|
testImplementation testing.apacheCodecs
|
2017-08-09 21:56:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jacoco {
|
2017-08-21 22:08:42 +02:00
|
|
|
toolVersion(versions.jacoco)
|
2017-08-09 21:56:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|