Class JacocoCoverageVerification

  • All Implemented Interfaces:
    java.lang.Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>

    @CacheableTask
    public abstract class JacocoCoverageVerification
    extends JacocoReportBase
    Task for verifying code coverage metrics. Fails the task if violations are detected based on specified rules.

    Requires JaCoCo version >= 0.6.3.

    Since:
    3.4
    • Constructor Detail

      • JacocoCoverageVerification

        public JacocoCoverageVerification()
    • Method Detail

      • getViolationRules

        public JacocoViolationRulesContainer getViolationRules()
        Returns the violation rules set for this task.
        Returns:
        Violation rules container
      • getDummyOutputFile

        @OutputFile
        protected java.io.File getDummyOutputFile()
        For internal use only. This property exists, because only tasks with outputs can be up-to-date and cached.
      • check

        public void check()
                   throws java.io.IOException
        Throws:
        java.io.IOException