Class ValidateTaskProperties

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.plugin.devel.tasks.ValidateTaskProperties
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, VerificationTask, org.gradle.plugin.devel.tasks.internal.ValidateTaskPropertiesBackwardsCompatibleAdapter, org.gradle.util.Configurable<Task>

@CacheableTask public class ValidateTaskProperties extends org.gradle.api.internal.ConventionTask implements VerificationTask, org.gradle.plugin.devel.tasks.internal.ValidateTaskPropertiesBackwardsCompatibleAdapter
Validates task property annotations.

Task properties must be annotated with one of:

  • Properties taken into account during up-to-date checks:
  • 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.
    • @ReplacedBy mark a property as replaced by another (similar to Internal).
Since:
3.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface Task

    Task.Namer
  • Field Summary

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The classes to validate.
    protected org.gradle.internal.classloader.ClassLoaderFactory
     
    The classpath used to load the classes under validation.
    protected org.gradle.api.internal.DocumentationRegistry
     
    boolean
    Enable the stricter validation for cacheable tasks for all tasks.
    boolean
    Returns whether the build should break when the verifications performed by this task detects a warning.
    boolean
    Specifies whether the build should break when the verifications performed by this task fail.
    Returns the output file to store the report in.
    void
    Deprecated.
    Use getClasses().setFrom instead.
    void
    Deprecated.
    Use getClasspath().setFrom instead.
    void
    setEnableStricterValidation(boolean enableStricterValidation)
    Enable the stricter validation for cacheable tasks for all tasks.
    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
     

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

    conventionMapping, conventionMapping, getConventionMapping

    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 Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ValidateTaskProperties

      @Inject public ValidateTaskProperties(ObjectFactory objects)
  • Method Details

    • validateTaskClasses

      public void validateTaskClasses() throws IOException
      Throws:
      IOException
    • getIgnoreFailures

      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.
    • getClasses

      The classes to validate.
      Specified by:
      getClasses in interface org.gradle.plugin.devel.tasks.internal.ValidateTaskPropertiesBackwardsCompatibleAdapter
      Since:
      4.0
    • setClasses

      @Deprecated public void setClasses(FileCollection classes)
      Deprecated.
      Use getClasses().setFrom instead.
      Sets the classes to validate.
      Since:
      4.0
    • getClasspath

      @Classpath public ConfigurableFileCollection getClasspath()
      The classpath used to load the classes under validation.
      Specified by:
      getClasspath in interface org.gradle.plugin.devel.tasks.internal.ValidateTaskPropertiesBackwardsCompatibleAdapter
    • setClasspath

      @Deprecated public void setClasspath(FileCollection classpath)
      Deprecated.
      Use getClasspath().setFrom instead.
      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.
    • getEnableStricterValidation

      @Incubating @Input public boolean getEnableStricterValidation()
      Enable the stricter validation for cacheable tasks for all tasks.
      Since:
      5.1
    • setEnableStricterValidation

      @Incubating public void setEnableStricterValidation(boolean enableStricterValidation)
      Enable the stricter validation for cacheable tasks for all tasks.
      Since:
      5.1
    • getOutputFile

      @Optional @OutputFile public RegularFileProperty getOutputFile()
      Returns the output file to store the report in.
      Since:
      4.5
    • 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()