Gradle sync failed when using custom DSL

I am getting this error:
Gradle sync failed: Unable to load class ‘’.

when trying to setup a file according to this documentation: http:// tools.

Can I get some help figuring out what’s wrong? Here’s a lot more info on this obstacle:

Okay this is the answer that sorted out the problem for me:

Thanks to @[Gabriele Mariotti] on StackOverflow