spotbugs / spotbugs-gradle-plugin

https://plugins.gradle.org/plugin/com.github.spotbugs
Apache License 2.0
180 stars 68 forks source link

Spotbugs auxClassPaths eagerly resolves SourceSet compileClasspath default #743

Open lennartfricke opened 2 years ago

lennartfricke commented 2 years ago

We realized that a changed compileClasspath in a sourceSet is not recognized by the spotbugs plugin.

Like when doing: main { compileClasspath = ... }

This seems to be because the SpotbugsTaskFactory set the auxClassPaths to the value encountered on creation. Maybe it would be better to resolve the compileClasspath lazily.

lennartfricke commented 2 years ago

There are some similarities to #135