Different Flavors use different repositories

╄→尐↘猪︶ㄣ 提交于 2020-03-01 08:57:29

问题


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 {
 }
}

回答1:


found that you can add repositories inside the flavors.

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


来源:https://stackoverflow.com/questions/54788385/different-flavors-use-different-repositories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!