KMP Coverage
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run the Kover coverage a Kotlin Multiplatform (Android + iOS) project has wired and report exact, measured line/branch coverage for the requested scope — per class, per module and for the whole project. This is a report-only skill: it never adds tests or modifies source, test or build files.
Purpose
iru-kmp-coverage checks whether the Kover Gradle plugin is wired (root aggregation via
dependencies { kover(project(":x")) }, per-module only, or not at all), runs the matching koverXmlReport task,
and parses the JaCoCo-format XML into totals, per-module and per-class line/branch percentages — each class mapped
back to its module and source set — plus the uncovered line numbers of classes under the bar. Coverage comes from
the JVM test runs only (Android host tests, jvmTest, the app’s testDebugUnitTest, which Kover triggers itself).
Kotlin/Native has no coverage tool, so iosMain/appleMain/nativeMain code is listed as "not measurable" and
never fails the gate, while commonMain code is measured through the JVM targets' runs of commonTest. When Kover
is absent it reports "coverage not wired" naming what is missing, never a false 0% or 100%. It is the KMP
equivalent of Android Coverage and the Kover path of Java Coverage.
Plugin
Shipped by the iru-kmp plugin of the ai-catalog marketplace (install with /plugin install iru-kmp@ai-catalog; see Plugins).
Invocation
/iru-kmp-coverage
/iru-kmp-coverage [scope]
/iru-kmp-coverage [scope]
tests: <pattern>
bar: <percent>
module: <gradle path>
ios-app: yes|no
lock: held
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Comma-separated class simple names ( |
None — the whole project. |
|
No |
A Gradle |
Whole suite |
|
No |
Line-coverage threshold in percent used for the |
80 |
|
No |
Restrict the run to one Gradle module. |
All modules |
|
No |
|
|
|
No |
|
Not held |
Report task by setup (Step 2):
| Setup | Command | XML |
|---|---|---|
Root aggregation |
|
|
KMP module, all JVM targets |
|
|
KMP module, Android target only |
|
|
Android app module, debug variant |
|
|
Outputs
-
A plain-text report in the conversation — never a written file.
-
The engine and setup used (root aggregation or per-module), the report path(s), and the test pattern if
tests:narrowed the run. -
Total, per-module and per in-scope class line/branch percentages taken from the XML counters, each judged against
bar; for classes under the bar, their uncovered line numbers. -
Not measurable: every Kotlin/Native source set with code (e.g.
shared:iosMain), stated as excluded from the gate rather than as 0%. -
Coverage not wired (naming what is missing) instead of any percentage when no Kover is found.
-
The informational
iosAppSwift figure whenios-app: yes, or why it was skipped. -
No tests, source or build files are ever added or modified.
Execution flow
Dependencies
Invokes
None — iru-kmp-coverage is a leaf skill; it only runs Gradle, xcodebuild/xccov and inline python3 parsing,
and it does not call any other skill in this catalog. It reuses the prerequisite checks, --tests semantics and
lock protocol described in KMP Test by reference only.
Invoked by
-
KMP Code One Task Group — Step 3.4, the 80% line-coverage gate for the classes the bucket touched, through the
iru-gate-runneragent. -
KMP Generate All Tests — Step 3, to measure real coverage for every candidate class in one pass (and again when re-measuring in Step 6), through the
iru-gate-runneragent.
Related agents
-
iru-gate-runner— both callers always run this skill from inside aniru-gate-runnersub-agent, so the large Kover report never lands in their own context.
Source
SKILL.md on GitHub — the file this page was generated from.