If I import these two tasks into gradle via ant.importBuild
<target name="-cleanup-js">
<delete>
...
</delete>
</target>
<target name="make-js" depends="-cleanup-js">
<exec executable="${dart2js.exec}" failonerror="true">
...
</exec>
</target>
Gradle should only show “make-js” on gradle tasks. -cleanup-js should be hidden.
bmuschko1
(Benjamin Muschko)
October 10, 2013, 3:10pm
2
I can’t seem to reproduce this. Which Gradle version are you using?
With 1.8 I see the expected output:
gradle tasks
Other tasks
-----------
make-js
gradle tasks --all
Other tasks
-----------
make-js
-cleanup-js
I guess that ‘-cleanup-js’ is hidden here as per the normal Gradle rules for showing/hiding tasks, not because it’s a private Ant target.
bmuschko1
(Benjamin Muschko)
October 10, 2013, 3:52pm
4
That’s correct. I was just about to add that information. I am not aware of a way to hide tasks with a specific naming pattern.
Thinking more about this, private Ant targets should normally be depended-on by some other target (else why have them). So unless our Ant import adds a description (does it?), the desired behavior should emerge automatically.
Hmmm - I switched to 1.8 and everything seems to be OK now. Thanks for your help!