square / mortar

A simple library that makes it easy to pair thin views with dedicated controllers, isolated from most of the vagaries of the Activity life cycle.
Apache License 2.0
2.16k stars 155 forks source link

DO NOT MERGE, wip: Mortar as service provider #120

Closed rjrjr closed 9 years ago

rjrjr commented 9 years ago

Work in progress, I promise doc update and better sha description before I merge. The Hello World app has been updated, the other sample is still broken, haven't even tried the tests yet

MortarScope's focus is now to make it easy to extend the set of services available from the Context. You build a new scope with scope providers. The new BundleServiceProvider replaces MortarActivityScope. DaggerServiceProvider helps make a Dagger2 generated component a service.

The scope seed is intended to become the natural place for a screen to nestle, though I'm not using it yet. Notice that it's available to the service providers when they vend a service.

pyricau commented 9 years ago

@rjrjr ping me when you want review (I don't want to waste time in WIP)

rjrjr commented 9 years ago

Feedback from @loganj, this can be simpler. Probably don't need anything more than withService(String, Object) on the scope builder.