-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathServiceModule.kt
More file actions
77 lines (63 loc) · 2.63 KB
/
ServiceModule.kt
File metadata and controls
77 lines (63 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.threegap.bitnagil.di.data
import com.threegap.bitnagil.data.address.service.AddressService
import com.threegap.bitnagil.data.auth.service.AuthService
import com.threegap.bitnagil.data.auth.service.LoginService
import com.threegap.bitnagil.data.emotion.service.EmotionService
import com.threegap.bitnagil.data.file.service.FileService
import com.threegap.bitnagil.data.onboarding.service.OnBoardingService
import com.threegap.bitnagil.data.recommendroutine.service.RecommendRoutineService
import com.threegap.bitnagil.data.report.service.ReportService
import com.threegap.bitnagil.data.routine.service.RoutineService
import com.threegap.bitnagil.data.user.service.UserService
import com.threegap.bitnagil.data.version.service.VersionService
import com.threegap.bitnagil.network.Auth
import com.threegap.bitnagil.network.Kakao
import com.threegap.bitnagil.network.NoneAuth
import com.threegap.bitnagil.network.token.ReissueService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import retrofit2.create
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object ServiceModule {
@Provides
@Singleton
fun provideAuthService(@Auth retrofit: Retrofit): AuthService = retrofit.create()
@Provides
@Singleton
fun provideLoginService(@NoneAuth retrofit: Retrofit): LoginService = retrofit.create()
@Provides
@Singleton
fun providerOnBoardingService(@Auth retrofit: Retrofit): OnBoardingService = retrofit.create()
@Provides
@Singleton
fun provideRoutineService(@Auth retrofit: Retrofit): RoutineService = retrofit.create()
@Provides
@Singleton
fun providerEmotionService(@Auth retrofit: Retrofit): EmotionService = retrofit.create()
@Provides
@Singleton
fun provideReissueService(@NoneAuth retrofit: Retrofit): ReissueService = retrofit.create()
@Provides
@Singleton
fun provideUserService(@Auth retrofit: Retrofit): UserService = retrofit.create()
@Provides
@Singleton
fun provideRecommendRoutineService(@Auth retrofit: Retrofit): RecommendRoutineService = retrofit.create()
@Provides
@Singleton
fun provideVersionService(@NoneAuth retrofit: Retrofit): VersionService = retrofit.create()
@Provides
@Singleton
fun provideAddressService(@Kakao retrofit: Retrofit): AddressService = retrofit.create()
@Provides
@Singleton
fun provideFileService(@Auth retrofit: Retrofit): FileService = retrofit.create()
@Provides
@Singleton
fun provideReportService(@Auth retrofit: Retrofit): ReportService = retrofit.create()
}