I want to use a different library module for each flavor.
For example:
- free flavor -> I need to use the free library module
- paid flavor -> I need to use the paid library module
My flavors
productFlavors {
free{
.......
}
paid{
.......
}
}
What I tried
freeImplementation project(path:':freeLib', configuration: 'free')//for free
paidImplementation project(path:':paidLib', configuration: 'paid')//for paid
But I got compile error not able to use this
Note: It's not a duplicate question. I already tried some StackOverflow questions. It's outdated (they are using compile)
Reference - Multi flavor app based on multi flavor library in Android Gradle
Solution (from Gabriele Mariotti comments)
freeImplementation project(path:':freeLib')
paidImplementation project(path:':paidLib')