检测 API 更改/演变 [英] Detecting API changes/evolution
问题描述
我想衡量给定 Java 项目的 API 演变,特别是新/重命名的类、新方法、新弃用的方法等.是否有检测此类变化的工具?
I want to measure API evolution for a given Java project, in particular new/renamed classes, new methods, newly deprecated methods, etc. Is there a tool that detect such changes?
早在 2007 年,一个 Google GSoc 项目 开始了,但是我找不到最终的作品.
Back in 2007, a Google GSoc project was initiated, however, I cannot find the final work.
推荐答案
为此我会使用 Clirr,二进制兼容性检查器.来自 Clirr 网站:
I'd use Clirr for that, a binary compatibility checker. From the Clirr web site:
Clirr 是一个检查 Java 的工具二进制和源代码库与旧版本的兼容性.基本上你给它两套罐子文件和 Clirr 转储出一个列表公共api的变化.克莱尔Ant任务可以配置为break如果检测到不兼容,则构建api 变化.在连续集成过程 Clirr 可以自动防止意外二进制或源代码的介绍兼容性问题.
What is it?
Clirr is a tool that checks Java libraries for binary and source compatibility with older releases. Basically you give it two sets of jar files and Clirr dumps out a list of changes in the public api. The Clirr Ant task can be configured to break the build if it detects incompatible api changes. In a continuous integration process Clirr can automatically prevent accidental introduction of binary or source compatibility problems.
...
- 报告所有 API 更改(目前仅部分实施)
- 评估每个更改.二进制和源代码兼容性
- 支持纯文本和 XML 报告
- 灵活的故障处理(警告与错误、破坏构建或设置错误属性)
这篇关于检测 API 更改/演变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!