I am trying to upgrade my project from gradle 4.10.3 to 5.6.3 and one of the groovy classes (i.e. custom plugin) in the project uses ClassGenerator
from org.gradle.api.internal
package.
When I first tried to build with gradle 5.6.3, I got the error saying unable to resolve class org.gradle.api.internal.ClassGenerator
. I then looked into the github repo and found that the class has moved into model-core
subproject and now resides under org.gradle.api.internal.instantiation
package. So, I changed the import
statement to:
import org.gradle.api.internal.instantiation.ClassGenerartor
However, I still get the error unable to resolve class org.gradle.api.internal.instantiation.ClassGenerator
. I already have compileOnly gradleApi()
in dependencies
. Do I need to do anything else to use this class?