Subject: [PATCH] Fix PitestAggregatorPlugin --- Index: src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy b/src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy --- a/src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy (revision c97fe8a7575674681badf5489712973effecd6a0) +++ b/src/main/groovy/info/solidsoft/gradle/pitest/PitestAggregatorPlugin.groovy (date 1688553253175) @@ -54,14 +54,19 @@ } addPitAggregateReportDependency(pitestReportConfiguration) - project.tasks.register(PITEST_REPORT_AGGREGATE_TASK_NAME, AggregateReportTask) { t -> + def t = project.tasks.register(PITEST_REPORT_AGGREGATE_TASK_NAME, AggregateReportTask) { t -> t.description = "Aggregate PIT reports" t.group = PitestPlugin.PITEST_TASK_GROUP - configureTaskDefaults(t) //shouldRunAfter should be enough, but it fails in functional tests as :pitestReportAggregate is executed before :pitest tasks from subprojects - t.mustRunAfter(project.allprojects.collect { Project p -> p.tasks.withType(PitestTask) }) t.pitestReportClasspath.from(pitestReportConfiguration) } + project.allprojects.each { + it.afterEvaluate { + def get = t.get() + configureTaskDefaults(get) + get.mustRunAfter(project.allprojects.collect { Project p -> p.tasks.withType(PitestTask) }) + } + } } private void configureTaskDefaults(AggregateReportTask aggregateReportTask) {