Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toolVersion property is not considered input for cache/up-to-date checks #1239

Open
davidburstrom opened this issue Aug 29, 2024 · 0 comments

Comments

@davidburstrom
Copy link

Changing the toolVersion will not force the SpotBugs plugin to execute the tasks again. This can be problematic for example when bumping SpotBugs version automatically in CI, where new detectors won't flag newly discovered issues. The provided zip-file is a standalone project that reproduces the issue. This happens on all tested versions of the SpotBugs Gradle plugin, even the latest.

  1. Run ./gradlew :spotbugsMain, it will pass correctly.
  2. Change toolVersion to "4.8.3"
  3. Run ./gradlew :spotbugsMain, it will pass incorrectly.
  4. Run ./gradlew :spotbugsMain --rerun-tasks, it will fail correctly.
  5. Run ./gradlew :spotbugsMain, it will fail correctly.

Seemingly, the problem is that the tool version property is not propagated as task input in any way, either as-is or as part of a classpath.

spotbugs-gradle-plugin-toolversion-input-bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant