1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-01-01 03:27:39 +01:00
ultrasonic-app-subsonic-and.../gradle_scripts/kotlin-module-bootstrap.gradle
2018-10-07 20:59:06 +02:00

55 lines
1.2 KiB
Groovy

apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
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"
}
dependencies {
api other.kotlinStdlib
}
jacoco {
toolVersion(versions.jacoco)
}
ext {
// override it in the module
jacocoExclude = []
}
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
includeNoLocationClasses = true
}
}
task("ciTest", dependsOn: "test") {
group = "Verification"
description = "Special task for CI that calls all tests in pure kotlin modules"
}