Ant task definition isolation between Gradle tasks

(Schalk Cronjé) #1

When using ant inside a task, is the classpath isolated? The reason for asking is that I want to compare the output of two versions of the same Ant task, by running two tasks.

I would want to have something like below in each task

            format : 'xml',
            resource : 'path/to/antlib.xml',
            classpath : project.files(antClasspathForVersion1).asPath

(just changing the classpath for Version2).

Is this safe to do?

IOW if antlib.xml creates a foo task will there be a clash?