We have a project with multiple flavors and each flavor has 3 different buildTypes: debug, QA and release.
productFlavors {
flavor1 {}
flavor2 {}
flavor3 {}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
}
qa {
applicationIdSuffix ".qa"
}
release {
..
}
But for each flavor and buildType we need different library dependency. For example:
compile 'baseUrl:myLibrary:1.0.0:flavor1Release@aar'
compile 'baseUrl:myLibrary:1.0.0:flavor1Qa@aar'
...
compile 'baseUrl:myLibrary:1.0.0:flavor3Qa@aar'
Can we add these dependencies using a Groovy script?