Make it possible to explicitly set (force/restrict) the source repo per module.
For building my Android app, I use a few modules. Some of them are available on JCenter, but some exist only on Google repo and some are taken from JitPack.
Suppose I have the following:
For whatever reason, module1 in jcenter is not up to date, so I want to take it from Google.
The list of repos in my build file is thus:
This setup makes sure module1 will be taken from google's repo. But it also means Google's servers will be contacted for all the other modules (to get maven-metadata.xml etc). Google may or may not use this information to track 3rd party module usage by Android applications; but it certainly means the build process suffers, because module5 will be taken from jitpack only after contacting google and jcenter and not finding it there.
To make it work, I have to list all repos in build.gradle, and then
See above.
See above. The example uses Android and Google because that's my specific use case, but it doesn't really matter; any Maven repo owner will get hits for modules not hosted by it, they may choose to track those hits, and the build process will be delayed.
Dupe of https://github.com/gradle/gradle/issues/1369 - this will be in 5.1
Most helpful comment
Dupe of https://github.com/gradle/gradle/issues/1369 - this will be in 5.1