FindBugs (Gradle API 5.0)
Date: 2018-11-26

Package org.gradle.api.plugins.quality

## Class FindBugs

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.api.internal.ConventionTask
      - - org.gradle.api.tasks.SourceTask
        - - org.gradle.api.plugins.quality.FindBugs

- All Implemented Interfaces:
    `Reporting<FindBugsReports>`, `PatternFilterable`, `VerificationTask`

  Deprecated.
  FindBugs is unmaintained and does not support bytecode compiled for Java 9 and above.

      @Deprecated
      @CacheableTask
      public class FindBugs
      extends SourceTask
      implements VerificationTask, Reporting<FindBugsReports>

  Analyzes code with FindBugs. See the FindBugs Manual for additional information on configuration options.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FindBugs​()` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FindBugs` | `extraArgs​(java.lang.Iterable<java.lang.String> arguments)` | Deprecated. Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.
    `FindBugs` | `extraArgs​(java.lang.String... arguments)` | Deprecated. Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.
    `protected FileCollection` | `getCandidateClassFiles​()` | Deprecated. The classes to be analyzed.
    `FileCollection` | `getClasses​()` | Deprecated. The class directories to be analyzed.
    `FileCollection` | `getClasspath​()` | Deprecated. Compile class path for the classes to be analyzed.
    `java.lang.String` | `getEffort​()` | Deprecated. The analysis effort level.
    `java.io.File` | `getExcludeBugsFilter​()` | Deprecated. The filename of a filter specifying baseline bugs to exclude from being reported.
    `TextResource` | `getExcludeBugsFilterConfig​()` | Deprecated. A filter specifying baseline bugs to exclude from being reported.
    `java.io.File` | `getExcludeFilter​()` | Deprecated. The filename of a filter specifying bugs to exclude from being reported.
    `TextResource` | `getExcludeFilterConfig​()` | Deprecated. A filter specifying bugs to exclude from being reported.
    `java.util.Collection<java.lang.String>` | `getExtraArgs​()` | Deprecated. Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.
    `FileCollection` | `getFindbugsClasspath​()` | Deprecated. Class path holding the FindBugs library.
    `boolean` | `getIgnoreFailures​()` | Deprecated. Whether to allow the build to continue if there are warnings.
    `java.io.File` | `getIncludeFilter​()` | Deprecated. The filename of a filter specifying which bugs are reported.
    `TextResource` | `getIncludeFilterConfig​()` | Deprecated. A filter specifying which bugs are reported.
    `java.util.Collection<java.lang.String>` | `getJvmArgs​()` | Deprecated. Any additional arguments to be passed along to FindBugs JVM process.
    `java.lang.String` | `getMaxHeapSize​()` | Deprecated. The maximum heap size for the forked findbugs process (ex: '1g').
    `protected ObjectFactory` | `getObjectFactory​()` | Deprecated.
    `java.util.Collection<java.lang.String>` | `getOmitVisitors​()` | Deprecated. Similar to `visitors` except that it specifies bug detectors which should not be run.
    `FileCollection` | `getPluginClasspath​()` | Deprecated. Class path holding any additional FindBugs plugins.
    `java.lang.String` | `getReportLevel​()` | Deprecated. The priority threshold for reporting bugs.
    `FindBugsReports` | `getReports​()` | Deprecated. The reports to be generated by this task.
    `boolean` | `getShowProgress​()` | Deprecated. Indicates whether analysis progress should be rendered on standard output.
    `FileTree` | `getSource​()` | Deprecated. Returns the source for this task, after the include and exclude patterns have been applied.
    `java.util.Collection<java.lang.String>` | `getVisitors​()` | Deprecated. The bug detectors which should be run.
    `org.gradle.process.internal.worker.WorkerProcessFactory` | `getWorkerProcessBuilderFactory​()` | Deprecated.
    `FindBugs` | `jvmArgs​(java.lang.Iterable<java.lang.String> arguments)` | Deprecated. Any additional arguments to be passed along to FindBugs JVM process.
    `FindBugs` | `jvmArgs​(java.lang.String... arguments)` | Deprecated. Any additional arguments to be passed along to FindBugs JVM process.
    `FindBugsReports` | `reports​(groovy.lang.Closure closure)` | Deprecated. Configures the reports to be generated by this task.
    `FindBugsReports` | `reports​(Action<? super FindBugsReports> configureAction)` | Deprecated. Configures the reports to be generated by this task.
    `void` | `run​()` | Deprecated.
    `void` | `setClasses​(FileCollection classes)` | Deprecated. The class directories to be analyzed.
    `void` | `setClasspath​(FileCollection classpath)` | Deprecated. Compile class path for the classes to be analyzed.
    `void` | `setEffort​(java.lang.String effort)` | Deprecated. The analysis effort level.
    `void` | `setExcludeBugsFilter​(java.io.File filter)` | Deprecated. The filename of a filter specifying baseline bugs to exclude from being reported.
    `void` | `setExcludeBugsFilterConfig​(TextResource excludeBugsFilterConfig)` | Deprecated. A filter specifying baseline bugs to exclude from being reported.
    `void` | `setExcludeFilter​(java.io.File filter)` | Deprecated. The filename of a filter specifying bugs to exclude from being reported.
    `void` | `setExcludeFilterConfig​(TextResource excludeFilterConfig)` | Deprecated. A filter specifying bugs to exclude from being reported.
    `void` | `setExtraArgs​(java.util.Collection<java.lang.String> extraArgs)` | Deprecated. Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.
    `void` | `setFindbugsClasspath​(FileCollection findbugsClasspath)` | Deprecated. Class path holding the FindBugs library.
    `void` | `setIgnoreFailures​(boolean ignoreFailures)` | Deprecated. Whether to allow the build to continue if there are warnings.
    `void` | `setIncludeFilter​(java.io.File filter)` | Deprecated. The filename of a filter specifying which bugs are reported.
    `void` | `setIncludeFilterConfig​(TextResource includeFilterConfig)` | Deprecated. A filter specifying which bugs are reported.
    `void` | `setJvmArgs​(java.util.Collection<java.lang.String> jvmArgs)` | Deprecated. Any additional arguments to be passed along to FindBugs JVM process.
    `void` | `setMaxHeapSize​(java.lang.String maxHeapSize)` | Deprecated. The maximum heap size for the forked findbugs process (ex: '1g').
    `void` | `setOmitVisitors​(java.util.Collection<java.lang.String> omitVisitors)` | Deprecated. Similar to `visitors` except that it specifies bug detectors which should not be run.
    `void` | `setPluginClasspath​(FileCollection pluginClasspath)` | Deprecated. Class path holding any additional FindBugs plugins.
    `void` | `setReportLevel​(java.lang.String reportLevel)` | Deprecated. The priority threshold for reporting bugs.
    `void` | `setShowProgress​(boolean showProgress)` | Deprecated. Indicates whether analysis progress should be rendered on standard output.
    `void` | `setVisitors​(java.util.Collection<java.lang.String> visitors)` | Deprecated. The bug detectors which should be run.

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString`

    - ### Methods inherited from class org.gradle.api.internal.ConventionTask

      `conventionMapping, conventionMapping, getConventionMapping`

    - ### Methods inherited from class org.gradle.api.DefaultTask

      `newInputDirectory, newInputFile, newOutputDirectory, newOutputFile`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from class org.gradle.api.tasks.SourceTask

      `exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, source`

- - ### Constructor Detail

    - #### FindBugs

          public FindBugs​()

      Deprecated.

  - ### Method Detail

    - #### getObjectFactory

          @Inject
          protected ObjectFactory getObjectFactory​()

      Deprecated.

    - #### getWorkerProcessBuilderFactory

          @Inject
          public org.gradle.process.internal.worker.WorkerProcessFactory getWorkerProcessBuilderFactory​()

      Deprecated.

    - #### getReports

          public FindBugsReports getReports​()

      Deprecated.
      The reports to be generated by this task.
      Specified by:
        `getReports` in interface `Reporting<FindBugsReports>`
      Returns:
        The reports container

    - #### reports

          public FindBugsReports reports​(groovy.lang.Closure closure)

      Deprecated.
      Configures the reports to be generated by this task. The contained reports can be configured by name and closures. Example:

           findbugsTask {
             reports {
               xml {
                 destination "build/findbugs.xml"
               }
             }
           }

      Specified by:
        `reports` in interface `Reporting<FindBugsReports>`
      Parameters:
        `closure` - The configuration
      Returns:
        The reports container

    - #### reports

          public FindBugsReports reports​(Action<? super FindBugsReports> configureAction)

      Deprecated.
      Configures the reports to be generated by this task. The contained reports can be configured by name and closures. Example:

           findbugsTask {
             reports {
               xml {
                 destination "build/findbugs.xml"
               }
             }
           }

      Specified by:
        `reports` in interface `Reporting<FindBugsReports>`
      Parameters:
        `configureAction` - The configuration
      Returns:
        The reports container

    - #### getIncludeFilter

          @Internal
          @Nullable
          public java.io.File getIncludeFilter​()

      Deprecated.
      The filename of a filter specifying which bugs are reported.

    - #### setIncludeFilter

          public void setIncludeFilter​(java.io.File filter)

      Deprecated.
      The filename of a filter specifying which bugs are reported.

    - #### getExcludeFilter

          @Nullable
          @Internal
          public java.io.File getExcludeFilter​()

      Deprecated.
      The filename of a filter specifying bugs to exclude from being reported.

    - #### setExcludeFilter

          public void setExcludeFilter​(java.io.File filter)

      Deprecated.
      The filename of a filter specifying bugs to exclude from being reported.

    - #### getExcludeBugsFilter

          @Nullable
          @Internal
          public java.io.File getExcludeBugsFilter​()

      Deprecated.
      The filename of a filter specifying baseline bugs to exclude from being reported.

    - #### setExcludeBugsFilter

          public void setExcludeBugsFilter​(java.io.File filter)

      Deprecated.
      The filename of a filter specifying baseline bugs to exclude from being reported.

    - #### run

          public void run​()
                   throws java.io.IOException,
                          java.lang.InterruptedException

      Deprecated.
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

    - #### extraArgs

          public FindBugs extraArgs​(java.lang.Iterable<java.lang.String> arguments)

      Deprecated.
      Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.

      Extra arguments are passed to FindBugs after the arguments Gradle understands (like `effort` but before the list of classes to analyze. This should only be used for arguments that cannot be provided by Gradle directly. Gradle does not try to interpret or validate the arguments before passing them to FindBugs.

      See the FindBugs TextUICommandLine source for available options.

      Since:
        2.6

    - #### extraArgs

          public FindBugs extraArgs​(java.lang.String... arguments)

      Deprecated.
      Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.

      Extra arguments are passed to FindBugs after the arguments Gradle understands (like `effort` but before the list of classes to analyze. This should only be used for arguments that cannot be provided by Gradle directly. Gradle does not try to interpret or validate the arguments before passing them to FindBugs.

      See the FindBugs TextUICommandLine source for available options.

      Since:
        2.6

    - #### jvmArgs

          @Incubating
          public FindBugs jvmArgs​(java.lang.Iterable<java.lang.String> arguments)

      Deprecated.
      Any additional arguments to be passed along to FindBugs JVM process.

      Arguments can contain general JVM flags like `-Xdebug` and also FindBugs system properties like `-Dfindbugs.loadPropertiesFrom=...`

      Since:
        4.3

    - #### jvmArgs

          @Incubating
          public FindBugs jvmArgs​(java.lang.String... arguments)

      Deprecated.
      Any additional arguments to be passed along to FindBugs JVM process.

      Arguments can contain general JVM flags like `-Xdebug` and also FindBugs system properties like `-Dfindbugs.loadPropertiesFrom=...`

      Since:
        4.3

    - #### getSource

          @PathSensitive(RELATIVE)
          public FileTree getSource​()

      Deprecated.
      Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.

      The `PathSensitivity` for the sources is configured to be `PathSensitivity.ABSOLUTE`. If your sources are less strict, please change it accordingly by overriding this method in your subclass.

      Overrides:
        `getSource` in class `SourceTask`
      Returns:
        The source.

    - #### getCandidateClassFiles

          @SkipWhenEmpty
          @PathSensitive(RELATIVE)
          @InputFiles
          protected FileCollection getCandidateClassFiles​()

      Deprecated.
      The classes to be analyzed.

    - #### getClasses

          @Internal
          public FileCollection getClasses​()

      Deprecated.
      The class directories to be analyzed.

    - #### setClasses

          public void setClasses​(FileCollection classes)

      Deprecated.
      The class directories to be analyzed.

    - #### getClasspath

          @Classpath
          public FileCollection getClasspath​()

      Deprecated.
      Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves.

    - #### setClasspath

          public void setClasspath​(FileCollection classpath)

      Deprecated.
      Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves.

    - #### getFindbugsClasspath

          @Classpath
          public FileCollection getFindbugsClasspath​()

      Deprecated.
      Class path holding the FindBugs library.

    - #### setFindbugsClasspath

          public void setFindbugsClasspath​(FileCollection findbugsClasspath)

      Deprecated.
      Class path holding the FindBugs library.

    - #### getPluginClasspath

          @Classpath
          public FileCollection getPluginClasspath​()

      Deprecated.
      Class path holding any additional FindBugs plugins.

    - #### setPluginClasspath

          public void setPluginClasspath​(FileCollection pluginClasspath)

      Deprecated.
      Class path holding any additional FindBugs plugins.

    - #### getIgnoreFailures

          public boolean getIgnoreFailures​()

      Deprecated.
      Whether to allow the build to continue if there are warnings.
      Specified by:
        `getIgnoreFailures` in interface `VerificationTask`
      Returns:
        false, when the build should break on failure, true when the failures should be ignored.

    - #### setIgnoreFailures

          public void setIgnoreFailures​(boolean ignoreFailures)

      Deprecated.
      Whether to allow the build to continue if there are warnings.
      Specified by:
        `setIgnoreFailures` in interface `VerificationTask`
      Parameters:
        `ignoreFailures` - false to break the build on failure, true to ignore the failures. The default is false.

    - #### getEffort

          @Nullable
          @Optional
          @Input
          public java.lang.String getEffort​()

      Deprecated.
      The analysis effort level. The value specified should be one of `min`, `default`, or `max`. Higher levels increase precision and find more bugs at the expense of running time and memory consumption.

    - #### setEffort

          public void setEffort​(@Nullable
                                java.lang.String effort)

      Deprecated.
      The analysis effort level. The value specified should be one of `min`, `default`, or `max`. Higher levels increase precision and find more bugs at the expense of running time and memory consumption.

    - #### getReportLevel

          @Nullable
          @Optional
          @Input
          public java.lang.String getReportLevel​()

      Deprecated.
      The priority threshold for reporting bugs. If set to `low`, all bugs are reported. If set to `medium` (the default), medium and high priority bugs are reported. If set to `high`, only high priority bugs are reported.

    - #### setReportLevel

          public void setReportLevel​(@Nullable
                                     java.lang.String reportLevel)

      Deprecated.
      The priority threshold for reporting bugs. If set to `low`, all bugs are reported. If set to `medium` (the default), medium and high priority bugs are reported. If set to `high`, only high priority bugs are reported.

    - #### getMaxHeapSize

          @Nullable
          @Optional
          @Input
          public java.lang.String getMaxHeapSize​()

      Deprecated.
      The maximum heap size for the forked findbugs process (ex: '1g').

    - #### setMaxHeapSize

          public void setMaxHeapSize​(@Nullable
                                     java.lang.String maxHeapSize)

      Deprecated.
      The maximum heap size for the forked findbugs process (ex: '1g').

    - #### getVisitors

          @Nullable
          @Optional
          @Input
          public java.util.Collection<java.lang.String> getVisitors​()

      Deprecated.
      The bug detectors which should be run. The bug detectors are specified by their class names, without any package qualification. By default, all detectors which are not disabled by default are run.

    - #### setVisitors

          public void setVisitors​(@Nullable
                                  java.util.Collection<java.lang.String> visitors)

      Deprecated.
      The bug detectors which should be run. The bug detectors are specified by their class names, without any package qualification. By default, all detectors which are not disabled by default are run.

    - #### getOmitVisitors

          @Nullable
          @Optional
          @Input
          public java.util.Collection<java.lang.String> getOmitVisitors​()

      Deprecated.
      Similar to `visitors` except that it specifies bug detectors which should not be run. By default, no visitors are omitted.

    - #### setOmitVisitors

          public void setOmitVisitors​(@Nullable
                                      java.util.Collection<java.lang.String> omitVisitors)

      Deprecated.
      Similar to `visitors` except that it specifies bug detectors which should not be run. By default, no visitors are omitted.

    - #### getIncludeFilterConfig

          @Nullable
          @Optional
          public TextResource getIncludeFilterConfig​()

      Deprecated.
      A filter specifying which bugs are reported. Replaces the `includeFilter` property.
      Since:
        2.2

    - #### setIncludeFilterConfig

          public void setIncludeFilterConfig​(@Nullable
                                             TextResource includeFilterConfig)

      Deprecated.
      A filter specifying which bugs are reported. Replaces the `includeFilter` property.
      Since:
        2.2

    - #### getExcludeFilterConfig

          @Nullable
          @Optional
          public TextResource getExcludeFilterConfig​()

      Deprecated.
      A filter specifying bugs to exclude from being reported. Replaces the `excludeFilter` property.
      Since:
        2.2

    - #### setExcludeFilterConfig

          public void setExcludeFilterConfig​(@Nullable
                                             TextResource excludeFilterConfig)

      Deprecated.
      A filter specifying bugs to exclude from being reported. Replaces the `excludeFilter` property.
      Since:
        2.2

    - #### getExcludeBugsFilterConfig

          @Nullable
          @Optional
          public TextResource getExcludeBugsFilterConfig​()

      Deprecated.
      A filter specifying baseline bugs to exclude from being reported.
      Since:
        2.4

    - #### setExcludeBugsFilterConfig

          public void setExcludeBugsFilterConfig​(@Nullable
                                                 TextResource excludeBugsFilterConfig)

      Deprecated.
      A filter specifying baseline bugs to exclude from being reported.
      Since:
        2.4

    - #### getExtraArgs

          @Nullable
          @Optional
          @Input
          public java.util.Collection<java.lang.String> getExtraArgs​()

      Deprecated.
      Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.

      Extra arguments are passed to FindBugs after the arguments Gradle understands (like `effort` but before the list of classes to analyze. This should only be used for arguments that cannot be provided by Gradle directly. Gradle does not try to interpret or validate the arguments before passing them to FindBugs.

      See the FindBugs TextUICommandLine source for available options.

      Since:
        2.6

    - #### setExtraArgs

          public void setExtraArgs​(@Nullable
                                   java.util.Collection<java.lang.String> extraArgs)

      Deprecated.
      Any additional arguments (not covered here more explicitly like `effort`) to be passed along to FindBugs.

      Extra arguments are passed to FindBugs after the arguments Gradle understands (like `effort` but before the list of classes to analyze. This should only be used for arguments that cannot be provided by Gradle directly. Gradle does not try to interpret or validate the arguments before passing them to FindBugs.

      See the FindBugs TextUICommandLine source for available options.

      Since:
        2.6

    - #### getShowProgress

          @Input
          public boolean getShowProgress​()

      Deprecated.
      Indicates whether analysis progress should be rendered on standard output. Defaults to false.
      Since:
        4.2

    - #### setShowProgress

          public void setShowProgress​(boolean showProgress)

      Deprecated.
      Indicates whether analysis progress should be rendered on standard output.
      Since:
        4.2

    - #### getJvmArgs

          @Incubating
          @Nullable
          @Optional
          @Input
          public java.util.Collection<java.lang.String> getJvmArgs​()

      Deprecated.
      Any additional arguments to be passed along to FindBugs JVM process.

      Arguments can contain general JVM flags like `-Xdebug` and also FindBugs system properties like `-Dfindbugs.loadPropertiesFrom=...`

      Since:
        4.3

    - #### setJvmArgs

          @Incubating
          public void setJvmArgs​(@Nullable
                                 java.util.Collection<java.lang.String> jvmArgs)

      Deprecated.
      Any additional arguments to be passed along to FindBugs JVM process.

      Arguments can contain general JVM flags like `-Xdebug` and also FindBugs system properties like `-Dfindbugs.loadPropertiesFrom=...`

      Since:
        4.3