Skip to content

Commit

Permalink
Fix coverage reports (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
monosoul committed Jul 28, 2022
1 parent e95f0fc commit fdd966a
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ version = "0.1.2"
plugins {
id("org.jetbrains.intellij") version "1.7.0"
kotlin("jvm") version "1.7.10"
jacoco
id("org.jetbrains.kotlinx.kover") version "0.5.0"
}

kover {
generateReportOnCheck = true
}

intellij {
Expand All @@ -24,34 +28,29 @@ intellij {
dependencies {
implementation(kotlin("stdlib-jdk8"))

testImplementation(platform("org.junit:junit-bom:5.8.2"))
testImplementation(platform("org.junit:junit-bom:5.9.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-launcher")
testImplementation("io.strikt:strikt-jvm:0.34.1")
testImplementation("io.mockk:mockk:1.12.4")
testImplementation("io.mockk:mockk:1.12.5")
testImplementation("org.apache.commons:commons-lang3:3.12.0")
}

tasks {
val jacocoTestReport = "jacocoTestReport"(JacocoReport::class) {
reports {
xml.required.set(true)
html.required.set(false)
}
}

patchPluginXml {
untilBuild.set(null as String?)
}

"test"(Test::class) {
koverHtmlReport {
isEnabled = false
}

test {
useJUnitPlatform()
jvmArgs(
"--add-exports=java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED"
)

testLogging {
Expand All @@ -60,10 +59,6 @@ tasks {
}
}

"check" {
dependsOn(jacocoTestReport)
}

withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
Expand Down

0 comments on commit fdd966a

Please sign in to comment.