Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaCoCo Report Aggregation Plugin uses JARs not class directories in allCodeCoverageReportClassDirectories configuration #20432

Closed
3flex opened this issue Apr 11, 2022 · 1 comment · Fixed by #20810
Assignees
Milestone

Comments

@3flex
Copy link
Contributor

3flex commented Apr 11, 2022

Expected Behavior

When I apply jacoco-report-aggregation plugin to a project and use jacocoAggregation to declare project dependencies, the allCodeCoverageReportClassDirectories configuration will resolve to class directories for the dependencies, not JAR files.

Current docs say the allCodeCoverageReportClassDirectories configuration

Consumes the project dependencies to from the jacocoAggregation configuration to collect all classes directories.

Current Behavior

allCodeCoverageReportClassDirectories configuration resolves to JAR output of the dependencies declared with jacocoAggregation.

Context

The project I use embeds some dependencies in the generated JAR of one of the projects. These are then reported in the generated report. If class directories were resolved the dependencies bundled in the JAR would be correctly excluded.

I also can't control which project classes are reported either as it's not possible (or easy?) to exclude elements of the JAR file.

Steps to Reproduce

I have simply added a task to print the resolved files from the allCodeCoverageReportClassDirectories configuration in code-coverage-report project - run ./gradlew :code-coverage-report:printAllCodeCoverageReportClassDirectories to see the resolved files are JARs.

image

sample_jvm_multi_project_with_code_coverage_standalone-kotlin-dsl.zip

Your Environment

Build scan URL:

@DPUkyle
Copy link
Member

DPUkyle commented May 16, 2022

Thank you for reporting; will have a look now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants