Skip to content

Commit

Permalink
[CHORE] #87 : ActivityComponent에 주입되는 모듈 분리 및 로직 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 11, 2024
1 parent 962d4c6 commit 0820bd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wap.wapp.core.data.di

import com.wap.wapp.core.data.repository.auth.AuthRepository
import com.wap.wapp.core.data.repository.auth.AuthRepositoryImpl
import com.wap.wapp.core.data.repository.event.EventRepository
import com.wap.wapp.core.data.repository.event.EventRepositoryImpl
import com.wap.wapp.core.data.repository.management.ManagementRepository
Expand All @@ -19,6 +21,12 @@ import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
abstract class DataModule {
@Binds
@Singleton
abstract fun bindsAuthRepository(
authRepositoryImpl: AuthRepositoryImpl,
): AuthRepository

@Binds
@Singleton
abstract fun bindsUserRepository(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.wap.wapp.core.data.di

import com.wap.wapp.core.data.repository.auth.AuthRepository
import com.wap.wapp.core.data.repository.auth.AuthRepositoryImpl
import com.wap.wapp.core.data.repository.auth.SignInRepository
import com.wap.wapp.core.data.repository.auth.SignInRepositoryImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
Expand All @@ -10,10 +10,10 @@ import dagger.hilt.android.scopes.ActivityScoped

@Module
@InstallIn(ActivityComponent::class)
abstract class AuthRepositoryModule {
abstract class SignInRepositoryModule {
@Binds
@ActivityScoped
abstract fun bindsAuthRepository(
authRepositoryImpl: AuthRepositoryImpl,
): AuthRepository
signInRepositoryImpl: SignInRepositoryImpl,
): SignInRepository
}

0 comments on commit 0820bd7

Please sign in to comment.