Hey,
One of the ways is:
project.dependencies { ... }
Gradle DSL is composed of methods that can be explicitly called if needed.
Cheers!
On Fri, Sep 2, 2011 at 10:22 PM, Ricardo Mayerhofer <
[email protected]> wrote:
> Hi all,
> I would like to add the following dependency programatically in gradle,
> inside a plugin written in groovy.
>
> dependencies
> {
> antTask fileTree(dir: 'lib', include: '*.jar')
> }
>
> I read about DependencyHandler but couldn't manage to make it work. I was
> able to add the configuration by using the following code:
>
> project.getConfigurations().add('antTask')
>
> Any help is appreciated. Thanks.
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/How-to-programmatically-add-dependency-to-a-configuration-tp4763744p4763744.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
Szczepan Faber
Principal engineer@gradleware
Lead@mockito