问题
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