From 770e8021193b6b891cbf4f5aad9ec917b76c78fb Mon Sep 17 00:00:00 2001 From: monosoul Date: Wed, 27 Jul 2022 17:08:14 +0200 Subject: [PATCH 1/8] Update junit to 5.9.0 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index b024ee4..10c895f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,7 @@ 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") From c3392953cbceab5b835643b848625cdf354680bc Mon Sep 17 00:00:00 2001 From: monosoul Date: Wed, 27 Jul 2022 17:08:27 +0200 Subject: [PATCH 2/8] Update mockk to 1.12.5 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 10c895f..73f7a41 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ dependencies { 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") } From b1adc7b1f43c05695eb03db1cc3d8900590df412 Mon Sep 17 00:00:00 2001 From: monosoul Date: Wed, 27 Jul 2022 17:51:51 +0200 Subject: [PATCH 3/8] Reduce JVM args to minimum --- build.gradle.kts | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 73f7a41..04d7a5b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,11 +47,9 @@ tasks { "test"(Test::class) { 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 { From b6d46c868d637cf2365b3e9e74fada290cc709af Mon Sep 17 00:00:00 2001 From: monosoul Date: Wed, 27 Jul 2022 18:14:17 +0200 Subject: [PATCH 4/8] Rollback org.jetbrains.intellij to 1.5.3 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 04d7a5b..ead3f6d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ group = "com.github.monosoul" version = "0.1.2" plugins { - id("org.jetbrains.intellij") version "1.7.0" + id("org.jetbrains.intellij") version "1.5.3" kotlin("jvm") version "1.7.10" jacoco } From 6ff27061ea2b02788a0de79b451fdecec25df7e6 Mon Sep 17 00:00:00 2001 From: monosoul Date: Wed, 27 Jul 2022 18:15:07 +0200 Subject: [PATCH 5/8] Simplify tasks configuration a bit --- build.gradle.kts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ead3f6d..945503b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,18 +33,20 @@ dependencies { } tasks { - val jacocoTestReport = "jacocoTestReport"(JacocoReport::class) { + jacocoTestReport { reports { xml.required.set(true) html.required.set(false) } + + dependsOn(test) } patchPluginXml { untilBuild.set(null as String?) } - "test"(Test::class) { + test { useJUnitPlatform() jvmArgs( "--add-opens=java.base/java.lang=ALL-UNNAMED", From c92333f3651151c0b8e01a3b724bac39dea1ee31 Mon Sep 17 00:00:00 2001 From: monosoul Date: Thu, 28 Jul 2022 10:17:16 +0200 Subject: [PATCH 6/8] Generate coverage reports using kover --- build.gradle.kts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 945503b..aebc93d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import kotlinx.kover.api.CoverageEngine.JACOCO import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED @@ -10,7 +11,13 @@ version = "0.1.2" plugins { id("org.jetbrains.intellij") version "1.5.3" kotlin("jvm") version "1.7.10" - jacoco + id("org.jetbrains.kotlinx.kover") version "0.5.0" +} + +kover { + coverageEngine.set(JACOCO) + jacocoEngineVersion.set("0.8.8") + generateReportOnCheck = true } intellij { @@ -33,19 +40,14 @@ dependencies { } tasks { - jacocoTestReport { - reports { - xml.required.set(true) - html.required.set(false) - } - - dependsOn(test) - } - patchPluginXml { untilBuild.set(null as String?) } + koverHtmlReport { + isEnabled = false + } + test { useJUnitPlatform() jvmArgs( @@ -60,10 +62,6 @@ tasks { } } - "check" { - dependsOn(jacocoTestReport) - } - withType { kotlinOptions { jvmTarget = "17" From bdf6453c9227e0895abb6d0cd528f9369fb8fc2b Mon Sep 17 00:00:00 2001 From: monosoul Date: Thu, 28 Jul 2022 10:22:14 +0200 Subject: [PATCH 7/8] Use JB coverage engine --- build.gradle.kts | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index aebc93d..0d3b15f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,3 @@ -import kotlinx.kover.api.CoverageEngine.JACOCO import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED @@ -15,8 +14,6 @@ plugins { } kover { - coverageEngine.set(JACOCO) - jacocoEngineVersion.set("0.8.8") generateReportOnCheck = true } From 2080cad4c79f201e33114796aaf8d0f9836c742b Mon Sep 17 00:00:00 2001 From: monosoul Date: Thu, 28 Jul 2022 10:22:49 +0200 Subject: [PATCH 8/8] Update org.jetbrains.intellij back to 1.7.0 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0d3b15f..8c6ceef 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ group = "com.github.monosoul" version = "0.1.2" plugins { - id("org.jetbrains.intellij") version "1.5.3" + id("org.jetbrains.intellij") version "1.7.0" kotlin("jvm") version "1.7.10" id("org.jetbrains.kotlinx.kover") version "0.5.0" }