[GRADLE-3178] Bad check if dependency exists in mavenLocal() Created: 03/Oct/14 Updated: 10/Feb/17 Resolved: 10/Feb/17
I have repositories defined like this
So. Gradle should look first to the local maven repo and then download it from the our company repo if is not stored locally.
But it fail with
I check the folder and android-styled-dialogs/1.1.2/ exist there already. But it is downloaded only .apklib version, no .aar version. If I delete whole directory, it works correctly. It looks that gradle simply check if android-styled-dialogs/1.1.2/android-styled-dialogs-1.1.2.pom exists and doesn't check if really exist required type of dependency.
So. It looks like bug.
|Comment by Tom Dunstan [ 03/Oct/14 ]|
This happens when a user references an artifact with an extension that doesn't match the packaging type, and the artifact has been downloaded by Maven, but not the file with the other extension.
In this case eu.inmite.android.lib:android-styled-dialogs:1.1.2 has packaging type apklib, and has a .apklib and a .aar file on maven central. The user is trying to use the .aar but because Maven has previously downloaded the pom and apklib, Gradle thinks that the local repo has the module and doesn't look for it any further.
To reproduce, build.gradle:
Run mvn compile then gradle build.
|Comment by Tomáš Procházka [ 02/Nov/14 ]|
I found that it is not problem only with mavenLocal().
Also if you have something like
And first repository contain only
You can't use use @aar completly, Gradle don't check second one, because of ths bug
|Comment by Benjamin Muschko [ 15/Nov/16 ]|
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.
We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.
Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!
|Comment by Benjamin Muschko [ 10/Feb/17 ]|
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.