diff --git a/CHANGELOG.md b/CHANGELOG.md index b0edadeb..6975e507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +0.8.1 / 2024-06-07 +=================== +## Kover Gradle Plugin + +### Features +* [`#600`](https://github.com/Kotlin/kotlinx-kover/issues/600) Apply recommendations for improving DSL +* Added DSL to copy one report variant + +### Bugfixes +* [`#610`](https://github.com/Kotlin/kotlinx-kover/issues/610) Fixed `KoverCriticalException` with a certain order of applying of plugins + 0.8.0 / 2024-05-15 =================== This release introduces DSL rework to simplify the work with Android build variants, adds the possibility of lazy configuration, allows for the creation of custom report variants, and expands the ability of reports filtering. diff --git a/README.md b/README.md index c897aecc..2ce9b0d3 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Add the following to your top-level build file: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` @@ -47,7 +47,7 @@ plugins { ```groovy plugins { - id 'org.jetbrains.kotlinx.kover' version '0.8.0' + id 'org.jetbrains.kotlinx.kover' version '0.8.1' } ``` @@ -72,7 +72,7 @@ buildscript { } dependencies { - classpath("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.0") + classpath("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.1") } } @@ -91,7 +91,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.8.0' + classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.8.1' } } diff --git a/build-logic/src/main/kotlin/kotlinx/kover/conventions/kover-release-conventions.gradle.kts b/build-logic/src/main/kotlin/kotlinx/kover/conventions/kover-release-conventions.gradle.kts new file mode 100644 index 00000000..f3ddd66c --- /dev/null +++ b/build-logic/src/main/kotlin/kotlinx/kover/conventions/kover-release-conventions.gradle.kts @@ -0,0 +1,108 @@ +/* + * Copyright 2017-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +// ==================== +// Release preparation +// ==================== +tasks.register("prepareRelease") { + doLast { + if (!project.hasProperty("releaseVersion")) { + throw GradleException("Property 'releaseVersion' is required to run this task") + } + val releaseVersion = project.property("releaseVersion") as String + val prevReleaseVersion = project.property("kover.release.version") as String + + val projectDir = layout.projectDirectory + + if (project.path == Project.PATH_SEPARATOR) { + projectDir.file("gradle.properties").asFile.patchProperties(releaseVersion) + projectDir.file("CHANGELOG.md").asFile.patchChangeLog(releaseVersion) + + projectDir.file("README.md").asFile.replaceInFile(prevReleaseVersion, releaseVersion) + } else { + // replace versions in examples + projectDir.dir("examples").patchExamples(releaseVersion, prevReleaseVersion) + + // replace versions in docs + projectDir.dir("docs").patchDocs(releaseVersion, prevReleaseVersion) + } + + + } +} + +fun Directory.patchExamples(releaseVersion: String, prevReleaseVersion: String) { + asFileTree.matching { + include("**/*gradle") + include("**/*gradle.kts") + }.files.forEach { + it.replaceInFile(prevReleaseVersion, releaseVersion) + } +} + +fun Directory.patchDocs(releaseVersion: String, prevReleaseVersion: String) { + asFileTree.files.forEach { + it.replaceInFile(prevReleaseVersion, releaseVersion) + } +} + +fun File.patchChangeLog(releaseVersion: String) { + val oldContent = readText() + writer().use { + it.appendLine("$releaseVersion / ${LocalDate.now().format(DateTimeFormatter.ISO_DATE)}") + it.appendLine("===================") + it.appendLine("TODO add changelog!") + it.appendLine() + it.append(oldContent) + } +} + +fun File.patchProperties(releaseVersion: String) { + val oldLines = readLines() + writer().use { writer -> + oldLines.forEach { line -> + when { + line.startsWith("version=") -> writer.append("version=") + .appendLine(increaseSnapshotVersion(releaseVersion)) + + line.startsWith("kover.release.version=") -> writer.append("kover.release.version=") + .appendLine(releaseVersion) + + else -> writer.appendLine(line) + } + } + } +} + +// modify version '1.2.3' to '1.2.4' and '1.2.3-Beta' to '1.2.3-SNAPSHOT' +fun increaseSnapshotVersion(releaseVersion: String): String { + // remove postfix like '-Alpha' + val correctedVersion = releaseVersion.substringBefore('-') + if (correctedVersion != releaseVersion) { + return "$correctedVersion-SNAPSHOT" + } + + // split version 0.0.0 to int parts + val parts = correctedVersion.split('.') + val newVersion = parts.mapIndexed { index, value -> + if (index == parts.size - 1) { + (value.toInt() + 1).toString() + } else { + value + } + }.joinToString(".") + + return "$newVersion-SNAPSHOT" +} + +fun File.replaceInFile(old: String, new: String) { + if (name.endsWith(".png")) return + + val newContent = readText().replace(old, new) + writeText(newContent) +} + diff --git a/build.gradle.kts b/build.gradle.kts index ae6dd5ef..14437107 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,107 +14,10 @@ * limitations under the License. */ -import java.time.LocalDate -import java.time.format.DateTimeFormatter - plugins { kotlin("jvm") apply false + id("kover-release-conventions") alias(libs.plugins.kotlinx.dokka) apply false alias(libs.plugins.kotlinx.binaryCompatibilityValidator) apply false } - - -// ==================== -// Release preparation -// ==================== -tasks.register("prepareRelease") { - - doLast { - if (!project.hasProperty("releaseVersion")) { - throw GradleException("Property 'releaseVersion' is required to run this task") - } - val releaseVersion = project.property("releaseVersion") as String - val prevReleaseVersion = project.property("kover.release.version") as String - - val projectDir = layout.projectDirectory - - projectDir.file("gradle.properties").asFile.patchProperties(releaseVersion) - projectDir.file("CHANGELOG.md").asFile.patchChangeLog(releaseVersion) - - projectDir.file("README.md").asFile.replaceInFile(prevReleaseVersion, releaseVersion) - - // replace versions in examples - projectDir.dir("kover-gradle-plugin").dir("examples").patchExamples(releaseVersion, prevReleaseVersion) - projectDir.dir("kover-offline-runtime").dir("examples").patchExamples(releaseVersion, prevReleaseVersion) - - // replace versions in docs - projectDir.dir("docs").patchDocs(releaseVersion, prevReleaseVersion) - } -} - -fun Directory.patchExamples(releaseVersion: String, prevReleaseVersion: String) { - asFileTree.matching { - include("**/*gradle") - include("**/*gradle.kts") - }.files.forEach { - it.replaceInFile(prevReleaseVersion, releaseVersion) - } -} - -fun Directory.patchDocs(releaseVersion: String, prevReleaseVersion: String) { - asFileTree.files.forEach { - it.replaceInFile(prevReleaseVersion, releaseVersion) - } -} - -fun File.patchChangeLog(releaseVersion: String) { - val oldContent = readText() - writer().use { - it.appendLine("$releaseVersion / ${LocalDate.now().format(DateTimeFormatter.ISO_DATE)}") - it.appendLine("===================") - it.appendLine("TODO add changelog!") - it.appendLine() - it.append(oldContent) - } -} - -fun File.patchProperties(releaseVersion: String) { - val oldLines = readLines() - writer().use { writer -> - oldLines.forEach { line -> - when { - line.startsWith("version=") -> writer.append("version=").appendLine(increaseSnapshotVersion(releaseVersion)) - line.startsWith("kover.release.version=") -> writer.append("kover.release.version=").appendLine(releaseVersion) - else -> writer.appendLine(line) - } - } - } -} - -// modify version '1.2.3' to '1.2.4' and '1.2.3-Beta' to '1.2.3-SNAPSHOT' -fun increaseSnapshotVersion(releaseVersion: String): String { - // remove postfix like '-Alpha' - val correctedVersion = releaseVersion.substringBefore('-') - if (correctedVersion != releaseVersion) { - return "$correctedVersion-SNAPSHOT" - } - - // split version 0.0.0 to int parts - val parts = correctedVersion.split('.') - val newVersion = parts.mapIndexed { index, value -> - if (index == parts.size - 1) { - (value.toInt() + 1).toString() - } else { - value - } - }.joinToString(".") - - return "$newVersion-SNAPSHOT" -} - -fun File.replaceInFile(old: String, new: String) { - val newContent = readText().replace(old, new) - writeText(newContent) -} - diff --git a/gradle.properties b/gradle.properties index a4bab490..6399a40a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ -version=0.8.1-SNAPSHOT +version=0.8.2-SNAPSHOT group=org.jetbrains.kotlinx # version of the latest release -kover.release.version=0.8.0 +kover.release.version=0.8.1 kotlin.code.style=official diff --git a/kover-cli/build.gradle.kts b/kover-cli/build.gradle.kts index 91bb52d1..9979effb 100644 --- a/kover-cli/build.gradle.kts +++ b/kover-cli/build.gradle.kts @@ -21,6 +21,7 @@ plugins { id("kover-publishing-conventions") id("kover-docs-conventions") id("kover-fat-jar-conventions") + id("kover-release-conventions") } extensions.configure { diff --git a/kover-features-jvm/build.gradle.kts b/kover-features-jvm/build.gradle.kts index a396c46b..4f320a90 100644 --- a/kover-features-jvm/build.gradle.kts +++ b/kover-features-jvm/build.gradle.kts @@ -22,6 +22,7 @@ plugins { kotlin("jvm") alias(libs.plugins.kotlinx.binaryCompatibilityValidator) id("kover-publishing-conventions") + id("kover-release-conventions") } extensions.configure { diff --git a/kover-gradle-plugin/build.gradle.kts b/kover-gradle-plugin/build.gradle.kts index cccf09ef..7ead46a1 100644 --- a/kover-gradle-plugin/build.gradle.kts +++ b/kover-gradle-plugin/build.gradle.kts @@ -14,6 +14,7 @@ plugins { alias(libs.plugins.gradle.pluginPublish) id("kover-publishing-conventions") id("kover-docs-conventions") + id("kover-release-conventions") } repositories { diff --git a/kover-gradle-plugin/docs/index.md b/kover-gradle-plugin/docs/index.md index 3a0dd153..781b07d2 100644 --- a/kover-gradle-plugin/docs/index.md +++ b/kover-gradle-plugin/docs/index.md @@ -55,7 +55,7 @@ Add the following to your build file: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` For more information about application of the plugin, refer to the [relevant section](#apply-kover-gradle-plugin-in-project) @@ -127,7 +127,7 @@ Add the following line to build file in each module of your Gradle build: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` It is recommended to apply the Kover Plugin in the root module, even if there is no source code or tests there. @@ -225,7 +225,7 @@ Otherwise, the use of the plugin is identical to the use in the [multi-module Ko Add the following to the build file only in the `app` module of your Gradle build: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` @@ -378,7 +378,7 @@ Add the following to build file in each module of your Gradle build: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` It is recommended to apply the Kover Plugin in the root module, even if there is no source code or tests there. @@ -582,7 +582,7 @@ Add the following to build file in each module of your Gradle build: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` It is recommended to apply the Kover Plugin in the root module, even if there is no source code or tests there. @@ -759,7 +759,7 @@ Add the following to your build file: ```kotlin plugins { - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } ``` @@ -777,7 +777,7 @@ buildscript { } dependencies { - classpath("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.0") + classpath("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.1") } } @@ -793,7 +793,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.8.0' + classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.8.1' } } diff --git a/kover-gradle-plugin/docs/migrations/migration-to-0.8.0.md b/kover-gradle-plugin/docs/migrations/migration-to-0.8.0.md index d178446b..7df48f0a 100644 --- a/kover-gradle-plugin/docs/migrations/migration-to-0.8.0.md +++ b/kover-gradle-plugin/docs/migrations/migration-to-0.8.0.md @@ -1,4 +1,4 @@ -# Kover migration guide from 0.7.x to 0.8.0 +# Kover migration guide from 0.7.x to 0.8.1 - [Migration steps](#migration-steps) - [Conceptual changes](#conceptual-changes) @@ -124,7 +124,7 @@ If you use the extensions property to access the extension The `0.7.x` version used two project extensions named `kover` and `koverReports`. This was confusing and made it difficult to search through documentation or examples. -Since `0.8.0`, there is only one `kover` extension left. +Since `0.8.1`, there is only one `kover` extension left. All the settings that used to be in `koverReports` are now located in ```kotlin kover { @@ -156,7 +156,7 @@ kover { } ``` -Since `0.8.0` looks like: +Since `0.8.1` looks like: ```kotlin kover { currentProject { @@ -192,11 +192,11 @@ koverReport { } ``` -Starting with the `0.8.0` version, these features have been removed. +Starting with the `0.8.1` version, these features have been removed. However, to implement similar capabilities, the concepts of _Total reports_ and _Custom reports_ were introduced. ### Total reports -Since `0.8.0` tasks `koverHtmlReport`, `koverXmlReport`, `koverVerify`, `koverLog`, `koverBinaryReport` are designed +Since `0.8.1` tasks `koverHtmlReport`, `koverXmlReport`, `koverVerify`, `koverLog`, `koverBinaryReport` are designed to generate reports on all classes and tests of the project. For JVM projects, nothing changes compared to the `0.7.x` version, however, for Android projects, running one of these tasks will result running tests for all build variants present in the project. @@ -205,7 +205,7 @@ running one of these tasks will result running tests for all build variants pre In the `0.7.x` version, it was allowed to merge a report for several Android build variants only into default reports, it was not possible to create several combinations with the arbitrary inclusion of different build variants. -Since `0.8.0` in order to merge several Android build variants, you need to create a custom reports variant. +Since `0.8.1` in order to merge several Android build variants, you need to create a custom reports variant. The newly created variant is initially empty, in order for classes to appear in the report and tests to be executed when generating it, need to add existing variants provided from Kotlin targets to it: it can be a `jvm` variant, or any of an Android build variant. @@ -252,7 +252,7 @@ However, if you call a task for a named variant, for example `:koverHtmlReportRe and generate a report for classes of `release` variant from merging project and `:lib` project. At the same time, it is recommended that variant `release` is also present in the `:lib` project, however, -for technical reasons, such a check may not be implemented in `0.8.0` and subsequent versions. +for technical reasons, such a check may not be implemented in `0.8.1` and subsequent versions. ### The format-specific reports filters has been removed Previously, it was acceptable to override filters for each report format (XML, HTML, etc.), like @@ -277,7 +277,7 @@ koverReport { This is very confusing, because there are 3 levels in which you can write `filters { }` also it is difficult for users to understand exactly where to write filters - which leads to the fact of copy-paste the same filters are specified for all types of reports (inside xml, html, verify blocks). -Since `0.8.0`, specifying filters for specific type of report (HTML or XML) is deprecated. It is now possible to create custom variants of reports, if it is necessary to generate a report with a different set of filters. +Since `0.8.1`, specifying filters for specific type of report (HTML or XML) is deprecated. It is now possible to create custom variants of reports, if it is necessary to generate a report with a different set of filters. In this case, it is better to create a new custom variant and override the filters in it: ```kotlin kover { diff --git a/kover-gradle-plugin/examples/android/dynamic/build.gradle.kts b/kover-gradle-plugin/examples/android/dynamic/build.gradle.kts index 389e2640..fef9c296 100644 --- a/kover-gradle-plugin/examples/android/dynamic/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/dynamic/build.gradle.kts @@ -3,5 +3,5 @@ plugins { id("com.android.library") version "7.4.0" apply false id ("com.android.dynamic-feature") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false + id("org.jetbrains.kotlinx.kover") version "0.8.1" apply false } diff --git a/kover-gradle-plugin/examples/android/flavors/build.gradle.kts b/kover-gradle-plugin/examples/android/flavors/build.gradle.kts index 4e121983..41444a3b 100644 --- a/kover-gradle-plugin/examples/android/flavors/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/flavors/build.gradle.kts @@ -2,5 +2,5 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false + id("org.jetbrains.kotlinx.kover") version "0.8.1" apply false } diff --git a/kover-gradle-plugin/examples/android/minimal_groovy/build.gradle b/kover-gradle-plugin/examples/android/minimal_groovy/build.gradle index 7d4fa9c2..28085570 100644 --- a/kover-gradle-plugin/examples/android/minimal_groovy/build.gradle +++ b/kover-gradle-plugin/examples/android/minimal_groovy/build.gradle @@ -2,5 +2,5 @@ plugins { id 'com.android.application' version '7.4.0' apply false id 'com.android.library' version '7.4.0' apply false id 'org.jetbrains.kotlin.android' version '1.8.20' apply false - id 'org.jetbrains.kotlinx.kover' version '0.8.0' apply false + id 'org.jetbrains.kotlinx.kover' version '0.8.1' apply false } diff --git a/kover-gradle-plugin/examples/android/minimal_kts/build.gradle.kts b/kover-gradle-plugin/examples/android/minimal_kts/build.gradle.kts index 4e121983..41444a3b 100644 --- a/kover-gradle-plugin/examples/android/minimal_kts/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/minimal_kts/build.gradle.kts @@ -2,5 +2,5 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false + id("org.jetbrains.kotlinx.kover") version "0.8.1" apply false } diff --git a/kover-gradle-plugin/examples/android/multiplatform/build.gradle.kts b/kover-gradle-plugin/examples/android/multiplatform/build.gradle.kts index f8d55ebb..5f490a74 100644 --- a/kover-gradle-plugin/examples/android/multiplatform/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/multiplatform/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false kotlin("multiplatform") version ("1.8.20") apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } dependencies { diff --git a/kover-gradle-plugin/examples/android/multiproject-custom/build.gradle.kts b/kover-gradle-plugin/examples/android/multiproject-custom/build.gradle.kts index 5bbf4abf..371b4448 100644 --- a/kover-gradle-plugin/examples/android/multiproject-custom/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/multiproject-custom/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } dependencies { diff --git a/kover-gradle-plugin/examples/android/multiproject/build.gradle.kts b/kover-gradle-plugin/examples/android/multiproject/build.gradle.kts index 4e121983..41444a3b 100644 --- a/kover-gradle-plugin/examples/android/multiproject/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/multiproject/build.gradle.kts @@ -2,5 +2,5 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false + id("org.jetbrains.kotlinx.kover") version "0.8.1" apply false } diff --git a/kover-gradle-plugin/examples/android/variantUsage/build.gradle.kts b/kover-gradle-plugin/examples/android/variantUsage/build.gradle.kts index 4e121983..41444a3b 100644 --- a/kover-gradle-plugin/examples/android/variantUsage/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/variantUsage/build.gradle.kts @@ -2,5 +2,5 @@ plugins { id("com.android.application") version "7.4.0" apply false id("com.android.library") version "7.4.0" apply false id("org.jetbrains.kotlin.android") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false + id("org.jetbrains.kotlinx.kover") version "0.8.1" apply false } diff --git a/kover-gradle-plugin/examples/android/with-jvm/build.gradle.kts b/kover-gradle-plugin/examples/android/with-jvm/build.gradle.kts index 4567fd20..8794caef 100644 --- a/kover-gradle-plugin/examples/android/with-jvm/build.gradle.kts +++ b/kover-gradle-plugin/examples/android/with-jvm/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id("com.android.library") version "7.4.0" apply false kotlin("android") version "1.8.20" apply false kotlin("jvm") version "1.8.20" apply false - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } dependencies { diff --git a/kover-gradle-plugin/examples/jvm/merged/build.gradle.kts b/kover-gradle-plugin/examples/jvm/merged/build.gradle.kts index 1aa6b196..4b5138c1 100644 --- a/kover-gradle-plugin/examples/jvm/merged/build.gradle.kts +++ b/kover-gradle-plugin/examples/jvm/merged/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") version "1.7.10" - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } dependencies { diff --git a/kover-gradle-plugin/examples/jvm/single-kmp/build.gradle.kts b/kover-gradle-plugin/examples/jvm/single-kmp/build.gradle.kts index 91c6f9ab..dc051a87 100644 --- a/kover-gradle-plugin/examples/jvm/single-kmp/build.gradle.kts +++ b/kover-gradle-plugin/examples/jvm/single-kmp/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") version "1.9.20" - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } kotlin { diff --git a/kover-gradle-plugin/examples/jvm/single/build.gradle.kts b/kover-gradle-plugin/examples/jvm/single/build.gradle.kts index afeb2465..3ba99052 100644 --- a/kover-gradle-plugin/examples/jvm/single/build.gradle.kts +++ b/kover-gradle-plugin/examples/jvm/single/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") version "1.7.10" - id("org.jetbrains.kotlinx.kover") version "0.8.0" + id("org.jetbrains.kotlinx.kover") version "0.8.1" } dependencies { diff --git a/kover-jvm-agent/build.gradle.kts b/kover-jvm-agent/build.gradle.kts index ecde611d..4ea34375 100644 --- a/kover-jvm-agent/build.gradle.kts +++ b/kover-jvm-agent/build.gradle.kts @@ -19,6 +19,7 @@ plugins { id("kover-publishing-conventions") id("kover-fat-jar-conventions") id("kover-docs-conventions") + id("kover-release-conventions") } extensions.configure { diff --git a/kover-jvm-agent/docs/index.md b/kover-jvm-agent/docs/index.md index 34866b17..543d85e3 100644 --- a/kover-jvm-agent/docs/index.md +++ b/kover-jvm-agent/docs/index.md @@ -16,7 +16,7 @@ To get a readable coverage report, you need to: 2. Put JVM agent jar file in a local directory (Important! renaming a jar file is not allowed). 3. Create a file with agent arguments, [learn more about the arguments](#kover-jvm-arguments-file). 4. Add an argument to the java application startup command `-javaagent:=file:`. - Example of an application launch command `java -jar application.jar -javaagent:/opt/kover-jvm-agent-0.7.6.jar=file:/tmp/agent.args`. + Example of an application launch command `java -jar application.jar -javaagent:/opt/kover-jvm-agent-0.8.1.jar=file:/tmp/agent.args`. ## Kover JVM arguments file The arguments file is a set of settings, each of which is written on a new line. diff --git a/kover-offline-runtime/build.gradle.kts b/kover-offline-runtime/build.gradle.kts index 7afd1d6a..e9628c11 100644 --- a/kover-offline-runtime/build.gradle.kts +++ b/kover-offline-runtime/build.gradle.kts @@ -19,6 +19,7 @@ plugins { id("kover-publishing-conventions") id("kover-docs-conventions") id("kover-fat-jar-conventions") + id("kover-release-conventions") } extensions.configure { diff --git a/kover-offline-runtime/docs/index.md b/kover-offline-runtime/docs/index.md index fa2b46ad..b2d3e74e 100644 --- a/kover-offline-runtime/docs/index.md +++ b/kover-offline-runtime/docs/index.md @@ -20,7 +20,7 @@ must be passed to Kover CLI as arguments, see [Kover CLI](../cli#offline-instrum #### Instrumentation by Kover Features Kover Features is a library that provides capabilities similar to Kover CLI and Kover Gradle plugin. -You can declare a dependency on Kover Features using following coordinates: `org.jetbrains.kotlinx:kover-features-jvm:0.7.6`. +You can declare a dependency on Kover Features using following coordinates: `org.jetbrains.kotlinx:kover-features-jvm:0.8.1`. Then you can use the Kover Features classes to instrument the bytecode of each class: ```kotlin @@ -113,8 +113,8 @@ configurations.register("koverCli") { } dependencies { - runtimeOnly("org.jetbrains.kotlinx:kover-offline-runtime:0.7.6") - add("koverCli", "org.jetbrains.kotlinx:kover-cli:0.7.6") + runtimeOnly("org.jetbrains.kotlinx:kover-offline-runtime:0.8.1") + add("koverCli", "org.jetbrains.kotlinx:kover-cli:0.8.1") testImplementation(kotlin("test")) } diff --git a/kover-offline-runtime/examples/runtime-api/build.gradle.kts b/kover-offline-runtime/examples/runtime-api/build.gradle.kts index 5006079d..c3afb1c9 100644 --- a/kover-offline-runtime/examples/runtime-api/build.gradle.kts +++ b/kover-offline-runtime/examples/runtime-api/build.gradle.kts @@ -16,9 +16,9 @@ configurations.register("koverCli") { } dependencies { - add("koverCli", "org.jetbrains.kotlinx:kover-cli:0.8.0") + add("koverCli", "org.jetbrains.kotlinx:kover-cli:0.8.1") - implementation("org.jetbrains.kotlinx:kover-offline-runtime:0.8.0") + implementation("org.jetbrains.kotlinx:kover-offline-runtime:0.8.1") testImplementation(kotlin("test")) }