Hi,

I'm not an expert so either I'm gonna confuse you or actually help :)

Gradle speaks ant natively so you can declare custom ant tasks exactly
the same you do with plain ant files (was it <taskdef/> ?). Obviously
your suggestion is more elegant but I'm just saying that it should be
possible to use extra ant tasks without hacking GRADLE_HOME/lib on
every machine.

Cheers,
Szczepan Faber

2009/2/3 ales <[email protected]>:
> Hi all,
> I would like to use Ant optional tasks in the Gradle build. For example FTP.
> If I copy ant-optional.jar and NetComponents.jar into the directory
> GRADLE_HOME/lib directory it works fine but there is one disadvantage, in
> this case these libraries must be copied to all Gradle installations on
> other computers. It will be very helpful for me do something like this in
> the build.gradle:
>
> dependencies {
>     // automatically download optional tasks JAR and set it to classpath...
>     downloadDependencyAndSetToMainClassPath 'ant:ant-optional:1.5.3-1'
> }
>
> ...
>
> createTask('foo') {
>     // ...so it is possible to use FTP task later without manual
> installation
>     ant.ftp(server: 'ftp.foo.com', remotedir: 'www/foo', userid: 'foo.com',
> password: 'foo') {
>         fileset(dir: 'foo')
>     }
> }
>
> My look to documentation of the Gradle API does not give me any solution how
> to set this type of dependency and I am stuck. All attempts of setting
> dependency fails with Cause: the class
> org.apache.tools.ant.taskdefs.optional.net.FTP was not found. Any ideas how
> to solve this issue?
>
> Best regards,
>
> Ales
> --------------------------------------------------------------------- To
> unsubscribe from this list, please visit:
> http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to