I used to use the ant closure syntax to execute ant tasks in my gradle file, i.e.
ant
{
copy (...)
...
}
This seems to no longer work with Gradle 7.6. I get a non-informative error message:
> Problem: failed to create task or type call
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
“ant.copy” syntax still works. Is this an intended change (i.e. deprecated and phased-out way), a bug or an error on my side?
I strongly wonder why you use the copy Ant task actually as there is a much better Gradle alternative, but I’m just assuming that was not the real-life example but just an arbitrary example.
indeed the copy was only an example. We moved our projects from Ant to Gradle and still have some third-party Ant-Tasks in our build process, e.g. the “wsimport” from JAXWS. Btw, the copy task of Ant is still handy, I have to admit, while I used the Gradle version also in the past.
I am going to open an issue, I’ll refer to the pull request you mentioned. Thanks for your help.