Package org.gradle.testing.jacoco.tasks
Class JacocoCoverageVerification
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.testing.jacoco.tasks.JacocoBase
org.gradle.testing.jacoco.tasks.JacocoReportBase
org.gradle.testing.jacoco.tasks.JacocoCoverageVerification
- All Implemented Interfaces:
- Comparable<Task>,- org.gradle.api.internal.DynamicObjectAware,- org.gradle.api.internal.TaskInternal,- Named,- ExtensionAware,- Task,- Configurable<Task>
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
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.gradle.api.TaskTask.Namer
- 
Field SummaryFields inherited from interface org.gradle.api.TaskTASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheck()protected FileFor internal use only.Returns the violation rules set for this task.protected abstract WorkerExecutorviolationRules(Action<? super JacocoViolationRulesContainer> configureAction) Configures the violation rules for this task.Methods inherited from class org.gradle.testing.jacoco.tasks.JacocoReportBaseadditionalClassDirs, additionalClassDirs, additionalSourceDirs, additionalSourceDirs, executionData, executionData, executionData, getAdditionalClassDirs, getAdditionalSourceDirs, getAllClassDirs, getAllSourceDirs, getAntBuilder, getCallbackActionDecorator, getClassDirectories, getExecutionData, getInstantiator, getSourceDirectories, getSourceEncoding, sourceSetsMethods inherited from class org.gradle.testing.jacoco.tasks.JacocoBasegetJacocoClasspath, setJacocoClasspathMethods inherited from class org.gradle.api.DefaultTaskcompareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTaskacceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.TaskdoNotTrackState, getConvention, notCompatibleWithConfigurationCache
- 
Constructor Details- 
JacocoCoverageVerificationpublic JacocoCoverageVerification()
 
- 
- 
Method Details- 
getViolationRulesReturns the violation rules set for this task.- Returns:
- Violation rules container
 
- 
getDummyOutputFileFor internal use only. This property exists, because only tasks with outputs can be up-to-date and cached.
- 
violationRulespublic JacocoViolationRulesContainer violationRules(Action<? super JacocoViolationRulesContainer> configureAction) Configures the violation rules for this task.
- 
getWorkerExecutor
- 
check- Throws:
- IOException
 
 
-