From 22c5806166f0abc69e72838f5d9bf234cca2b83d Mon Sep 17 00:00:00 2001 From: bngsh Date: Thu, 17 Nov 2022 21:02:20 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=EB=9F=AC=EB=8B=9D=20di=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: yonghanJu --- .../data/di/running/RunningModule.kt | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 data/src/main/java/com/whyranoid/data/di/running/RunningModule.kt diff --git a/data/src/main/java/com/whyranoid/data/di/running/RunningModule.kt b/data/src/main/java/com/whyranoid/data/di/running/RunningModule.kt new file mode 100644 index 00000000..b343c7ce --- /dev/null +++ b/data/src/main/java/com/whyranoid/data/di/running/RunningModule.kt @@ -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) + } +}