apply plugin: 'kotlin' apply plugin: 'jacoco' apply from: '../gradle_scripts/code_quality.gradle' sourceSets { main.java.srcDirs += "${projectDir}/src/main/kotlin" test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin" test.resources.srcDirs += "${projectDir}/src/integrationTest/resources" test.output.resourcesDir = test.output.classesDir } dependencies { compile other.kotlinStdlib compile other.retrofit compile other.jacksonConverter compile(other.jacksonKotlin) { exclude module: 'kotlin-reflect' } compile other.kotlinReflect // for jackson kotlin, but to use the same version compile other.okhttpLogging testCompile testing.junit testCompile testing.kotlinJunit testCompile testing.mockitoKotlin testCompile testing.kluent testCompile testing.mockWebServer testCompile testing.apacheCodecs } 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 } }