@@ -29,19 +29,20 @@ plugins {
2929 kotlin(" plugin.serialization" ) version " 1.4.21"
3030 id(" org.jetbrains.dokka" ) version " 1.4.20"
3131 id(" io.kotest" ) version " 0.2.6"
32- jacoco
32+ id(" org.jetbrains.kotlinx.kover" ) version " 0.5.1"
33+ // jacoco
3334 id(" java-library" )
3435 signing
3536 id(" de.marcphilipp.nexus-publish" ) version " 0.4.0"
36- id(" io.codearte.nexus-staging" ) version " 0.22 .0"
37+ id(" io.codearte.nexus-staging" ) version " 0.30 .0"
3738}
3839
39- jacoco {
40- toolVersion = " 0.8.6"
41- }
40+ // jacoco {
41+ // toolVersion = "0.8.6"
42+ // }
4243
4344repositories {
44- jcenter()
45+ // jcenter()
4546 mavenCentral()
4647 mavenLocal()
4748}
@@ -87,8 +88,8 @@ kotlin {
8788 dependencies {
8889 implementation(kotlin(" test-common" ))
8990 implementation(kotlin(" test-annotations-common" ))
90- implementation(" io.kotest:kotest-assertions-core:4 .3.2 " )
91- implementation(" io.kotest:kotest-property:4 .3.2 " )
91+ implementation(" io.kotest:kotest-assertions-core:5 .3.0 " )
92+ implementation(" io.kotest:kotest-property:5 .3.0 " )
9293 }
9394 }
9495 val jvmMain by getting {
@@ -109,8 +110,8 @@ kotlin {
109110 val jvmTest by getting {
110111 dependencies {
111112 implementation(kotlin(" test-junit" ))
112- implementation(" io.mockk:mockk:1.10 .4" )
113- implementation(" io.kotest:kotest-runner-junit5:4 .3.2 " )
113+ implementation(" io.mockk:mockk:1.12 .4" )
114+ implementation(" io.kotest:kotest-runner-junit5:5 .3.0 " )
114115 implementation(" io.kotest:kotest-framework-engine-jvm:4.3.2" )
115116 }
116117 }
@@ -128,7 +129,7 @@ kotlin {
128129
129130tasks.named<Test >(" jvmTest" ) {
130131 useJUnitPlatform()
131- finalizedBy(tasks.jacocoTestReport)
132+ // finalizedBy(tasks.jacocoTestReport)
132133 filter {
133134 isFailOnNoMatchingTests = false
134135 }
@@ -143,29 +144,37 @@ tasks.named<Test>("jvmTest") {
143144 systemProperties = System .getProperties().map { it.key.toString() to it.value }.toMap()
144145}
145146
146- tasks.jacocoTestReport {
147- val coverageSourceDirs = arrayOf(
148- " ${projectDir} /src/commonMain/kotlin" ,
149- " ${projectDir} /src/jvmMain/kotlin"
150- )
151-
152- val classFiles = File (" ${buildDir} /classes/kotlin/jvm/main/" )
153- .walkBottomUp()
154- .toSet()
155-
156-
157- classDirectories.setFrom(classFiles)
158- sourceDirectories.setFrom(files(coverageSourceDirs))
159-
160- executionData.setFrom(files(" ${buildDir} /jacoco/jvmTest.exec" ))
161-
162- reports {
163- xml.isEnabled = true
164- csv.isEnabled = true
165- html.isEnabled = true
147+ tasks.test {
148+ extensions.configure(kotlinx.kover.api.KoverTaskExtension ::class ) {
149+ isDisabled = false
150+ binaryReportFile.set(file(" $buildDir /reports/result.bin" ))
151+ includes = listOf (" animatedledstrip.*" )
166152 }
167153}
168154
155+ // tasks.jacocoTestReport {
156+ // val coverageSourceDirs = arrayOf(
157+ // "${projectDir}/src/commonMain/kotlin",
158+ // "${projectDir}/src/jvmMain/kotlin"
159+ // )
160+ //
161+ // val classFiles = File("${buildDir}/classes/kotlin/jvm/main/")
162+ // .walkBottomUp()
163+ // .toSet()
164+ //
165+ //
166+ // classDirectories.setFrom(classFiles)
167+ // sourceDirectories.setFrom(files(coverageSourceDirs))
168+ //
169+ // executionData.setFrom(files("${buildDir}/jacoco/jvmTest.exec"))
170+ //
171+ // reports {
172+ // xml.isEnabled = true
173+ // csv.isEnabled = true
174+ // html.isEnabled = true
175+ // }
176+ // }
177+
169178val javadoc = tasks.named(" javadoc" )
170179
171180val javadocJar by tasks.creating(Jar ::class ) {
0 commit comments