Problems using ant.importBuild with ant-file using basedir != "."

I was trying to use gradle to import an ant build, but it fails to set

properties correct because the ant buildfile has a different basedir than


I used this buildfiles: /ant/app/test.xml. /build.gradle


build.gradle: ant.importBuild ‘ant/app/test.xml’

When i run ‘grade test’ i get this output:

[ant:echo] /ant/app

[ant:echo] /ant/app/foo

Instead of the expected


[ant:echo] /foo

I think this is is because org.gradle.api.internal.project.DefaultAntBuilder

assumes that basedir is the directory where the ant-build file is intsead of

reading it.

It’s a known limitation. Perhaps vote for