Skip to content

Commit

Permalink
✨ 러닝 di 모듈 구현
Browse files Browse the repository at this point in the history
Co-authored-by: yonghanJu <[email protected]>
  • Loading branch information
bngsh and yonghanJu committed Nov 17, 2022
1 parent ff99215 commit 22c5806
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions data/src/main/java/com/whyranoid/data/di/running/RunningModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.whyranoid.data.di.running

import com.google.firebase.firestore.FirebaseFirestore
import com.whyranoid.data.running.RunningRepositoryImpl
import com.whyranoid.domain.repository.RunningRepository
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
class RunningModule {

@Provides
@Singleton
fun provideRunningDataSource(db: FirebaseFirestore): RunningDataSource {
return RunningDataSourceImpl(db)
}

@Provides
@Singleton
fun provideRunningRepository(runningDataSource: RunningDataSource): RunningRepository {
return RunningRepositoryImpl(runningDataSource)
}
}

0 comments on commit 22c5806

Please sign in to comment.