The approach is correct. Generally I’d rather recommend to port the Ant target to Gradle though (reusing some Ant tasks if necessary) because it’s a cleaner approach. As to your second question, there is no such thing as passing parameters to an Ant target. If what you are after is to set an Ant property, you can do this with ‘ant.properties[“some.ant.property”] = “some value”’.