不同的口味使用不同的存储库 [英] Different Flavors use different repositories

查看:77
本文介绍了不同的口味使用不同的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以让应用程序的每种口味使用不同的存储库? 即

Is there a way to have each of the flavors of the app use different repositories? i.e.

repositories {
    maven { url 'amazon repo'} 
    maven { url 'google repo'}
}
productFlavors {
 google {
 }
 amazon {
 }
}

推荐答案

发现可以在口味中添加存储库.

found that you can add repositories inside the flavors.

productFlavors {
 google {
  repositories {
    maven { url 'google repo'} 
  }
 }
 amazon {
  repositories {
    maven { url 'amazon repo'} 
  }
 }
}

这篇关于不同的口味使用不同的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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