If I use Anvil in a Gradle library module, does it...
# squarelibraries
e
If I use Anvil in a Gradle library module, does it have to be a direct dependency of the app module to have the Anvil generated modules (for the library) being included in the app Dagger components? We have a situation like this
app -> uses Anvil
|--- library a -> doesn't use Anvil
|--- library b -> uses Anvil
Even when we enable Anvil in library a, modules generated for library b aren't included in the app and the app crashes. We don't want to add every single library to the app module directly so is there a way to have transitive dependencies with Anvil?
r
Use
api
dependencies and not
implementation
, then it’ll work.
e
so api in library a? like
api :library-b?
r
Yes