Commit 03f57b3 1 parent 04c54c2 commit 03f57b3 Copy full SHA for 03f57b3
File tree 3 files changed +38
-5
lines changed
base/java/com/example/util/simpletimetracker
play/java/com/example/util/simpletimetracker
features/feature_wear/src/main/java/com/example/util/simpletimetracker/feature_wear
3 files changed +38
-5
lines changed Original file line number Diff line number Diff line change
1
+ package com.example.util.simpletimetracker
2
+
3
+ import com.example.util.simpletimetracker.domain.interactor.WearInteractor
4
+ import dagger.Binds
5
+ import dagger.Module
6
+ import dagger.hilt.InstallIn
7
+ import dagger.hilt.components.SingletonComponent
8
+ import javax.inject.Inject
9
+
10
+ @Module
11
+ @InstallIn(SingletonComponent ::class )
12
+ interface WearModule {
13
+
14
+ @Binds
15
+ fun NoopWearInteractor.bindWearInteractor (): WearInteractor
16
+
17
+ class NoopWearInteractor @Inject constructor() : WearInteractor {
18
+ override suspend fun update () {
19
+ // DO nothing.
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ package com.example.util.simpletimetracker
2
+
3
+ import com.example.util.simpletimetracker.domain.interactor.WearInteractor
4
+ import com.example.util.simpletimetracker.feature_wear.WearInteractorImpl
5
+ import dagger.Binds
6
+ import dagger.Module
7
+ import dagger.hilt.InstallIn
8
+ import dagger.hilt.components.SingletonComponent
9
+
10
+ @Module
11
+ @InstallIn(SingletonComponent ::class )
12
+ interface WearModule {
13
+
14
+ @Binds
15
+ fun WearInteractorImpl.bindWearInteractor (): WearInteractor
16
+ }
Original file line number Diff line number Diff line change 5
5
*/
6
6
package com.example.util.simpletimetracker.feature_wear
7
7
8
- import com.example.util.simpletimetracker.domain.interactor.WearInteractor
9
8
import com.example.util.simpletimetracker.wear_api.WearCommunicationAPI
10
9
import dagger.Binds
11
10
import dagger.Module
@@ -18,8 +17,4 @@ interface WearModule {
18
17
19
18
@Binds
20
19
fun WearCommunicationInteractor.bindWearCommunicationInteractor (): WearCommunicationAPI
21
-
22
- // TODO add base flavor noop
23
- @Binds
24
- fun WearInteractorImpl.bindWearInteractor (): WearInteractor
25
20
}
You can’t perform that action at this time.
0 commit comments