api / org.gradle.api.tasks / VerificationTask

VerificationTask

interface VerificationTask

A VerificationTask is a task which performs some verification of the artifacts produced by a build.

Functions

getIgnoreFailures

abstract fun getIgnoreFailures(): Boolean

Specifies whether the build should break when the verifications performed by this task fail.

setIgnoreFailures

abstract fun setIgnoreFailures(ignoreFailures: Boolean): Unit

Specifies whether the build should break when the verifications performed by this task fail.

Inheritors

AbstractTestTask

abstract class AbstractTestTask : ConventionTask, VerificationTask, Reporting<TestTaskReports>

Abstract class for all test task.

  • Support for test listeners
  • Support for reporting
  • Support for report linking in the console output

Note: This abstract class is not intended for implementation by build script or plugin authors.

Checkstyle

open class Checkstyle : SourceTask, VerificationTask, Reporting<CheckstyleReports>

Runs Checkstyle against some source files.

CodeNarc

open class CodeNarc : SourceTask, VerificationTask, Reporting<CodeNarcReports>

Runs CodeNarc against some source files.

CompareGradleBuilds

open class CompareGradleBuilds : DefaultTask, VerificationTask

Executes two Gradle builds (that can be the same build) with specified versions and compares the outcomes. Please see the “Comparing Builds” chapter of the Gradle User Guide for more information.

FindBugs

open class FindBugs : SourceTask, VerificationTask, Reporting<FindBugsReports>

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

Pmd

open class Pmd : SourceTask, VerificationTask, Reporting<PmdReports>

Runs a set of static code analysis rules on Java source code files and generates a report of problems found.

ValidateTaskProperties

open class ValidateTaskProperties : ConventionTask, VerificationTask

Validates task property annotations.

Task properties must be annotated with one of:

  • Properties taken into account during up-to-date checks:
    • @org.gradle.api.tasks.Input, @org.gradle.api.tasks.Nested, @org.gradle.api.tasks.InputFile, @org.gradle.api.tasks.InputDirectory, @org.gradle.api.tasks.InputFiles to mark it as an input to the task.
    • @org.gradle.api.tasks.OutputFile, @org.gradle.api.tasks.OutputDirectory to mark it as an output of the task.
  • Properties ignored during up-to-date checks:
    • @javax.inject.Inject marks a Gradle service used by the task.
    • @org.gradle.api.tasks.Console marks a property that only influences the console output of the task.
    • @org.gradle.api.tasks.Internal mark an internal property of the task.