api / org.gradle.plugin.devel.tasks / ValidateTaskProperties

ValidateTaskProperties

@Incubating @CacheableTask open class ValidateTaskProperties : ConventionTask, VerificationTask

Validates task property annotations.

Task properties must be annotated with one of:

Since
3.0

Constructors

<init>

ValidateTaskProperties()

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.

Functions

getClasses

open fun getClasses(): FileCollection

The classes to validate.

getClasspath

open fun getClasspath(): FileCollection

The classpath used to load the classes under validation.

getFailOnWarning

open fun getFailOnWarning(): Boolean

Returns whether the build should break when the verifications performed by this task detects a warning.

getIgnoreFailures

open fun getIgnoreFailures(): Boolean

{@inheritDoc}

getOutputFile

open fun getOutputFile(): RegularFileProperty

Returns the output file to store the report in.

setClasses

open fun setClasses(classes: FileCollection): Unit

Sets the classes to validate.

setClasspath

open fun setClasspath(classpath: FileCollection): Unit

Sets the classpath used to load the classes under validation.

setFailOnWarning

open fun setFailOnWarning(failOnWarning: Boolean): Unit

Specifies whether the build should break when the verifications performed by this task detects a warning.

setIgnoreFailures

open fun setIgnoreFailures(ignoreFailures: Boolean): Unit

{@inheritDoc}

validateTaskClasses

open fun validateTaskClasses(): Unit