Gradle ant task multiple/concatenated classpath


I’m trying to invoke hibernatetool as an ant task and I need to define classpath that in relevant ant build script is defined like:

        <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask">
				<fileset dir="${base.dir}/WebContent/WEB-INF/lib">
					<include name="*.jar" />
				<pathelement location="${war.dir}/WEB-INF/classes"/>

My version of gradle taskdef is

ant.taskdef(name:'hibernatetool', classname: 'org.hibernate.tool.ant.HibernateToolTask', classpath: configurations.runtimeClasspath.asPath+files("${warClassesDir}"))

However, ant task doesn’t seem to see the classes defined in the files("${warClassesDir}") part.
What shouild I fix to make it working?

Translating this into gradle would be something like

configurations {
dependencies {
   hibernateTool fileTree('WebContent/WEB-INF/lib') {
      include '*.jar'
   hibernateTool sourceSets.main.runtimeClasspath 
task myTask {
   doLast {
      ant.taskdef(name:'hibernatetool', classname: 'org.hibernate.tool.ant.HibernateToolTask', classpath: configurations.hibernateTool.asPath)