File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
core/datastore/src/main/kotlin/com/google/samples/apps/nowinandroid/core/datastore/di
demo/kotlin/com/google/samples/apps/nowinandroid/sync/di
prod/kotlin/com/google/samples/apps/nowinandroid/sync/di Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,17 @@ import dagger.hilt.android.qualifiers.ApplicationContext
3333import dagger.hilt.components.SingletonComponent
3434import kotlinx.coroutines.CoroutineDispatcher
3535import kotlinx.coroutines.CoroutineScope
36+ import org.jetbrains.annotations.VisibleForTesting
3637import javax.inject.Singleton
3738
39+ @VisibleForTesting
3840@Module
3941@InstallIn(SingletonComponent ::class )
4042object DataStoreModule {
4143
4244 @Provides
4345 @Singleton
44- internal fun providesUserPreferencesDataStore (
46+ fun providesUserPreferencesDataStore (
4547 @ApplicationContext context : Context ,
4648 @Dispatcher(IO ) ioDispatcher : CoroutineDispatcher ,
4749 @ApplicationScope scope : CoroutineScope ,
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import dagger.Binds
2424import dagger.Module
2525import dagger.hilt.InstallIn
2626import dagger.hilt.components.SingletonComponent
27+ import org.jetbrains.annotations.VisibleForTesting
2728
29+ @VisibleForTesting
2830@Module
2931@InstallIn(SingletonComponent ::class )
3032abstract class SyncModule {
Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ import dagger.Module
2828import dagger.Provides
2929import dagger.hilt.InstallIn
3030import dagger.hilt.components.SingletonComponent
31+ import org.jetbrains.annotations.VisibleForTesting
3132import javax.inject.Singleton
3233
34+ @VisibleForTesting
3335@Module
3436@InstallIn(SingletonComponent ::class )
3537abstract class SyncModule {
@@ -43,9 +45,9 @@ abstract class SyncModule {
4345 syncSubscriber : FirebaseSyncSubscriber ,
4446 ): SyncSubscriber
4547
46- companion object {
48+ internal companion object {
4749 @Provides
4850 @Singleton
49- internal fun provideFirebaseMessaging (): FirebaseMessaging = Firebase .messaging
51+ fun provideFirebaseMessaging (): FirebaseMessaging = Firebase .messaging
5052 }
5153}
You can’t perform that action at this time.
0 commit comments