From 79b26df2d373db55e47faab977b9668f7071f338 Mon Sep 17 00:00:00 2001 From: jinuemong Date: Tue, 6 Feb 2024 15:09:41 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]:=20=EC=B6=A9=EB=8F=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 12 ++++++------ .../bookkeeping/android/data/di/RepositoryModule.kt | 8 ++++++++ .../feature/relation/KakaoFriendRepositoryImpl.kt | 2 +- .../feature/relation/GetKakaoFriendInfoUseCase.kt | 2 +- gradle/libs.versions.toml | 6 +++--- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 006d1091..0115b657 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -29,26 +29,26 @@ android { isMinifyEnabled = true isShrinkResources = true isDebuggable = false - android.buildFeatures.buildConfig = true + android.buildFeatures.buildConfig = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) - buildConfigField("String","KAKAO_APP_KEY" , getLocalProperty("KAKAO_APP_KEY")) - resValue ("string", "kakao_oauth_key", getLocalProperty("KAKAO_OAUTH_KEY")) + buildConfigField("String", "KAKAO_APP_KEY", getLocalProperty("KAKAO_APP_KEY")) + resValue("string", "kakao_oauth_key", getLocalProperty("KAKAO_OAUTH_KEY")) } debug { isMinifyEnabled = false isShrinkResources = false isDebuggable = true - android.buildFeatures.buildConfig = true + android.buildFeatures.buildConfig = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) applicationIdSuffix = ".debug" - buildConfigField("String","KAKAO_APP_KEY" , getLocalProperty("KAKAO_APP_KEY")) - resValue ("string", "kakao_oauth_key", getLocalProperty("KAKAO_OAUTH_KEY")) + buildConfigField("String", "KAKAO_APP_KEY", getLocalProperty("KAKAO_APP_KEY")) + resValue("string", "kakao_oauth_key", getLocalProperty("KAKAO_OAUTH_KEY")) } } diff --git a/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/di/RepositoryModule.kt b/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/di/RepositoryModule.kt index b9aa5b11..1df414f2 100644 --- a/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/di/RepositoryModule.kt +++ b/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/di/RepositoryModule.kt @@ -5,6 +5,7 @@ import ac.dnd.bookkeeping.android.data.repository.authentication.MockAuthenticat import ac.dnd.bookkeeping.android.data.repository.authentication.sociallogin.KakaoLoginRepositoryImpl import ac.dnd.bookkeeping.android.data.repository.feature.group.MockGroupRepository import ac.dnd.bookkeeping.android.data.repository.feature.heart.MockHeartRepository +import ac.dnd.bookkeeping.android.data.repository.feature.relation.KakaoFriendRepositoryImpl import ac.dnd.bookkeeping.android.data.repository.feature.relation.MockRelationRepository import ac.dnd.bookkeeping.android.data.repository.feature.schedule.MockScheduleRepository import ac.dnd.bookkeeping.android.data.repository.feature.statistics.MockStatisticsRepository @@ -17,6 +18,7 @@ import ac.dnd.bookkeeping.android.domain.repository.GalleryImageRepository import ac.dnd.bookkeeping.android.domain.repository.GalleryRepository import ac.dnd.bookkeeping.android.domain.repository.GroupRepository import ac.dnd.bookkeeping.android.domain.repository.HeartRepository +import ac.dnd.bookkeeping.android.domain.repository.KakaoFriendRepository import ac.dnd.bookkeeping.android.domain.repository.KakaoLoginRepository import ac.dnd.bookkeeping.android.domain.repository.MemberRepository import ac.dnd.bookkeeping.android.domain.repository.RelationRepository @@ -80,6 +82,12 @@ internal abstract class RepositoryModule { kakaoLoginRepositoryImpl: KakaoLoginRepositoryImpl ): KakaoLoginRepository + @Binds + @Singleton + abstract fun bindsKakaoFriendRepository( + kakaoFriendRepositoryImpl: KakaoFriendRepositoryImpl + ): KakaoFriendRepository + @Binds @Singleton abstract fun bindsFileRepository( diff --git a/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/repository/feature/relation/KakaoFriendRepositoryImpl.kt b/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/repository/feature/relation/KakaoFriendRepositoryImpl.kt index 0fbd36e8..4c236dfd 100644 --- a/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/repository/feature/relation/KakaoFriendRepositoryImpl.kt +++ b/data/src/main/kotlin/ac/dnd/bookkeeping/android/data/repository/feature/relation/KakaoFriendRepositoryImpl.kt @@ -26,7 +26,7 @@ class KakaoFriendRepositoryImpl @Inject constructor( Result.success(it) } .onFailure { error -> - throw ServerException("Error",error.message.toString()) + throw ServerException("Error", error.message.toString()) } } diff --git a/domain/src/main/kotlin/ac/dnd/bookkeeping/android/domain/usecase/feature/relation/GetKakaoFriendInfoUseCase.kt b/domain/src/main/kotlin/ac/dnd/bookkeeping/android/domain/usecase/feature/relation/GetKakaoFriendInfoUseCase.kt index cc94367a..1f6b4925 100644 --- a/domain/src/main/kotlin/ac/dnd/bookkeeping/android/domain/usecase/feature/relation/GetKakaoFriendInfoUseCase.kt +++ b/domain/src/main/kotlin/ac/dnd/bookkeeping/android/domain/usecase/feature/relation/GetKakaoFriendInfoUseCase.kt @@ -6,7 +6,7 @@ import ac.dnd.bookkeeping.android.domain.repository.KakaoFriendRepository class GetKakaoFriendInfoUseCase( private val kakaoFriendRepository: KakaoFriendRepository ) { - suspend operator fun invoke(): Result{ + suspend operator fun invoke(): Result { return kakaoFriendRepository.loadFriendInfo() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7131e320..e11c45bf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -75,8 +75,8 @@ androidx-paging-common = { module = "androidx.paging:paging-common-ktx", version # Google google-system-contoller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "google-system-contoller" } # Kakao -kakao-user = { module = "com.kakao.sdk:v2-user", version.ref = "kakao"} -kakao-friend = {module = "com.kakao.sdk:v2-friend", version.ref = "kakao"} +kakao-user = { module = "com.kakao.sdk:v2-user", version.ref = "kakao" } +kakao-friend = { module = "com.kakao.sdk:v2-friend", version.ref = "kakao" } # Network ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } @@ -118,4 +118,4 @@ androidx-presentation = ["androidx-core", "androidx-appcompat", "androidx-compos network = ["ktor-core", "ktor-okhttp", "ktor-resources", "ktor-content-negotiation", "ktor-kotlinx-serialization", "ktor-auth", "kotlinx-serialization"] logging = ["timber", "sentry"] -kakao = ["kakao-user","kakao-friend"] +kakao = ["kakao-user", "kakao-friend"]