-
Notifications
You must be signed in to change notification settings - Fork 642
Use Dagger for dependency injection in Sessions #6745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected Products
Test Logs |
Test Results 38 files 38 suites 56s ⏱️ Results for commit 86febc4. ♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
0c2c9b8
to
86febc4
Compare
Use Dagger for dependency injection in Sessions.
This follows Firebase best practices, see https://firebase.github.io/firebase-android-sdk/best_practices/dependency_injection. Also, reducing the number of Firebase Components improves initializing time.
This is mostly just the scaffolding. Some of the classes and interfaces are still a little awkward, they can be cleaned up later. The
@Background
and@Blocking
executors are now enforced by Dagger, making them less error prone. The unit tests still need to be updated, right now they still rely on the old Firebase Components model to inject fake dependencies, I just added a Dagger component to bridge them instead of refactoring, that can be done later too.Singletons are now enforced by Dagger, also making the code less error prone.