Skip to content

Commit

Permalink
[FIX] #14 : Auth 관련 DI 모두 Activity Component로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Oct 6, 2023
1 parent a9be0b0 commit 9848ea2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.wap.wapp.core.data.repository.di

import com.wap.wapp.core.data.repository.auth.AuthRepository
import com.wap.wapp.core.data.repository.auth.AuthRepositoryImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.android.scopes.ActivityScoped

@Module
@InstallIn(ActivityComponent::class)
abstract class AuthRepositoryModule {
@Binds
@ActivityScoped
abstract fun providesAuthRepository(
authRepositoryImpl: AuthRepositoryImpl
): AuthRepository
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.wap.wapp.core.domain.auth

import com.wap.wapp.core.data.repository.auth.AuthRepository
import dagger.hilt.android.scopes.ActivityScoped
import javax.inject.Inject

@ActivityScoped
class SignInUseCase @Inject constructor(
private val repository: AuthRepository
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import com.wap.wapp.core.network.source.auth.AuthDataSourceImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton
import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.android.scopes.ActivityScoped

@Module
@InstallIn(SingletonComponent::class)
abstract class DataSourceModule {
@InstallIn(ActivityComponent::class)
abstract class AuthDataSourceModule {
@Binds
@Singleton
abstract fun provideAuthDataSource(
@ActivityScoped
abstract fun providesAuthDataSource(
authDataSourceImpl: AuthDataSourceImpl
): AuthDataSource
}

0 comments on commit 9848ea2

Please sign in to comment.