-
Notifications
You must be signed in to change notification settings - Fork 7
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
[EMBR-631] Make ApiUrlBuilder independent from ConfigService. #10
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #10 +/- ##
==========================================
+ Coverage 73.61% 73.76% +0.15%
==========================================
Files 305 305
Lines 10041 10053 +12
Branches 1446 1447 +1
==========================================
+ Hits 7392 7416 +24
+ Misses 2077 2067 -10
+ Partials 572 570 -2
|
This comment was marked as outdated.
This comment was marked as outdated.
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Show resolved
Hide resolved
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Outdated
Show resolved
Hide resolved
embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/comms/api/ApiUrlBuilder.kt
Outdated
Show resolved
Hide resolved
embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/comms/api/ApiUrlBuilder.kt
Outdated
Show resolved
Hide resolved
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Show resolved
Hide resolved
embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/ApiUrlBuilderTest.kt
Outdated
Show resolved
Hide resolved
...ce-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeCoreModule.kt
Outdated
Show resolved
Hide resolved
...dk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeEssentialServiceModule.kt
Outdated
Show resolved
Hide resolved
So basically, the crux of the change is to pull out some of the app/device info needed by various services in the |
embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/comms/api/ApiUrlBuilder.kt
Outdated
Show resolved
Hide resolved
So I THINK we can make it so that we remove all the circular dependencies for MetadataService -> ConfigService -> ApiService -> ApiUrlBuilder -> PreferenceService |
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Outdated
Show resolved
Hide resolved
…ice depending on a local config.
...java/io/embrace/android/embracesdk/capture/connectivity/EmbraceNetworkConnectivityService.kt
Outdated
Show resolved
Hide resolved
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Outdated
Show resolved
Hide resolved
...-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/EssentialServiceModule.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Goal
There were 3 circular dependencies within the
EssentialServicesModule
:The following image shows the interaction between the different components and in red the ones that are part of a circular dependency.
The dotted lines represent the dependency that is cut in this PR.
The green dotted lines represent the values that are passed to the constructor of that Class to break the circular dependency.
In the future, we can separate some of these components to another module so the dependencies are more clearly separated and EssentialServicesModule is not overloaded of services.
Testing
Updated existing unit tests.