release/api-compatibility/java
A library checks its API against the previous release
Implements release/api-compatibility for java.
| Severity | info |
| Tiers | 1 |
| Stacks | java |
| Scope | root |
| Kind | outcome |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
A library published with maven-publish or Maven deploy runs japicmp or revapi against the previous release.
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() > 0 || grep("**/pom.xml", "<distributionManagement>").size() > 0Fix
Add japicmp-maven-plugin (or me.champeau.gradle.japicmp) comparing against the previous release version.
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 (["pom.xml", "build.gradle.kts", "build.gradle"].filter(f, file(f)) + ["pom.xml"])[0] yields.
Sources
- https://semver.org/spec/v2.0.0.html (standard)
- https://fleetlint.org/baseline/#releases (convention)
- https://siom79.github.io/japicmp/ (spec)
- https://fleetlint.org/stacks/#java
Generated by fleetlint docs from catalog v0.6.0.