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

前端 未结 3 1468
轮回少年
轮回少年 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:42

    Looks like something similar was asked on the gradle mailing list and the best option currently available is indeed to turn to artifcatory and manage your own shared repository.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-12 21:47

    It's currently not possible, but it's an open request http://issues.gradle.org/browse/GRADLE-1066

    0 讨论(0)
提交回复
热议问题