Ant task with nested element 'dependencies'

Newbe question on calling Ant tasks.

I am trying to run an ant script in Gradle with my own taskdef. The ant custom taks needs a nested element ‘dependencies’, but somehow the AntBuilder does not recognize it as a nested element. How can this be achieved?


Taskdefcode:

ant.taskdef(classpathref:‘actifsource.baseclasspath’,
loaderref:‘actifsource.classloader’,
resource:‘actifsource.tasks.lib.xml’)

ant.scope(id:‘bundle:RociPlugin’, location:‘${ref.project.roci}’) {
templatePath( value:‘source/openArchitectureWare’)
resourcepath( value:‘source/actifsource’)
dependencies (){
bundlescope( ref:‘bundle:ch.actifsource.core’)
bundlescope( ref:‘bundle:ch.actifsource.environment’)
bundlescope( ref:‘bundle:ch.actifsource.generator.xpand’)
}
}