Translating this into gradle would be something like
configurations {
hibernateTool
}
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)
ant.hibernatetool(...)
}
}