bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

cloverAggregateReports assumes that the rootProject buildDir has been created and fails if not. #13

Closed peterwalker closed 12 years ago

peterwalker commented 12 years ago

cloverAggregateReports assumes that the rootProject buildDir has been created and fails if not.

bmuschko commented 12 years ago

The task cloverAggregateReports assumes that you run the task cloverGenerateReport first. Only if you already generated at least one report you will be able to aggregate them. Running the task cloverGenerateReport will automatically create the directory build on the root project level. IMHO just running cloverAggregateReports doesn't make sense to me. I will probably let the task cloverAggregateReports depend on cloverGenerateReport.

peterwalker commented 12 years ago

But what if my rootproject doesn't have src?

Sent from my iPhone

On Mar 17, 2012, at 11:05 AM, Benjamin Muschkoreply@reply.github.com wrote:

The task cloverAggregateReports assumes that you run the task cloverGenerateReport first. Only if you already generated at least one report you will be able to aggregate them. Running the task cloverGenerateReport will automatically create the directory build on the root project level. IMHO just running cloverAggregateReports doesn't make sense to me. I will probably let the task cloverAggregateReports depend on cloverGenerateReport.


Reply to this email directly or view it on GitHub: https://github.com/bmuschko/gradle-clover-plugin/issues/13#issuecomment-4554553

bmuschko commented 12 years ago

I'll work without a src directory. I just tried it out with a multi-module project. Only the subprojects closure applies the groovy plugin. I made the task cloverAggregateReports depend on cloverGenerateReport.

allprojects {
    apply plugin: 'clover'
    ...
}

subprojects {
    apply plugin: 'groovy'
    ...
}
peterwalker commented 12 years ago

What does clover generate do for the root project?

Sent from my iPhone

On Mar 17, 2012, at 12:19 PM, Benjamin Muschkoreply@reply.github.com wrote:

I'll work without a src directory. I just tried it out with a multi-module project. Only the subprojects closure applies the groovy plugin. I made the task cloverAggregateReports depend on cloverGenerateReport.

allprojects { apply plugin: 'clover' ... }

subprojects { apply plugin: 'groovy' ... }


Reply to this email directly or view it on GitHub: https://github.com/bmuschko/gradle-clover-plugin/issues/13#issuecomment-4555069

bmuschko commented 12 years ago

cloverGenerateReport creates the directory build/reports for all modules including the root project if it is a multi-module project. However, for a root project in a multi-module project setting it will be empty.