h4. Update
I have done research for the work. Currently our SDK is implementing similar approach to Dagger2.
I posted some attempts to spike it as part of: https://github.com/secondsun/aerogear-android-sdk/pull/1
Alternative, in-house option is done as part of the https://github.com/aerogear/aerogear-android-sdk/pull/2
h4. Moving to dagger
TL;DR - My take here is that dagger is perfect for end user application but terrible not flexible choice for library.
Moving to dagger is not possible and will not provide any benefit. - Library is designed where injectors need to connected with providers on top level application. This will complicate user api as they will need to provide local bindings. In our case this will be so cumbersome and will just overcomplicate our end user API. - Unable to provide Dagger Components on runtime complicates setup. Integration is done on compilation level. I could not manage to get that running with the library aproach where we mixing compiled libraries with source code providers . - current solution will require some refactoring to get that and this may interfere with current work we doing.
h4. Proposed solution
While I do not recommend dagger I would like to spike Interface based aproach. This will be alternative that will simplify user setup to something like this: https://gist.github.com/wtrocki/5774f883a9a2ae0b33c5aa63986cae45
|
|