From 3092a0a16e0de81cd812aa4471e1f4629dd353b0 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 19 Aug 2024 00:42:13 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[FIX/#113]=20navigation=20implementation=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/Dependencies.kt | 4 ++++ buildSrc/src/main/kotlin/Versions.kt | 1 + presentation/build.gradle.kts | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index d62cb5d1..e2060715 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -19,6 +19,10 @@ object AndroidXDependencies { const val legacy = "androidx.legacy:legacy-support-v4:${Versions.legacySupportVersion}" const val security = "androidx.security:security-crypto:${Versions.securityVersion}" + const val navigationFragment = + "androidx.navigation:navigation-fragment-ktx:${Versions.navigationVersion}" + const val navigationUi = "androidx.navigation:navigation-ui-ktx:${Versions.navigationVersion}" + const val lifeCycleKtx = "androidx.lifecycle:lifecycle-runtime-ktx:${Versions.lifecycleVersion}" const val lifecycleJava8 = "androidx.lifecycle:lifecycle-common-java8:${Versions.lifecycleVersion}" diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 77685f54..f0685f3d 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -15,6 +15,7 @@ object Versions { const val securityVersion = "1.1.0-alpha06" const val hiltVersion = "2.46.1" const val fragmentKtxVersion = "1.5.7" + const val navigationVersion = "2.7.7" const val coroutinesAndroidVersion = "1.7.1" const val lifecycleVersion = "2.6.1" const val ossPluginVersion = "0.10.4" diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 12e6934e..07829997 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -52,6 +52,8 @@ dependencies { implementation(appCompat) implementation(constraintLayout) implementation(fragment) + implementation(navigationFragment) + implementation(navigationUi) implementation(startup) implementation(legacy) implementation(security) @@ -68,9 +70,9 @@ dependencies { kapt(hiltWorkManagerCompiler) } - implementation(MaterialDesignDependencies.materialDesign) - implementation(libs.androidx.navigation.fragment.ktx) - implementation(libs.androidx.navigation.ui.ktx) + MaterialDesignDependencies.run { + implementation(materialDesign) + } TestDependencies.run { testImplementation(jUnit) From 01e8b6143738b3b02dc96afc2cc69a6d865e099a Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 19 Aug 2024 00:42:25 +0900 Subject: [PATCH 2/5] Initial commit --- gradle/libs.versions.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index aba82741..54596282 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,8 +17,6 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "j androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } -androidx-navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigationFragmentKtx" } -androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigationUiKtx" } [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } From ae637ee9dc540413b7fb773c3dd8d1f4ab4d8c73 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 19 Aug 2024 00:45:50 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[FIX/#113]=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20request=20dto=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 --- .../main/java/kr/genti/data/dto/request/AuthRequestDto.kt | 8 +++----- .../kr/genti/domain/entity/request/AuthRequestModel.kt | 3 +-- .../kr/genti/presentation/auth/login/LoginViewModel.kt | 6 +----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/data/src/main/java/kr/genti/data/dto/request/AuthRequestDto.kt b/data/src/main/java/kr/genti/data/dto/request/AuthRequestDto.kt index 1711e7f6..e95d54b9 100644 --- a/data/src/main/java/kr/genti/data/dto/request/AuthRequestDto.kt +++ b/data/src/main/java/kr/genti/data/dto/request/AuthRequestDto.kt @@ -6,12 +6,10 @@ import kr.genti.domain.entity.request.AuthRequestModel @Serializable data class AuthRequestDto( - @SerialName("token") - val token: String, - @SerialName("oauthPlatform") - val oauthPlatform: String, + @SerialName("accessToken") + val accessToken: String, ) { companion object { - fun AuthRequestModel.toDto() = AuthRequestDto(token, oauthPlatform) + fun AuthRequestModel.toDto() = AuthRequestDto(accessToken) } } diff --git a/domain/src/main/kotlin/kr/genti/domain/entity/request/AuthRequestModel.kt b/domain/src/main/kotlin/kr/genti/domain/entity/request/AuthRequestModel.kt index 3e87e9bc..768ef0d9 100644 --- a/domain/src/main/kotlin/kr/genti/domain/entity/request/AuthRequestModel.kt +++ b/domain/src/main/kotlin/kr/genti/domain/entity/request/AuthRequestModel.kt @@ -1,6 +1,5 @@ package kr.genti.domain.entity.request data class AuthRequestModel( - val token: String, - val oauthPlatform: String, + val accessToken: String, ) diff --git a/presentation/src/main/java/kr/genti/presentation/auth/login/LoginViewModel.kt b/presentation/src/main/java/kr/genti/presentation/auth/login/LoginViewModel.kt index 83ef4fb5..ea93a666 100644 --- a/presentation/src/main/java/kr/genti/presentation/auth/login/LoginViewModel.kt +++ b/presentation/src/main/java/kr/genti/presentation/auth/login/LoginViewModel.kt @@ -62,7 +62,7 @@ class LoginViewModel private fun changeTokenFromServer(accessToken: String) { viewModelScope.launch { - authRepository.postOauthDataToGetToken(AuthRequestModel(accessToken, KAKAO)) + authRepository.postOauthDataToGetToken(AuthRequestModel(accessToken)) .onSuccess { with(userRepository) { setTokens(it.accessToken, it.refreshToken) @@ -75,8 +75,4 @@ class LoginViewModel } } } - - companion object { - const val KAKAO = "KAKAO" - } } From 7634ac66aba815887625f758172b93cb4b93b546 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 19 Aug 2024 00:46:52 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[FIX/#113]=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=84=9C=EB=B9=84=EC=8A=A4=20url?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/src/main/java/kr/genti/data/service/AuthService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/main/java/kr/genti/data/service/AuthService.kt b/data/src/main/java/kr/genti/data/service/AuthService.kt index 4a7b83db..37c11a25 100644 --- a/data/src/main/java/kr/genti/data/service/AuthService.kt +++ b/data/src/main/java/kr/genti/data/service/AuthService.kt @@ -14,7 +14,7 @@ interface AuthService { @Body request: ReissueRequestDto, ): BaseResponse - @POST("auth/v1/login/oauth2/token") + @POST("auth/v1/login/oauth2/token/kakao") suspend fun postOauthDataToGetToken( @Body request: AuthRequestDto, ): BaseResponse From 709c325426144257ef3a753255ac7f8d90dd132c Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 19 Aug 2024 00:50:19 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[FIX/#113]=20birthDate=20=EB=B3=80=EC=88=98?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD=EC=82=AC=ED=95=AD=20=EB=8C=80?= =?UTF-8?q?=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/kr/genti/data/dto/request/SignupRequestDto.kt | 6 +++--- .../main/java/kr/genti/data/dto/response/SignUpUserDto.kt | 6 +++--- .../kr/genti/domain/entity/request/SignupRequestModel.kt | 2 +- .../kr/genti/domain/entity/response/SignUpUserModel.kt | 2 +- .../kr/genti/presentation/auth/signup/SignupActivity.kt | 2 +- .../kr/genti/presentation/auth/signup/SignupViewModel.kt | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/src/main/java/kr/genti/data/dto/request/SignupRequestDto.kt b/data/src/main/java/kr/genti/data/dto/request/SignupRequestDto.kt index e9ea86bf..9a6fb41f 100644 --- a/data/src/main/java/kr/genti/data/dto/request/SignupRequestDto.kt +++ b/data/src/main/java/kr/genti/data/dto/request/SignupRequestDto.kt @@ -6,12 +6,12 @@ import kr.genti.domain.entity.request.SignupRequestModel @Serializable data class SignupRequestDto( - @SerialName("birthDate") - val birthDate: String, + @SerialName("birthYear") + val birthYear: String, @SerialName("sex") val sex: String, ) { companion object { - fun SignupRequestModel.toDto() = SignupRequestDto(birthDate, sex) + fun SignupRequestModel.toDto() = SignupRequestDto(birthYear, sex) } } diff --git a/data/src/main/java/kr/genti/data/dto/response/SignUpUserDto.kt b/data/src/main/java/kr/genti/data/dto/response/SignUpUserDto.kt index 73c1bd1f..0f7dac30 100644 --- a/data/src/main/java/kr/genti/data/dto/response/SignUpUserDto.kt +++ b/data/src/main/java/kr/genti/data/dto/response/SignUpUserDto.kt @@ -12,10 +12,10 @@ data class SignUpUserDto( val lastLoginOauthPlatform: String, @SerialName("nickname") val nickname: String, - @SerialName("birthDate") - val birthDate: String, + @SerialName("birthYear") + val birthYear: String, @SerialName("sex") val sex: String, ) { - fun toModel() = SignUpUserModel(email, lastLoginOauthPlatform, nickname, birthDate, sex) + fun toModel() = SignUpUserModel(email, lastLoginOauthPlatform, nickname, birthYear, sex) } diff --git a/domain/src/main/kotlin/kr/genti/domain/entity/request/SignupRequestModel.kt b/domain/src/main/kotlin/kr/genti/domain/entity/request/SignupRequestModel.kt index 332c4e63..a730d026 100644 --- a/domain/src/main/kotlin/kr/genti/domain/entity/request/SignupRequestModel.kt +++ b/domain/src/main/kotlin/kr/genti/domain/entity/request/SignupRequestModel.kt @@ -1,6 +1,6 @@ package kr.genti.domain.entity.request data class SignupRequestModel( - val birthDate: String, + val birthYear: String, val sex: String, ) diff --git a/domain/src/main/kotlin/kr/genti/domain/entity/response/SignUpUserModel.kt b/domain/src/main/kotlin/kr/genti/domain/entity/response/SignUpUserModel.kt index 94d60864..109e6662 100644 --- a/domain/src/main/kotlin/kr/genti/domain/entity/response/SignUpUserModel.kt +++ b/domain/src/main/kotlin/kr/genti/domain/entity/response/SignUpUserModel.kt @@ -4,6 +4,6 @@ data class SignUpUserModel( val email: String, val lastLoginOauthPlatform: String, val nickname: String, - val birthDate: String, + val birthYear: String, val sex: String, ) diff --git a/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupActivity.kt b/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupActivity.kt index 777deebb..2d7ee3ae 100644 --- a/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupActivity.kt +++ b/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupActivity.kt @@ -103,7 +103,7 @@ class SignupActivity : BaseActivity(R.layout.activity_sig updateProperties("user_email", state.data.email) updateProperties("user_platform", state.data.lastLoginOauthPlatform) updateProperties("user_nickname", state.data.nickname) - updateProperties("user_birth_date", state.data.birthDate) + updateProperties("user_birth_year", state.data.birthYear) updateProperties("user_sex", state.data.sex) updateIntProperties("user_share", 0) updateIntProperties("user_picturedownload", 0) diff --git a/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupViewModel.kt b/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupViewModel.kt index f588ffde..1083c479 100644 --- a/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupViewModel.kt +++ b/presentation/src/main/java/kr/genti/presentation/auth/signup/SignupViewModel.kt @@ -51,7 +51,7 @@ class SignupViewModel checkAllSelected() } - fun checkAllSelected() { + private fun checkAllSelected() { isAllSelected.value = isGenderSelected.value == true && isYearSelected.value == true }