我有一个依赖项需要自定义存储库的库
dependencies {
implementation 'com.chartboost:chartboost-sdk:8.1.0'
}
repositories {
mavenCentral()
maven { url "https://chartboostmobile.bintray.com/Chartboost" }
}
这很好,但是它迫使我向使用该库的每个项目添加 maven { url "https://chartboostmobile.bintray.com/Chartboost" }
。我想知道,有没有一种方法可以修改我自己的库,因此不需要为该依赖项添加自定义Maven存储库?可以将库中的所有存储库添加到项目中的东西。我尝试将implementation
和api
切换为无效
答案 0 :(得分:0)
您可以将存储库放入[USER_HOME]/gradle/init.gradle
文件中
allprojects {
repositories {
mavenCentral()
maven { url "https://chartboostmobile.bintray.com/Chartboost" }
}
}
然后将它们应用于所有项目