{"id":13625041,"url":"https://github.com/Kotlin/kotlinx-kover","last_synced_at":"2025-04-16T06:31:36.041Z","repository":{"id":37461022,"uuid":"394574917","full_name":"Kotlin/kotlinx-kover","owner":"Kotlin","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-17T16:34:32.000Z","size":2210,"stargazers_count":1432,"open_issues_count":61,"forks_count":52,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-11T21:46:09.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kotlin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.TXT","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-10T08:10:42.000Z","updated_at":"2025-04-10T13:49:36.000Z","dependencies_parsed_at":"2023-09-23T11:19:27.357Z","dependency_job_id":"772b3c4d-4c02-41a5-85e8-518d55b1dd7e","html_url":"https://github.com/Kotlin/kotlinx-kover","commit_stats":{"total_commits":231,"total_committers":21,"mean_commits":11.0,"dds":"0.11688311688311692","last_synced_commit":"b9f3f1c651a5dcf6cd35f2690b2c7a3ec1111ade"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx-kover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx-kover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx-kover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx-kover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kotlin","download_url":"https://codeload.github.com/Kotlin/kotlinx-kover/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249156846,"owners_count":21221841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:50.162Z","updated_at":"2025-04-16T06:31:36.033Z","avatar_url":"https://github.com/Kotlin.png","language":"Kotlin","funding_links":[],"categories":["代码覆盖率","others","Kotlin"],"sub_categories":[],"readme":"# Kover\n\n[![Kotlin Beta](https://kotl.in/badges/beta.svg)](https://kotlinlang.org/docs/components-stability.html)\n[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n\nKover is a set of solutions for collecting test coverage of Kotlin code compiled for JVM and Android platforms.\n\nKover Toolset:\n- [Kover Gradle Plugin](#kover-gradle-plugin)\n- [Kover Maven Plugin](#kover-maven-plugin)\n- [Kover CLI](#kover-cli)\n- [Kover offline instrumentation](#kover-offline-instrumentation)\n- [Kover JVM agent](#kover-jvm-agent)\n- [Kover features artifact](#kover-features-artifact)\n\n## Kover Gradle Plugin\nFor full information about latest stable release of Kover Gradle Plugin, please refer to the [documentation](https://kotlin.github.io/kotlinx-kover/gradle-plugin).\n\n### Features\n\n* Collection of code coverage through `JVM` tests (JS and native targets are not supported yet).\n* Generating `HTML` and `XML` reports.\n* Support for `Kotlin JVM`, `Kotlin Multiplatform` projects.\n* Support for `Kotlin Android` projects with build variants (instrumentation tests executing on the Android device are not supported yet).\n* Support mixed `Kotlin` and `Java` sources\n* Verification rules with bounds in the Gradle plugin to keep track of coverage.\n* Using JaCoCo library in Gradle plugin as an alternative for coverage measuring and report generation.\n\nThe recommended way of applying Kover is with the\n[plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block).\n\nMinimum supported version of `Gradle` is `6.8`.\n\nAdd the following to your top-level build file:\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin\u003c/summary\u003e\n\n```kotlin\nplugins {\n     id(\"org.jetbrains.kotlinx.kover\") version \"0.9.1\"\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy\u003c/summary\u003e\n\n```groovy\nplugins {\n    id 'org.jetbrains.kotlinx.kover' version '0.9.1'\n}\n```\n\u003c/details\u003e\n\nAfter you applied Kover Gradle plugin, Kover tasks will be created for generating reports and verification. \nE.g. to generate HTML report run `./gradlew koverHtmlReport` - this will automatically start code compilation, execution of instrumented tests, and an HTML report will be generated with measurement results in the build folder.\n\nIt is also important that after applying Kover Gradle plugin, during the running tests, the classes are modified (instrumented) when loaded into the JVM which may lead to some performance degradation, or affect concurrent tests.\n\n### Legacy Plugin Application\n\n[Legacy method](https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application) of applying plugins\ncan be used if you cannot use the plugins DSL for some reason.\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin\u003c/summary\u003e\n\n```kotlin\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n\n    dependencies {\n        classpath(\"org.jetbrains.kotlinx:kover-gradle-plugin:0.9.1\")\n    }\n}\n\napply(plugin = \"org.jetbrains.kotlinx.kover\")\n\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy\u003c/summary\u003e\n\n```groovy\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.9.1'\n    }\n}\n  \napply plugin: 'org.jetbrains.kotlinx.kover'\n```\n\u003c/details\u003e\n\n\n### To create report combining coverage info from different Gradle projects\nYou have to add dependency on the project, in which the report task will be run\n```groovy\ndependencies {\n  kover(project(\":another:project\"))\n}\n```\n\nin this case report will be generated for current project joined with `:another:project` project.\n\n**More examples of Gradle plugin applying can be found in [example folder](kover-gradle-plugin/examples)**\n\n## Kover Aggregated Plugin\nKover Aggregated Plugin as a prototype of Gradle Settings plugin, created to simplify the setup of multi-project builds. \nIt is in its infancy, it is recommended to use it only for test or pet projects.\n\nRefer to the [documentation](https://kotlin.github.io/kotlinx-kover/gradle-plugin/aggregated.html) for details. \n\n## Kover Maven Plugin\nThe Kover Maven Plugin can be applied by specifying build plugin\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.jetbrains.kotlinx\u003c/groupId\u003e\n    \u003cartifactId\u003ekover-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e0.9.1\u003c/version\u003e\n\u003c/plugin\u003e\n```\n\nThe list of Kover goals is specified in [this document section](https://kotlin.github.io/kotlinx-kover/maven-plugin#goals).\n\nFor full information about latest stable release of Kover Maven Plugin, please refer to the [documentation](https://kotlin.github.io/kotlinx-kover/maven-plugin).\n\n\n## Kover CLI\nStandalone JVM application used for offline instrumentation and generation of human-readable reports.\n\n[Documentation of the Kover CLI](https://kotlin.github.io/kotlinx-kover/cli).\n\n## Kover offline instrumentation\nOffline instrumentation is the modification of class-files stored on disk to measure their coverage.\n\nThe ways of offline instrumentation and running of the instrumented applications are described in the [documentation](https://kotlin.github.io/kotlinx-kover/offline-instrumentation).\n\n## Kover JVM agent\nJVM agent is a jar file that modifies the bytecode of loaded into the JVM classes in order to measure coverage.\n[Documentations](https://kotlin.github.io/kotlinx-kover/jvm-agent).\n\n## Kover features artifact\nA JVM dependency that allows to programmatically instrument class-files on a disk.\n\n[Documentation of Kover features artifact](https://kotlin.github.io/kotlinx-kover/offline-instrumentation/#instrumentation-by-kover-features)\n\n## Building locally and Contributing\n\nSee [Contributing Guidelines](https://github.com/Kotlin/kotlinx-kover/tree/main/CONTRIBUTING.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKotlin%2Fkotlinx-kover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKotlin%2Fkotlinx-kover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKotlin%2Fkotlinx-kover/lists"}