Code coverage for what matters — your changes.
Delta Coverage is a Gradle plugin that computes code coverage of new/modified code based on a git diff. Focus on testing what you've changed, not the entire codebase.
1. Apply the plugin (root project)
plugins {
id("io.github.gw-kit.delta-coverage") version "3.6.0"
}2. Configure diff source
configure<io.github.surpsg.deltacoverage.gradle.DeltaCoverageConfiguration> {
diffSource.git.compareWith.set("refs/remotes/origin/main")
}3. Run
./gradlew test deltaCoverageReports are generated in build/reports/coverage-reports/.
| Delta Coverage | Gradle | Min JVM |
|---|---|---|
| 3.x | 7.6.4+ | 17 |
| 2.5.x | 6.7.1 - 8.10.2 | 11 |
- delta-coverage-action — GitHub Action for PR comments
- delta-coverage-cli — Standalone CLI tool
- cover-jet-plugin — IntelliJ coverage for Gradle
MIT
