I am trying to import an existing any build file & than run ant target from Gradle as a gradle task.
My existing ant target calls ant java task fork , but it fails with below error:
java.lang.ClassCastException: org.apache.tools.ant.Main cannot be cast to org.apache.tools.ant.launch.AntMain
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I feel this is some classpath issue. In my gradle file i have no dependencies defined as I want to run exisiting ant flow from gradle.