@groovy.transform.CompileStatic class SpotbugsExclusionConfigProvider extends java.lang.Object
Previously, exclusion config was calculated in doFirst hook of spotbugs task (just before task execution), but the new spotbugs plugin use gradle properties and now value can't be set in doFirst callback! Have to use property provider instead. This provider is called multiple times and in different time (before all tasks execution).
One side effect of this shift caused by clean task which removes temporary copied configs, so we have now to always check for already generated config existence and re-create it if removed. Overall, callback tries to avoid redundant actions as much as possible.
Temporary exclusion file is generated ahead of time (when it can't be checked for sure) because it is called too early (so rely only on specified exclusions and not on how they apply). In warse case temporary exclusion would be a copy of default exclusion file (if no actual exclusions performed).
| Type | Name and description |
|---|---|
java.io.File |
computed |
QualityExtension |
extension |
ConfigLoader |
loader |
com.github.spotbugs.snom.SpotBugsTask |
task |
| Constructor and description |
|---|
SpotbugsExclusionConfigProvider
(com.github.spotbugs.snom.SpotBugsTask task, ConfigLoader loader, QualityExtension extension) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
org.gradle.api.file.RegularFile |
call() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Groovy Documentation