Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.api.plugins.quality
[Groovy] Class Checkstyle

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.SourceTask
              org.gradle.api.plugins.quality.Checkstyle

All Implemented Interfaces:
  Reporting, VerificationTask

    class Checkstyle
    extends SourceTask

Runs Checkstyle against some source files.

Property Summary
`FileCollection` | `checkstyleClasspath` The class path containing the Checkstyle library to be used.
`FileCollection` | `classpath` The class path containing the compiled classes for the source files to be analyzed.
`File` | `configFile` The Checkstyle configuration file to use.
`Map` | `configProperties` The properties available for use in the configuration file.
`boolean` | `ignoreFailures` Whether or not this task will ignore failures and continue running the build.

Method Summary
`Map` | `getProperties()` The properties available for use in the configuration file.
`CheckstyleReports` | `getReports()` The reports to be generated by this task.
`File` | `getResultFile()` Returns the destination file for the XML report.
`CheckstyleReports` | `reports(Closure closure)` Configures the reports to be generated by this task.
`void` | `run()`
`void` | `setProperties(Map properties)` The properties available for use in the configuration file.
`void` | `setResultFile(File file)` @deprecated Use `reports.xml.destination` instead.

Methods inherited from class SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source

Property Detail

### checkstyleClasspath

    @InputFiles
    FileCollection checkstyleClasspath

  The class path containing the Checkstyle library to be used.

### classpath

    @InputFiles
    FileCollection classpath

  The class path containing the compiled classes for the source files to be analyzed.

### configFile

    @InputFile
    File configFile

  The Checkstyle configuration file to use.

### configProperties

    @Input
    @Optional
    Map configProperties

  The properties available for use in the configuration file. These are substituted into the configuration file.

### ignoreFailures

    boolean ignoreFailures

  Whether or not this task will ignore failures and continue running the build.

Method Detail

### getProperties

    @Deprecated
    Map getProperties()

  The properties available for use in the configuration file. These are substituted into the configuration file.
  deprecated:
    renamed to `configProperties`

### getReports

    CheckstyleReports getReports()

  The reports to be generated by this task.
  Returns:
    The reports container

### getResultFile

    @Deprecated
    File getResultFile()

  Returns the destination file for the XML report.
  deprecated:
    Use `reports.xml.destination` instead.

### reports

    CheckstyleReports reports(Closure closure)

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

       checkstyleTask {
         reports {
           xml {
             destination "build/codenarc.xml"
           }
         }
       }

  Parameters:
    `closure` - The configuration
  Returns:
    The reports container

### run

    @TaskAction
    void run()

### setProperties

    @Deprecated
    void setProperties(Map properties)

  The properties available for use in the configuration file. These are substituted into the configuration file.
  deprecated:
    renamed to `configProperties`

### setResultFile

    @Deprecated
    void setResultFile(File file)

  deprecated:
    Use `reports.xml.destination` instead.

Gradle API 1.1-rc-1