Class JacocoReportBase

    • Constructor Detail

      • JacocoReportBase

        public JacocoReportBase()
    • Method Detail

      • getInstantiator

        @Inject
        protected org.gradle.internal.reflect.Instantiator getInstantiator()
      • getCallbackActionDecorator

        @Inject
        protected org.gradle.api.internal.CollectionCallbackActionDecorator getCallbackActionDecorator()
        Required for decorating reports container callbacks for tracing user code application.
        Since:
        5.1
      • getAntBuilder

        @Inject
        protected org.gradle.api.internal.project.IsolatedAntBuilder getAntBuilder()
      • executionData

        public void executionData​(java.lang.Object... files)
        Adds execution data files to be used during coverage analysis.
        Parameters:
        files - one or more files to add
      • executionData

        public void executionData​(Task... tasks)
        Adds execution data generated by a task to the list of those used during coverage analysis. Only tasks with a JacocoTaskExtension will be included; all others will be ignored.
        Parameters:
        tasks - one or more tasks to add
      • executionData

        public void executionData​(TaskCollection tasks)
        Adds execution data generated by the given tasks to the list of those used during coverage analysis. Only tasks with a JacocoTaskExtension will be included; all others will be ignored.
        Parameters:
        tasks - one or more tasks to add
      • getAllClassDirs

        @Internal
        public FileCollection getAllClassDirs()
        Gets the class directories that coverage will be reported for. All classes in these directories will be included in the report.
        Returns:
        class dirs to report coverage of
      • getAllSourceDirs

        @Internal
        public FileCollection getAllSourceDirs()
        Gets the source directories for the classes that will be reported on. Source will be obtained from these directories only for the classes included in the report.
        Returns:
        source directories for the classes reported on
        See Also:
        getAllClassDirs()
      • sourceSets

        public void sourceSets​(SourceSet... sourceSets)
        Adds a source set to the list to be reported on. The output of this source set will be used as classes to include in the report. The source for this source set will be used for any classes included in the report.
        Parameters:
        sourceSets - one or more source sets to report on
      • additionalClassDirs

        public void additionalClassDirs​(java.io.File... dirs)
        Adds additional class directories to those that will be included in the report.
        Parameters:
        dirs - one or more directories containing classes to report coverage of
      • additionalClassDirs

        public void additionalClassDirs​(FileCollection dirs)
        Adds additional class directories to those that will be included in the report.
        Parameters:
        dirs - a FileCollection of directories containing classes to report coverage of
      • additionalSourceDirs

        public void additionalSourceDirs​(java.io.File... dirs)
        Adds additional source directories to be used for any classes included in the report.
        Parameters:
        dirs - one or more directories containing source files for the classes included in the report
      • additionalSourceDirs

        public void additionalSourceDirs​(FileCollection dirs)
        Adds additional source directories to be used for any classes included in the report.
        Parameters:
        dirs - a FileCollection of directories containing source files for the classes included in the report