Skip to content

Commit

Permalink
[add] #98 Hilt Module 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Doreminwoo committed Jan 11, 2024
1 parent 79e2b4b commit 16768eb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/org/sopt/pingle/di/DataSourceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.pingle.data.datasource.local.DummyLocalDataSource
import org.sopt.pingle.data.datasource.remote.DummyRemoteDataSource
import org.sopt.pingle.data.datasource.remote.JoinGroupCodeRemoteDataSource
import org.sopt.pingle.data.datasource.remote.JoinGroupRemoteDataSource
import org.sopt.pingle.data.datasource.remote.MapRemoteDataSource
import org.sopt.pingle.data.datasourceimpl.local.DummyLocalDataSourceImpl
import org.sopt.pingle.data.datasourceimpl.remote.DummyRemoteDataSourceImpl
import org.sopt.pingle.data.datasourceimpl.remote.JoinGroupCodeRemoteDataSourceImpl
import org.sopt.pingle.data.datasourceimpl.remote.JoinGroupRemoteDataSourceImpl
import org.sopt.pingle.data.datasourceimpl.remote.MapRemoteDataSourceImpl
import javax.inject.Singleton

Expand All @@ -31,5 +31,5 @@ abstract class DataSourceModule {

@Binds
@Singleton
abstract fun bindsJoinGroupCodeRemoteDataSource(joinGroupCodeRemoteDataSourceImpl: JoinGroupCodeRemoteDataSourceImpl): JoinGroupCodeRemoteDataSource
abstract fun bindsJoinGroupRemoteDataSource(joinGroupRemoteDataSourceImpl: JoinGroupRemoteDataSourceImpl): JoinGroupRemoteDataSource
}
6 changes: 3 additions & 3 deletions app/src/main/java/org/sopt/pingle/di/RepositoryModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.pingle.data.repository.DummyRepositoryImpl
import org.sopt.pingle.data.repository.JoinGroupCodeRepositoryImpl
import org.sopt.pingle.data.repository.JoinGroupRepositoryImpl
import org.sopt.pingle.data.repository.MapRepositoryImpl
import org.sopt.pingle.domain.repository.DummyRepository
import org.sopt.pingle.domain.repository.JoinGroupCodeRepository
import org.sopt.pingle.domain.repository.JoinGroupRepository
import org.sopt.pingle.domain.repository.MapRepository
import javax.inject.Singleton

Expand All @@ -25,5 +25,5 @@ abstract class RepositoryModule {

@Binds
@Singleton
abstract fun bindsJoinGroupCodeRepository(joinGroupCodeRepositoryImpl: JoinGroupCodeRepositoryImpl): JoinGroupCodeRepository
abstract fun bindsJoinGroupRepository(joinGroupRepositoryImpl: JoinGroupRepositoryImpl): JoinGroupRepository
}
12 changes: 9 additions & 3 deletions app/src/main/java/org/sopt/pingle/di/UseCaseModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.pingle.domain.repository.DummyRepository
import org.sopt.pingle.domain.repository.JoinGroupCodeRepository
import org.sopt.pingle.domain.repository.JoinGroupRepository
import org.sopt.pingle.domain.repository.MapRepository
import org.sopt.pingle.domain.usecase.GetDummyUserListUseCase
import org.sopt.pingle.domain.usecase.GetJoinGroupInfoUseCase
import org.sopt.pingle.domain.usecase.GetPinListWithoutFilteringUseCase
import org.sopt.pingle.domain.usecase.PostJoinGroupCodeUseCase
import org.sopt.pingle.domain.usecase.SetDummyDataUseCase
import javax.inject.Singleton

Expand All @@ -33,6 +34,11 @@ class UseCaseModule {

@Provides
@Singleton
fun providesGetJoinGroupInfoUseCase(joinGroupCodeRepository: JoinGroupCodeRepository): GetJoinGroupInfoUseCase =
GetJoinGroupInfoUseCase(joinGroupCodeRepository = joinGroupCodeRepository)
fun providesGetJoinGroupInfoUseCase(joinGroupRepository: JoinGroupRepository): GetJoinGroupInfoUseCase =
GetJoinGroupInfoUseCase(joinGroupRepository = joinGroupRepository)

@Provides
@Singleton
fun providesPostJoinGroupCodeUseCase(joinGroupRepository: JoinGroupRepository): PostJoinGroupCodeUseCase =
PostJoinGroupCodeUseCase(joinGroupRepository = joinGroupRepository)
}

0 comments on commit 16768eb

Please sign in to comment.