In addition to mavenCentral, I have 2 maven repositories in s3. For some reason, the HEAD request gradle does is failing there (still looking into that), with a 403. Because this is a medium size multi project build, this takes up to 45 seconds just to “resolve dependencies” for all the projects (so just do a simple
gradle tasks is unbearably slow).
I ran with
--debug and it appears it is going through each dependency, for each project (since I setup the repository config in a subprojects block of the root project).
It appears there are 2 problems here. First, how can the custom repositories be shared across projects in a multi project setup? Using subprojects, it is creating unique repository objects right? With mavenCentral(), I believe it gets a shared object, so resolving a dependency on maven central gets resolved just once. But for artifacts in custom repos, it has to go through the process for every subproject.
The second issue is it should really be possible to say “use this repository only for these dependencies”. I believe that is this issue:
Any thoughts on how to make this faster?