Gradle v5.1 provides a new constructor org.gradle.api.reporting.internal.TaskReportContainer#TaskReportContainer(java.lang.Class<? extends T>, org.gradle.api.Task, org.gradle.api.internal.CollectionCallbackActionDecorator) which should be used in favor of old org.gradle.api.reporting.internal.TaskReportContainer#TaskReportContainer(java.lang.Class<? extends T>, org.gradle.api.Task).
Solution: Use the super(SingleFileReport.class, task, CollectionCallbackActionDecorator.NOOP) in de.aaschmid.gradle.plugins.cpd.internal.CpdReportsImpl#CpdReportsImpl.
Challenges: This required to update the supported version to at least Gradle 5.1. As the logic is within the constructor we cannot do a version distinction here using GradleVersion.current().compareTo(...)
Another possibility to fix at least the depreaction warning is using DeprecationLogger#whileDisabled
Gradle v5.1 provides a new constructor
org.gradle.api.reporting.internal.TaskReportContainer#TaskReportContainer(java.lang.Class<? extends T>, org.gradle.api.Task, org.gradle.api.internal.CollectionCallbackActionDecorator)
which should be used in favor of oldorg.gradle.api.reporting.internal.TaskReportContainer#TaskReportContainer(java.lang.Class<? extends T>, org.gradle.api.Task)
.Solution: Use the
super(SingleFileReport.class, task, CollectionCallbackActionDecorator.NOOP)
inde.aaschmid.gradle.plugins.cpd.internal.CpdReportsImpl#CpdReportsImpl
.Challenges: This required to update the supported version to at least Gradle 5.1. As the logic is within the constructor we cannot do a version distinction here using
GradleVersion.current().compareTo(...)
Another possibility to fix at least the depreaction warning is using
DeprecationLogger#whileDisabled