org.gradle.plugin.devel.tasks

## Class ValidateTaskProperties

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.plugin.devel.tasks.ValidateTaskProperties

- All Implemented Interfaces:
    Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, VerificationTask, org.gradle.util.Configurable<Task>

      @Incubating
      @CacheableTask
      public class ValidateTaskProperties
      extends DefaultTask
      implements VerificationTask

  Validates task property annotations.

  Task properties must be annotated with one of:

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

- - ### 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_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidateTaskProperties()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `File` | `getClassesDir()` The directory containing the classes to validate.
    `protected org.gradle.internal.classloader.ClassLoaderFactory` | `getClassLoaderFactory()`
    `FileCollection` | `getClasspath()` The classpath used to load the classes under validation.
    `protected org.gradle.api.internal.DocumentationRegistry` | `getDocumentationRegistry()`
    `boolean` | `getFailOnWarning()` Returns whether the build should break when the verifications performed by this task detects a warning.
    `boolean` | `getIgnoreFailures()` Specifies whether the build should break when the verifications performed by this task fail.
    `File` | `getOutputFile()` Returns the output file to store the report in.
    `void` | `setClassesDir(File classesDir)` Sets the directory containing the classes to validate.
    `void` | `setClasspath(FileCollection classpath)` Sets the classpath used to load the classes under validation.
    `void` | `setFailOnWarning(boolean failOnWarning)` Specifies whether the build should break when the verifications performed by this task detects a warning.
    `void` | `setIgnoreFailures(boolean ignoreFailures)` Specifies whether the build should break when the verifications performed by this task fail.
    `void` | `setOutputFile(Object outputFile)` Sets the output file to store the report in.
    `void` | `validateTaskClasses()`

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

      `addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActionClassLoaders, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString`

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

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

- - ### Constructor Detail

    - #### ValidateTaskProperties

          public ValidateTaskProperties()

  - ### Method Detail

    - #### validateTaskClasses

          public void validateTaskClasses()
                                   throws IOException

      Throws:
        `IOException`

    - #### getIgnoreFailures

          @Input
          public boolean getIgnoreFailures()

      Specifies whether the build should break when the verifications performed by this task fail.
      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)

      Specifies whether the build should break when the verifications performed by this task fail.
      Specified by:
        `setIgnoreFailures` in interface `VerificationTask`
      Parameters:
        `ignoreFailures` - false to break the build on failure, true to ignore the failures. The default is false.

    - #### getClassesDir

          @PathSensitive(value=RELATIVE)
          @InputDirectory
          @SkipWhenEmpty
          public File getClassesDir()

      The directory containing the classes to validate.

    - #### setClassesDir

          public void setClassesDir(File classesDir)

      Sets the directory containing the classes to validate.

    - #### getClasspath

          @Classpath
          public FileCollection getClasspath()

      The classpath used to load the classes under validation.

    - #### setClasspath

          public void setClasspath(FileCollection classpath)

      Sets the classpath used to load the classes under validation.

    - #### getFailOnWarning

          @Input
          public boolean getFailOnWarning()

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

    - #### getOutputFile

          @Optional
          @OutputFile
          public File getOutputFile()

      Returns the output file to store the report in.

    - #### setOutputFile

          public void setOutputFile(Object outputFile)

      Sets the output file to store the report in.

    - #### setFailOnWarning

          public void setFailOnWarning(boolean failOnWarning)

      Specifies whether the build should break when the verifications performed by this task detects a warning.
      Parameters:
        `failOnWarning` - `true` to break the build on warning, `false` to ignore warnings. The default is `false`.

    - #### getClassLoaderFactory

          @Inject
          protected org.gradle.internal.classloader.ClassLoaderFactory getClassLoaderFactory()

    - #### getDocumentationRegistry

          @Inject
          protected org.gradle.api.internal.DocumentationRegistry getDocumentationRegistry()