I have a fairly large (12) multi-project build that we want to migrate
from a Perl and Ant build system to Gradle (as part of a larger redesign
effort).
Part of what we need to do is script the execution of the existing ANT
targets until we replace them fully with Gradle.
What I haven't been able to figure out is how to invoke a given ANT
target from the execution phase of a Gradle Task.
Given a build.xml with:
<target name="gradleTest">
<echo> Test common</echo>
</target>
And a build.gradle that looks like:
ant.importBuild ('build.xml')
task foo << {
gradleTest
println ('test gradle common')
}
I would expect to that 'gradle foo' would produce something like:
:foo
[ant:echo] Test common
test gradle common
However, what I get is:
:foo
test gradle common
What am I missing?
Tried to use dependsOn, but that just results in:
Could not compile build file
'/usr/local/litle-home/cwright/cvs/common/common.gradle'.
Cause: startup failed:
build file '/usr/local/litle-home/cwright/cvs/common/common.gradle': 3:
unexpected token: gradleTest @ line 3, column 21.
task foo (dependsOn gradleTest) << {
^
Hints, suggestions, pointers to the right manual?
Thanks,
-Clark Wright
The information in this message is for the intended recipient(s) only and may
be the proprietary and/or confidential property of Litle & Co., LLC, and thus
protected from disclosure. If you are not the intended recipient(s), or an
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any use, dissemination, distribution or
copying of this communication is prohibited. If you have received this
communication in error, please notify Litle & Co. immediately by replying to
this message and then promptly deleting it and your reply permanently from your
computer.