I want to use some specific libraries that have some usage in the java classes and also in the Android Manifest. But I want to use those libraries and their usage only for a specific product flavor and not for other flavors. I couldn't find the proper solution anywhere.
Asked
Active
Viewed 143 times
0
-
Use a version of `implementation` tied to the flavor, such as `freeImplementation` for a product flavor named `free`. See [the documentation](https://developer.android.com/studio/build/build-variants#variant_aware). – CommonsWare Jul 20 '22 at 11:56
-
What about the code generated by those libaries and how to handle their implementation based on flavors. CommonsWare – Afnan Khakwani Jul 21 '22 at 11:33
-
"What about the code generated by those libaries" -- libraries, via `implementation` directives, do not generate code. For that, you would use things like `kapt` or possibly Gradle plugins. I *think* that `kapt` uses the same prefix system (e.g., `freeKapt`). Gradle plugins would have custom configuration for this sort of thing. – CommonsWare Jul 21 '22 at 11:56