It's not currently possible due to how we process dependencies, unless,
maybe, you apply your plugin before the android one (in order to have its
afterEvaluate be called before ours). This would be very fragile though.

There's work being done to fix this but it's going to be a few months at
least.


On Wed, Feb 5, 2014 at 3:39 PM, Alexander Osmanov <[email protected]
> wrote:

> Hi,
>
>   I am writing a Gradle plugin that would add compile dependencies based
> on values I declare in extension. More specifically in extension I declare
> a version of a lib I want to be added. So like this:
>
> awslibs {
>   awslib1 {
>     version '1.0.0'
>   }
> }
>
> However in plugin "apply" method this extension object is not yet
> populated, i. e. empty. I try to read it's values in afterEvaluate and add
> dependencies. It works great with Gradle (i. e. command line gradle run)
> but not with Android studio. I suspect it fetches dependecies only once and
> before I add new one.
>
> Is there a way to add dependency so AS could see it or is there any API
> for adding dependencies planned (similar to recent API for adding generated
> code folders to model)?
>
> Thanks,
> Alex.
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to