How to configure gradle to use a local repository only for certain dependency groups?

前端 未结 3 1467
轮回少年
轮回少年 2021-02-12 20:43

Working off the gradle dependency docs, we have a build.gradle with snippets like this.

repositories {
    mavenCentral()
    ivy {
        name = \'localRepo\'
         


        
3条回答
  •  梦谈多话
    2021-02-12 21:46

    Not quite what you want, but we set up our repositories so that developers get all dependencies from the local private repo, and that local private repo caches the maven central repo. This is faster, as dependencies are only pulled once from maven central by the first developer to access them, and also allows you to see what artifacts are being used in your company. Nexus and artifactory and I am sure all other repositories do as well.

提交回复
热议问题