TestReport task no source on Gradle 6.5.1

Hello,

I’ve written a custom plugin in Groovy declaring the following tasks

    Itemize lctr = project.tasks.create("listCompleteTestReport", Itemize, {
        entryDirectory = project.file("${project.buildDir}/tests/binary")
        dependsOn copyTestsTask
    })
    lctr.outputs.upToDateWhen { false }

    TestReport ctr = project.tasks.create("completeTestReport", TestReport, {
        setDestinationDir project.file("${project.buildDir}/reports/tests/complete")
        setTestResultDirs lctr.outputs.files
        dependsOn lctr
    })

Itemize is a custom task listing files from entryDirectory and filtering them on a custom pattern.

On Gradle 6.1, the completeTestReport task works perfectly.
I migrate to Gradle 6.5.1 (last release allowed by my company), and now, this task is skipped as having no sources. Why ?
Shall I add something to be compliant with this new Gradle release ? I don’t find anything on documentation.

Thanks

In fact, if I write the following task on a little project. It works perfectly

task testReportJU (type: TestReport) {
    destinationDir file("${buildDir}/complete")
    reportOn test
}

But if I run the test then execute the following task

task testReportJU (type: TestReport) {
    destinationDir file("${buildDir}/complete")
    setTestResultDirs fileTree("${buildDir}/test-results/test/binary/").files
}

or

task testReportJU (type: TestReport) {
    destinationDir file("${buildDir}/complete")
    reportOn fileTree("${buildDir}/test-results/test/binary/").files
}

I have the following traces and the task generate nothing

no binary test results found in dirs: [[…]\functional_tests\build\test-results\test\binary\output.bin, […]\functional_tests\build\test-results\test\binary\output.bin.idx, […]\flip_core\functional_tests\build\test-results\test\binary\results.bin].

Why as the files are exactly the same ? :pensive: