szpak / gradle-pitest-plugin

Gradle plugin for PIT Mutation Testing
http://gradle-pitest-plugin.solidsoft.info/
221 stars 58 forks source link

Aggregate report skipped due to NO-SOURCE #327

Open aalmiray opened 1 year ago

aalmiray commented 1 year ago

I've followed the docs for configuring pitest for subprojects and the aggregator at the root. I use the Kordamp Plugin suite thus plugins are applied in this way

https://github.com/jreleaser/jreleaser/blob/934b1da1e5b1c190f3d07ae613a9659e95a4682e/settings.gradle#L45-L62

subprojects are configured in this way

https://github.com/jreleaser/jreleaser/blob/934b1da1e5b1c190f3d07ae613a9659e95a4682e/build.gradle#L115-L123

The pitest task for every subproject with tests runs successfully. However, the root fails to aggregate reports. Running the build with -i yields the following

> Task :pitestReportAggregate NO-SOURCE
Skipping task ':pitestReportAggregate' as it has no source files and no previous output files.
:pitestReportAggregate (Thread[Execution worker for ':' Thread 11,5,main]) completed. Took 0.0 secs.
jmswindle commented 6 months ago

I ran into this same issue. Solution for me was to apply the aggregator plugin after my subproject block.

Looks like the plugin is defining the input files by looking for projects with pitest configured. If you apply the aggregator plugin before configuring pitest in the subprojects, you will get this error stating there are no input files.