Gradle:为相关性指定适当的回购 [英] Gradle: specify appropriate repo for dependency

查看:144
本文介绍了Gradle:为相关性指定适当的回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个回购和很多依赖关系。
在build.gradle中看起来像这样:

 存储库{
maven {urlA }
maven {urlB}
}


依赖关系{
编译'libA'
编译'libB'
编译'libC'
}

有没有办法指定I会从一个仓库(A)下载libA,从另一个仓库(B)下载libB和libC?将依赖关系与存储库相关联。存储库将始终按其声明的顺序进行搜索。


I have several repos and a lot of dependencies. It is looks like this in build.gradle:

repositories {
    maven {url "A"}
    maven {url "B"}
}


dependencies {
    compile 'libA'
    compile 'libB'
    compile 'libC'
}

Is there is a way how can I specify that I will download libA from one repo (A) and libB and libC from another repo (B)?

解决方案

There is no way to associate a dependency with a repository. The repositories will always be searched in their declared order.

这篇关于Gradle:为相关性指定适当的回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆