I’m seeing: ```> Property 'outputLocation' is ...
# community-support
z
I’m seeing:
Copy code
> Property 'outputLocation' is declared as an output property of Report xml (type TaskGeneratedSingleFileReport) but does not have a task associated with it.
from:
Copy code
val jacocoReportTask: TaskProvider<JacocoReport> = // ..
val xmlCoverageReport: Provider<RegularFile> = jacocoReportTask.flatMap {
    it.reports
        .xml
        .outputLocation
}
Is there a way I can tell gradle that
val xmlCoverageReport: Provider<RegularFile>
is provided by the
val jacocoReportTask: TaskProvider<JacocoReport>
? How do I manually wire up that dependency
t
The
flatMap
is what makes you lose the task dependency. Use a
map
inside which you'll call
outputLocation.get()
. https://github.com/gradle/gradle/issues/17091
👍 1