-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAppModule.kt
More file actions
38 lines (33 loc) · 970 Bytes
/
AppModule.kt
File metadata and controls
38 lines (33 loc) · 970 Bytes
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
package com.paw.key.data.di
import android.content.ContentResolver
import android.content.Context
import androidx.credentials.CredentialManager
import com.paw.key.BuildConfig
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Named
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object AppModule {
@Provides
@Named("kakao.native.key")
fun provideKakaoNativeKey(): String {
return BuildConfig.KAKAO_NATIVE_KEY
}
@Provides
@Singleton
fun provideContentResolver(@ApplicationContext context: Context): ContentResolver {
return context.contentResolver
}
@Provides
@Singleton
fun provideCredentialManager(
@ApplicationContext context: Context
): CredentialManager {
return CredentialManager.create(context)
}
}