Skip to content

Commit

Permalink
[ADD/#40] Feed 서버통신 di 레이어 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jun 2, 2024
1 parent 2992767 commit 0575e3b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/kr/genti/android/di/DataSourceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kr.genti.data.dataSource.AuthDataSource
import kr.genti.data.dataSource.CreateDataSource
import kr.genti.data.dataSource.FeedDataSource
import kr.genti.data.dataSourceImpl.AuthDataSourceImpl
import kr.genti.data.dataSourceImpl.CreateDataSourceImpl
import kr.genti.data.dataSourceImpl.FeedDataSourceImpl
import javax.inject.Singleton

@Module
Expand All @@ -20,4 +22,8 @@ object DataSourceModule {
@Provides
@Singleton
fun provideCreateDataSource(createDataSourceImpl: CreateDataSourceImpl): CreateDataSource = createDataSourceImpl

@Provides
@Singleton
fun provideFeedDataSource(feedDataSourceImpl: FeedDataSourceImpl): FeedDataSource = feedDataSourceImpl
}
6 changes: 6 additions & 0 deletions app/src/main/java/kr/genti/android/di/RepositoryModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kr.genti.data.repositoryImpl.AuthRepositoryImpl
import kr.genti.data.repositoryImpl.CreateRepositoryImpl
import kr.genti.data.repositoryImpl.FeedRepositoryImpl
import kr.genti.domain.repository.AuthRepository
import kr.genti.domain.repository.CreateRepository
import kr.genti.domain.repository.FeedRepository
import javax.inject.Singleton

@Module
Expand All @@ -20,4 +22,8 @@ object RepositoryModule {
@Provides
@Singleton
fun provideCreateRepository(createRepositoryImpl: CreateRepositoryImpl): CreateRepository = createRepositoryImpl

@Provides
@Singleton
fun provideFeedRepository(feedRepositoryImpl: FeedRepositoryImpl): FeedRepository = feedRepositoryImpl
}
7 changes: 7 additions & 0 deletions app/src/main/java/kr/genti/android/di/ServiceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kr.genti.data.service.AuthService
import kr.genti.data.service.CreateService
import kr.genti.data.service.FeedService
import retrofit2.Retrofit
import javax.inject.Singleton

Expand All @@ -23,4 +24,10 @@ object ServiceModule {
fun provideCreateService(
@RetrofitQualifier.JWT retrofit: Retrofit,
): CreateService = retrofit.create(CreateService::class.java)

@Provides
@Singleton
fun provideFeedService(
@RetrofitQualifier.JWT retrofit: Retrofit,
): FeedService = retrofit.create(FeedService::class.java)
}

0 comments on commit 0575e3b

Please sign in to comment.