JakeWharton / sdk-manager-plugin

DEPRECATED Gradle plugin which downloads and manages your Android SDK.
Apache License 2.0
1.41k stars 132 forks source link

Always add Google and Android repositories #24

Closed GuillaumeDelente closed 10 years ago

GuillaumeDelente commented 10 years ago

Fix #23 With version 0.10.0 of the Android Gradle plugin, the support libraries and the Play library were always marked as outdated, triggering the downloads at each build.

Turns out the Android Gradle plugin is not including the M2 repositories anymore, and the dependencies cannot be resolved.

Previously, we were adding the repos only if they were physically missing. This PR always adds the repositories anyway (unless no dependency).

Waiting for feedback!

JakeWharton commented 10 years ago

Turns out the Android Gradle plugin is not including the M2 repositories anymore, and the dependencies cannot be resolved.

I don't understand how this can be the case. If you have a dependency on the support library how is it adding the dependency then?

GuillaumeDelente commented 10 years ago

Yeah not sure what's happening. This is what I get when I log project.repositories.maven :

9.2 file:/Users/guillaume/.android-sdk/extras/android/m2repository/

10.0 http://dl.bintray.com/populov/maven

JakeWharton commented 10 years ago

I'll look into the plugin.

On Fri, May 2, 2014 at 11:23 AM, gdelente notifications@github.com wrote:

Yeah not sure what's happening. This is what I get when I log project.repositories.maven :

9.2 file:/Users/guillaume/.android-sdk/extras/android/m2repository/

10.0 http://dl.bintray.com/populov/maven

— Reply to this email directly or view it on GitHubhttps://github.com/JakeWharton/sdk-manager-plugin/pull/24#issuecomment-42062220 .

GuillaumeDelente commented 10 years ago

The gradle plugin used to add the repos before the sdk manager plugin tries to resolve the dependencies. In 0.10.0 the repos are added after, that's why the resolution fails.

JakeWharton commented 10 years ago

Yes but why would this plugin need to be responsible for always adding them?

JakeWharton commented 10 years ago

Ah, I get it. The dependency resolution is failing due to the repository add being deferred.