- Detect multi-registered objects in different scopes of the same hierarchy, and throw an IllegalStateException. This ensures that
Scoped#onEnterScope
andScoped#onExitScope
calls are paired up.
-
Fixes ambiguous service lookup behavior of destroyed scopes:
MortarScope.getScope(context).isDead()
returns true when you'd expect it to.ObjectGraph.inject(context, object)
throws if the backing scope is dead, as opposed to the current behavior where we instead try (and generally fail with a confusing message) to inject from an ancestor scope.- The behavior of
MortarScope.hasService(String)
is not changed in destroyed scopes. It always says yes if the service is provided by the receiving scope or an ancestor.
-
Deletes deprecated classes and methods:
Blueprint
ObjectGraphService#requireActivityScope
ObjectGraphService#requireChild
-
Destroying a scope recursively destroys its children first, like it used to. (0.17 API quake incorrectly reversed this.)
-
Now throws (fail fast!) when doing service lookup in a dead scope.
-
Manually falls back to app context when a service is not found, to work around the interval in a new activity's life where its base context is not yet set.
API Quake!
-
Mortar is now decoupled from dependency injection in general, and from Dagger in particular.
-
Mortar core is now a service provider, meant to back Context#getSystemService, and handles registration of Scoped objects.
-
MortarActivityScope is gone, replaced by BundleService and BundleServiceRunner. (Presenter is now built on those services, but basically unchanged.)
-
Dagger support has moved to ObjectGraphService. Blueprint moved with it, and is deprecated.
-
Main sample application continues to be overly complicated and confusing, working on it.
-
Repairs idempotence of MortarScope#destroyChild
-
Adds MortarScope#isDetroyed
-
API break: Presenter#onDestroy and Scoped#onDestroy are now onExitScope(MortarScope). Also adds onEnterScope(MortarScope) to those classes.
-
API break: MortarScope#destroyChild(MortarScope) replaces MortarScope#destroy.
- Refine deferral of calls to Bundler#onLoad from MortarActivityScope#onRegister. See onRegister javadoc for details.
- Fix accidental bundling of dagger-compiler
- Guarantees that parent scopes will make their onLoad calls before children.
- API break: MortarContext has been removed. Activities must be careful to override getSystemService(); see the samples. This change allows Mortar to coexist peacefully with other ContextWrappers.
- Presenter#onDestroy calling dropView was a bad, bad idea. Now it does nothing. Drop your own damn views.
- MortarScopeDevHelper now dumps in alphabetical order, tests pass under Java 8
- Fixes PopupPresenter state saving
- Presenter#onDestroy wasn't calling dropView, does now.
- Fixes redundant calls to Presenter#onLoad
- Improved flow owner view in sample code
- Fixes for redundant Bundler#onLoad calls when registering during onCreate
- Better diagnostic dumps
- Fixes bug with bundle key namespacing in presenters.
-
API break: MortarActivityScope#onResume is gone, and as you might expect Bundler#onLoad is not called at resume time. It just wasn't useful. See ChatScreen in the sample to see how to to handle pausing.
-
API break: Presenter is no longer a Bundler, and its onLoad method is never called with a null view.
-
New: Mortar#createRootScope(boolean) for simpler root scope creation.
-
New: Hello Mortar sample app.
-
API break: Mortar#createRootActivityScope is not practical, dropped
-
API break: Presenter#dropView now takes the dropped view as an argument, and is expected to be called by outgoing views. Presenter#view is no longer a weak reference.
-
API break: Simplified Presenter API, HasMortarScope renamed MortarContext and need not be implemented by view classes
-
API break: Root scope can belong to an activity, root ObjectGraph to be passed in.
Initial release.