2018-10-06 13:37:12 +02:00
|
|
|
apply plugin: 'java-library'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
apply plugin: 'jacoco'
|
|
|
|
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += "${projectDir}/src/main/kotlin"
|
|
|
|
test.java.srcDirs += "${projectDir}/src/test/kotlin"
|
|
|
|
test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin"
|
|
|
|
test.resources.srcDirs += "${projectDir}/src/integrationTest/resources"
|
|
|
|
}
|
|
|
|
|
2018-10-06 14:49:06 +02:00
|
|
|
|
2018-10-06 13:37:12 +02:00
|
|
|
dependencies {
|
|
|
|
api other.kotlinStdlib
|
2018-10-06 14:49:06 +02:00
|
|
|
|
|
|
|
testImplementation testing.junit
|
|
|
|
testRuntimeOnly testing.junitVintage
|
2018-10-06 13:37:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion(versions.jacoco)
|
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
|
|
|
// override it in the module
|
2020-08-24 13:59:40 +02:00
|
|
|
jacocoExclude = ['jdk.internal.*']
|
2018-10-06 13:37:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
reports {
|
|
|
|
html.enabled true
|
|
|
|
csv.enabled false
|
|
|
|
xml.enabled true
|
|
|
|
}
|
|
|
|
|
|
|
|
afterEvaluate {
|
2020-06-13 19:04:31 +02:00
|
|
|
getClassDirectories().setFrom(files(classDirectories.files.collect {
|
2018-10-06 13:37:12 +02:00
|
|
|
fileTree(dir: it, excludes: jacocoExclude)
|
2020-06-13 19:04:31 +02:00
|
|
|
}))
|
2018-10-06 13:37:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-06 20:17:32 +02:00
|
|
|
tasks.named("test").configure {
|
|
|
|
useJUnitPlatform()
|
2018-10-06 13:37:12 +02:00
|
|
|
jacoco {
|
|
|
|
excludes += jacocoExclude
|
2020-08-24 13:59:40 +02:00
|
|
|
includeNoLocationClasses = true
|
2018-10-06 13:37:12 +02:00
|
|
|
}
|
2021-05-06 20:17:32 +02:00
|
|
|
finalizedBy jacocoTestReport
|
2018-10-06 13:37:12 +02:00
|
|
|
}
|
|
|
|
|
2021-05-06 20:17:32 +02:00
|
|
|
tasks.register("ciTest") {
|
|
|
|
dependsOn test
|
2018-10-06 13:37:12 +02:00
|
|
|
group = "Verification"
|
|
|
|
description = "Special task for CI that calls all tests in pure kotlin modules"
|
|
|
|
}
|