You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I have a plugin which is only used by the main subproject - i.e the one defining the main method - called : springboot-application-conventions
plugins {
id 'java-common-conventions'
id 'jacoco-report-aggregation'
id 'org.springframework.boot'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('check') {
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
}
This works perfectly well except for the fact that it only generates report pages for java classes (i.e pages where I can see the code with the green and red highlights, the diamonds, etc.) that are in the main module, but classes in all other modules do not have these pages. I can see coverage percentages for each class and method, but I cannot see the code with the coverage data.
Expected Behavior
All classes should be clickable in order to gather coverage data in an aggregated way without having to navigate each project.
Current Behavior
Only classes in the main module (the one with aggregation plugin) are clickable in the report.
Context
Not affecting work right now as I'm learning how to use this plugin.
In my case I was able to partially fix it with the following hack (added to the main subproject build.gradle):
The problem with this is that I have to manually add each subproject to the main subproject, which I think it's super error-prone.
Steps to Reproduce
I don't have a public project to be shared right now, but I can prepare one.
Environment
------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------
Build time: 2022-03-31 15:25:29 UTC
Revision: 540473b8118064efcc264694cbcaa4b677f61041
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 17.0.2 (Homebrew 17.0.2+0)
OS: Mac OS X 11.6 x86_64
The text was updated successfully, but these errors were encountered:
Hi @juanmbellini , unfortunately I was not able to reproduce this.
I set a breakpoint on the last line of one of our integration tests, org.gradle.testing.jacoco.plugins.JacocoAggregationIntegrationTest#can aggregate jacoco execution data from subprojects, then browsed the HTML report myself. I was able to drill-down into the pages of all classes, including both the "main" application project and the subprojects it depends on (including transitively).
Please provide a reproducer project if you are able.
Maybe I'm not understanding well something about the jacoco-report-aggregation plugin...
I have a multi module project with the following structure
In the
buildSrc
I have some convention plugins. Thejava-common-conventions
plugin is defined as the following:This plugin is used by all subprojects.
Then I have a plugin which is only used by the main subproject - i.e the one defining the main method - called :
springboot-application-conventions
This works perfectly well except for the fact that it only generates report pages for java classes (i.e pages where I can see the code with the green and red highlights, the diamonds, etc.) that are in the main module, but classes in all other modules do not have these pages. I can see coverage percentages for each class and method, but I cannot see the code with the coverage data.
Expected Behavior
All classes should be clickable in order to gather coverage data in an aggregated way without having to navigate each project.
Current Behavior
Only classes in the main module (the one with aggregation plugin) are clickable in the report.
Context
Not affecting work right now as I'm learning how to use this plugin.
In my case I was able to partially fix it with the following hack (added to the main subproject
build.gradle
):The problem with this is that I have to manually add each subproject to the main subproject, which I think it's super error-prone.
Steps to Reproduce
I don't have a public project to be shared right now, but I can prepare one.
Environment
The text was updated successfully, but these errors were encountered: