1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2024-12-15 10:24:18 +01:00
ultrasonic-app-subsonic-and.../gradle_scripts/kotlin-module-bootstrap.gradle

62 lines
1.4 KiB
Groovy
Raw Normal View History

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"
}
test {
useJUnitPlatform()
}
dependencies {
api other.kotlinStdlib
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
}
jacoco {
toolVersion(versions.jacoco)
}
ext {
// override it in the module
2020-08-24 13:59:40 +02:00
jacocoExclude = ['jdk.internal.*']
}
jacocoTestReport {
reports {
html.enabled true
csv.enabled false
xml.enabled true
}
afterEvaluate {
getClassDirectories().setFrom(files(classDirectories.files.collect {
fileTree(dir: it, excludes: jacocoExclude)
}))
}
}
test.finalizedBy jacocoTestReport
test {
jacoco {
excludes += jacocoExclude
2020-08-24 13:59:40 +02:00
includeNoLocationClasses = true
}
}
2018-10-07 20:45:20 +02:00
tasks.create(name: "ciTest", dependsOn: "test") {
group = "Verification"
description = "Special task for CI that calls all tests in pure kotlin modules"
}