5

My Android Buck project is made up of lots of independent modules. For example, login is its own buck module, some of my large models belong to their own buck module, etc.

The problem I'm running into is that if I subclass Application, I'm not sure how each buck module would reference it. If every buck module depends on a buck module that contains it, the Application won't be able to access the Dagger Modules in the dependent buck modules since it would create a circular dependency.

Example structure:

    App1_Module -- depends on launcher module, contains manifest
    Module_1 -- buck module (launcher module), contains Dagger module
    Module_2 -- buck module, contains Dagger module
    ...
    Module_N -- buck module, contains Dagger module

Is there a way to avoid subclassing Application? If not, where would Application go and how would the dependencies work?

vanguard
  • 147
  • 1
  • 7

0 Answers0