Skip to content

Add examples in the sample Gradle project on how to get aggregation to work in a multi-module project #85

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

Open
carlspring opened this issue Dec 13, 2018 · 5 comments

Comments

@carlspring
Copy link

carlspring commented Dec 13, 2018

It would be a great time-saver, if you could add an example of how to perform report aggregations using scoverage in a Gradle multi-module project.

I have a multi-module project. Some of the modules don't have production code, or tests. I am getting proper scoverage reports and they are getting merged into an HTML, but I can't get the same to produce XML-s that I could then feed to Sonar.

Please advise!
Many thanks in advance!

Martin

@maiflai
Copy link
Contributor

maiflai commented Dec 14, 2018

Hi Martin,

That's odd - the aggregate task should aggregate all the reports. Is the HTML output accurate?

Thanks,
Stu

@maiflai
Copy link
Contributor

maiflai commented Dec 28, 2018

Worth noting that there is org.scoverage.AggregationAcceptanceTest which provides an example.

task aggregateScoverage(type: org.scoverage.ScoverageAggregate)

subprojects {
    aggregateScoverage.dependsOn(it.tasks.reportScoverage)
}

@eyalroth
Copy link
Contributor

eyalroth commented Jan 24, 2019

Hey martin, I'm currently working on a mixed Java-Scala multi-module Gradle example project: https://github.com/eyalroth/java-scala-gradle-project

It is still a WIP, especially since I'm intending to write a guide around it, but it contains most of the basic needs. You can run the task testCoverage in the project and both cobertura and scoverage will run and generate reports in the root build/reports directory.

@maiflai
Copy link
Contributor

maiflai commented Jan 26, 2019

Hi,

I think your problem with the Java classes might actually be related to #55.

I'll take a closer look; it should be possible to avoid compiling and deleting.

Stu.

@carlspring
Copy link
Author

@eyalroth ,

Thanks! I'll have a look! :)

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

No branches or pull requests

3 participants