how to add multiple repository to gradle

NishantKashyap
NishantKashyap used Ask the Experts™
on
I wanted to download dependencies from different location (maven and one from my custom), I added this in ,my gradle :-

 repositories {
    jcenter()
   
    ivy {
        url "http://XXXXXXX.com"
        artifactPattern "lib/com/[organization]/[module]/[revision]/[artifact].[ext]"
        ivyPattern "lib/com/[organization]/[module]/[revision]/[artifact].[ext]"
    }
 }

and the compiling the jar as:-

 compile 'organization-name:module-name:1.0'   // I have used actual organization-name and moule-name in the code , here its only for representational purpose.



gradle build fails :--


FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':testCompile'.
> You cannot mix different URL schemes for a single repository. Please declare separate repositories.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
You cannot mix http and file urls in a single repository

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial