Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for artifacts with classifiers #16

Merged
merged 1 commit into from
May 29, 2016

Conversation

benhylau
Copy link
Contributor

The v0.2.0 plugin is unable to download artifacts with a Maven classifier specified with:

compile 'group:name:version:classifier'

This error is print for that artifact:

"ERROR: Could not find dependency: ${target}"

The correct place to find the file is:
.../modules-2/files-2.1/group/artifact/version/hash/artifact-version-classifier.ext

This change adds support for handling these classifiers. Please let me know if this is the correct fix, and thanks for publishing this plugin.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 27c7907 on benhylau:classifier into 013e7a6 on ksoichiro:master.

@benhylau
Copy link
Contributor Author

@ksoichiro ping

@ksoichiro
Copy link
Owner

@benhylau Thank you for your PR, and sorry for my late reply.

I found that one of the Gradle API, org.gradle.api.artifacts.ResolvedArtifact interface
has getClassifier() method, and maybe we should use this interface to handle artifacts correctly, I think.
But anyway, your fix seems enough to solve this issue.
Thank you!

@ksoichiro ksoichiro merged commit 67aa75c into ksoichiro:master May 29, 2016
@benhylau
Copy link
Contributor Author

Yea I first looked at that interface in ResolvedArtifact, but it's been a while and I can't remember why I couldn't use it. I vaguely remember it had something to do with AndroidDependency being a custom class. Thanks for merging!

@benhylau benhylau deleted the classifier branch May 29, 2016 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants