Skip to content
This repository was archived by the owner on Apr 19, 2018. It is now read-only.

Conversation

@sschuberth
Copy link
Contributor

This is more or less a simplified version of PRs #87, #44, #41, #37, in the sense that it always self-updates the SDK tools before installing the build tools, and does so after resolving the platform tools. The latter is necessary as the SDK tools depend on the platform tools, and resolving the SDK tools first would result in an error like

Skipping 'Android SDK Tools, revision 24.4.1'; it depends on 'Android SDK Platform-tools, revision 23.1 rc1' which was not installed.

This PR fixes a bunch of issues, mainly issue #43, but also issue #101 and related ones.

@pelegb
Copy link

pelegb commented Mar 23, 2016

Hi,
I'm using this PR version in a project with multiple subprojects each is android library and one is an app. It seems that the plugin downloasd Android SDK tools 24.4.1 again and again between the different subprojects and between subsequent builds.
It seems that some kind of "already installed" mechanism isn't in place.

Thanks

@sschuberth
Copy link
Contributor Author

Confirmed. I was assuming the update command itself to be smart enough to only do the download if there actually is something to update. I'll look into it.

As it not only holds the major version, but the full version number.
The package names are listed in double-quotes, so match for them, too, to
be on the safe side when filtering for more generic package names like
"tools".

Credits go to @rusmonster's PR #87:
https://github.com/JakeWharton/sdk-manager-plugin/pull/87/files#diff-4b3adef258cd0701e1810b6e3e58d2cbL69
@sschuberth
Copy link
Contributor Author

@pelegb Would you mind trying the force-pushed update to this PR?

@pelegb
Copy link

pelegb commented Mar 24, 2016

@sschuberth it doesn't seem to solve the issue. The tools are being updated in each subproject and in each build.

Thanks for the quick response.

This avoids the need to cut new releases of this plugin just to update
SDK_VERSION in SdkDownload.groovy. This also indirectly addresses issues
due to bugs in the SDK tools, like "build-tools-23.0.2" not being listed
by SDK tools r23, see issue #101.

Fixes #43.
@sschuberth
Copy link
Contributor Author

@pelegb Thanks for checking, I believe to have found the issue. Please try again with the new force-pushed version.

@pelegb
Copy link

pelegb commented Mar 28, 2016

@sschuberth I'm receiving "No SDK tools available for update." in subsequent builds. Strange.

@pelegb
Copy link

pelegb commented Mar 28, 2016

I think I found the issue, you need to use listAll instead of listUpdate android command because once installed the tools don't appear in the list anymore

@sschuberth
Copy link
Contributor Author

Why is that an issue? I'd say it works as expected. Once the latest SDK tools have been installed, they naturally are not available for update anymore.

@pelegb
Copy link

pelegb commented Mar 28, 2016

Your correct. Thanks

@sschuberth
Copy link
Contributor Author

So can you confirm it's working correctly for you now?

@pelegb
Copy link

pelegb commented Mar 28, 2016

Yes

@sschuberth
Copy link
Contributor Author

Great, thanks for checking!

@sschuberth
Copy link
Contributor Author

Closing this as the Android Gradle plugin 2.2.0 has this feature built-in and this whole project is deprecated now.

@sschuberth sschuberth closed this Sep 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants