How to fix deprecation message about use of Report.destination

hey folks,i have a task that copies xml reports generated by the Test task to another directory:

tasks.withType<Test> {

val copyTask = tasks.register(copyTaskName, { 
  description = "copy XUnit reports to separate directory"
  from(reports.junitXml.destination) // reports points to test.reports here 


with gradle 7.2 i am getting a deprecation warning for using the destination getter. The documentation says to replace it with outputLocation When i try to change my task to use outputLocation instead of destination i get the following error:

Could not determine the dependencies of task ':app:copyCdpTestResultsTest'. 
> Property 'outputLocation' is declared as an output property of Report junitXml (type DefaultJUnitXmlReport) but does not have a task associated with it.

Unfortunately i am stuck here and do not understand what the problem is.
Can anyone explain the message and/or can show me how i can configure my task without using deprecated API’s?

any help appreciated!