gpt4 book ai didi

java - 检测 API 变化/演变

转载 作者:行者123 更新时间:2023-12-02 05:06:58 27 4
gpt4 key购买 nike

我想测量给定 Java 项目的 API 演变,特别是新/重命名的类、新方法、新弃用的方法等。是否有工具可以检测此类更改?

早在 2007 年,一个 Google GSoc project发起了,但是我找不到最终的作品。

最佳答案

我会使用Clirr为此,需要一个二进制兼容性检查器。来自 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.

...

Features

  • Report all API changes (currently only partially implemented)
  • Evaluate each change wrt. binary and source compatibility
  • support plain text and XML reports
  • Flexible failure handling (warnings vs. errors, break the build or set error property)

关于java - 检测 API 变化/演变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56344671/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com