Use SingletonComponent everywhere to make it easier to test
This commit is contained in:
@@ -3,7 +3,7 @@ package gq.kirmanak.mealie.data.auth
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.components.ViewModelComponent
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import gq.kirmanak.mealie.data.auth.impl.AuthDataSourceImpl
|
||||
import gq.kirmanak.mealie.data.auth.impl.AuthRepoImpl
|
||||
import gq.kirmanak.mealie.data.auth.impl.AuthStorageImpl
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.ExperimentalSerializationApi
|
||||
|
||||
@ExperimentalSerializationApi
|
||||
@Module
|
||||
@InstallIn(ViewModelComponent::class)
|
||||
@InstallIn(SingletonComponent::class)
|
||||
interface AuthModule {
|
||||
@Binds
|
||||
fun bindAuthDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource
|
||||
|
||||
@@ -4,7 +4,7 @@ import androidx.paging.ExperimentalPagingApi
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.components.ViewModelComponent
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import gq.kirmanak.mealie.data.recipes.db.RecipeStorage
|
||||
import gq.kirmanak.mealie.data.recipes.db.RecipeStorageImpl
|
||||
import gq.kirmanak.mealie.data.recipes.impl.RecipeImageLoaderImpl
|
||||
@@ -16,7 +16,7 @@ import kotlinx.serialization.ExperimentalSerializationApi
|
||||
@ExperimentalPagingApi
|
||||
@ExperimentalSerializationApi
|
||||
@Module
|
||||
@InstallIn(ViewModelComponent::class)
|
||||
@InstallIn(SingletonComponent::class)
|
||||
interface RecipeModule {
|
||||
@Binds
|
||||
fun provideRecipeDataSource(recipeDataSourceImpl: RecipeDataSourceImpl): RecipeDataSource
|
||||
|
||||
Reference in New Issue
Block a user