release/api-compatibility/kotlin
A library checks its API against the previous release
Implements release/api-compatibility for kotlin.
| Severity | info |
| Tiers | 1 |
| Stacks | kotlin |
| Scope | root |
| Kind | outcome |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
A Gradle build that publishes with maven-publish checks its ABI: the Kotlin Gradle plugin’s abiValidation (or the binary-compatibility-validator plugin) with committed .api dumps, or japicmp.
Why
A breaking change in a minor release is found by every user at once; the check finds it before the tag.
Applies when
grep("**/build.gradle*", "maven-publish").size() > 0Fix
Enable abiValidation in the Kotlin Gradle plugin (or apply binary-compatibility-validator), commit the api/ dumps and let ./gradlew check run the ABI check.
Agent instruction: Add the stack’s API compatibility tool to the release workflow, comparing against the latest tag; on a breaking change bump the major version instead of silencing the tool.
A finding of this rule points at the file (["build.gradle.kts", "build.gradle"].filter(f, file(f)) + ["build.gradle.kts"])[0] yields.
Sources
- https://semver.org/spec/v2.0.0.html (standard)
- https://fleetlint.org/baseline/#releases (convention)
- https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html (spec)
- https://github.com/Kotlin/binary-compatibility-validator (spec)
- https://fleetlint.org/stacks/#kotlin-jvm–android
Generated by fleetlint docs from catalog v0.6.0.