I want to use gradle for our legacy application. Our ant build file has about 600 targets… The idea is to use gradle that import old ant targets and run it without rewriting all the logic to the gradle and write new tasks in gradle script. The problem is that dependent ant tasks has wrong order when running under gradle.
I’m using this script:
configurations {
antcp {
description = 'ant classpath'
transitive = true
exclude module: 'ant'
}
}
dependencies {
antcp 'xerces:xercesImpl:2.8.1'
antcp 'ant-contrib:ant-contrib:1.0b2'
antcp 'org.apache.ant:ant-junit:1.8.2'
}
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antcp.each { File f ->
antClassLoader.addURL(f.toURI().toURL())
}
ant.importBuild 'build.xml'
Are there a way how to run dependent ant tasks in right order ?
Thank you Martin