Dagger2 Custom Scopes : How do custom-scopes (@ActivityScope) actually work?
Actually there is no magic. Custom scope annotations are just annotations. They can have any name. First function of scopes is a way to tell Dagger compiler which scopes are allowed within scoped component. That’s why using @ActivityScope dependency in non-@ActivityScope component will fire a compilation error. In fact components can declare many scopes (e.g. … Read more