Task Exec in Gradle 9.x

I support several plugins on Portal and have noticed that in Gradle 9.xx my code is not compilable now:

TaskRun.java:27: error: TaskRun is not abstract and does not override abstract method getExecActionFactory() in TaskRun

TaskConan.kt:33:15 Class ‘TaskConan’ is not abstract and does not implement abstract base class members:
fun getObjectFactory(): ObjectFactory
fun getExecActionFactory(): ExecActionFactory

Why now I have to implement some stange methods? Why Exec not work now “from box“?
For getObjectFactory() I can use object factory from Project, but about getExecActionFactory() I have no ideas…
Could you please advise?

Don’t miss the Gradle release notes and upgrade notes.

After reading them you would have found for example this: Upgrading to Gradle 9.0.0

So just declare your subclasses abstract and all is fine, no need to implement any new methods.

Thank you! This works for me.

1 Like