Hi, is there any config available to resolve depen...
# kotlin-toolchain
s
Hi, is there any config available to resolve dependencies first from an internal repo and then from the default Central? One option is to override
id: mavenCentral
, but I would like to avoid that.
j
@alexey.barsov aren't the default repos supposed to be appended to the end of the list? I thought it was done this way
a
no,
mavenLocal
is checked first at the moment. This will be changed, but not in the nearest future I guess
j
Did you mean central?
a
ohm sorry, I misread the question.
mavenCentral
can be put at the end of the list by overriding it in the configuration file. This is the only way to do it now.
> aren't the default repos supposed to be appended to the end of the list? I thought it was done this way no, they were at the start of the list from the very beginning
the logic is that most dependencies (including transitives) are taken fom mavenCentral and performance-wise it is better to check it first
j
Ok thanks. I think we had considered putting the default repos at the end, but decided that perf-wise it would be more likely that most deps would come from central, so it means less repos to check. Something like this comes to mind.
(Haha you were faster)
But don't we check in parallel now anyway?
Eventually we'll probably need a way to say that some deps should be resolved exclusively in some set of repos or some repo is only for some specific deps. So it would make this perf argument even weaker
💯 1
a
> But don't we check in parallel now anyway? no, we resolve different dependencies in parallel, one dependency is not parallelized yet, though I have something stashed on that topic
> Eventually we'll probably need a way to say that some deps should be resolved exclusively in some set of repos or some repo is only for some specific deps. So it would make this perf argument even weaker It will be weaker, but not that dramatically, because such a customization will be non-default behavior that we won't observe in most of the projects
s
the logic is that most dependencies (including transitives) are taken fom mavenCentral and performance-wise it is better to check it first
Unfortunately, in our CI environment the local Artifactory resolves faster than Maven Central, and using it is always encouraged.
mavenCentral
can be put at the end of the list by overriding it in the configuration file.
Copy code
repositories:
  - id: mavenLocal
    url: mavenLocal
    resolve: false
    publish: true
  - id: internal
    url: <https://mvn>..../artifactory/..
    resolve: true
  - id: mavenCentral
    url: <https://repo.maven.apache.org/maven2/>
@alexey.barsov You mean something like this ?
a
Yes
thank you color 1