Gradle upgrade from 2.2 to 6.0

when I m upgrading gradle form 2.2 to 6.0 version , facing below error

Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.gradle.api.internal.file.copy.DefaultCopySpec(org.gradle.api.internal.file.BaseDirFileResolver, org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator)
at Source)

Any idea on this?

According to the stack trace, maybe the problem is in this plugin.

I think there have been quite big changes between these two versions. Maybe it would be better to upgrade incrementally, i.e., to version 4, then 5 or minor increments. You can read more in the migration section of Gradle’s documentation.