Class 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.
    Since:
    3.0
    • Method Detail

      • 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.
      • 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
      • 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
      • 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()