Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
292a8c5
add mypage feature module
Moony-H Jul 31, 2026
564c31c
apply feature convention plugin to mypage module
Moony-H Jul 31, 2026
b9ff15b
[Feat] 마이페이지 홈 ViewModel 및 UI 상태 구현
Moony-H Jul 31, 2026
e269132
[Chore] MyPage feature 모듈 코드 스타일 적용
Moony-H Jul 31, 2026
ed8fa08
remove example tests from mypage module
Moony-H Jul 31, 2026
1a79909
register feature convention plugin in version catalog
Moony-H Aug 1, 2026
ff5beae
feat: add ic_manage_saju_info icon
Moony-H Aug 1, 2026
c0bc03f
add ic_setting drawable
Moony-H Aug 1, 2026
1bf24ac
add mail icon
Moony-H Aug 1, 2026
1dc9b6f
add ic_logout icon
Moony-H Aug 1, 2026
e6d3e05
add ic_chevron_right drawable
Moony-H Aug 1, 2026
501ccf2
add MyPage and common string resources
Moony-H Aug 3, 2026
4509c41
[Domain] User 모델 내 name 필드 추가
Moony-H Aug 3, 2026
01a15cf
[Feat] Implement MyPage home screen UI
Moony-H Aug 3, 2026
a2bb6bb
implement MyPage home UI components and refactor menu logic
Moony-H Aug 3, 2026
a7d8491
add @param use-site target to MyPageMenuType annotations
Moony-H Aug 3, 2026
7f81902
add comments for loading and error states in MyPageHomeScreen
Moony-H Aug 4, 2026
f90b680
[Feat] mypage feature 연결 및 UI 개선
Moony-H Aug 4, 2026
46ef86e
[Style] reformat code and apply trailing commas in mypage feature
Moony-H Aug 4, 2026
803f974
refactor: remove unused Orbit syntax and helper function in MyPageHom…
Moony-H Aug 4, 2026
d36bb7f
Chore: 앱 최신 버전 string resource 삭제
Moony-H Aug 5, 2026
cf64267
Fix: 앱 버전 체크 화면 수정
Moony-H Aug 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies {
implementation(projects.core.dataLocal)
implementation(projects.core.navigation)
implementation(projects.core.designsystem)
implementation(projects.feature.mypage)

implementation(libs.androidx.navigation3.runtime)
implementation(libs.androidx.navigation3.ui)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class FakeUserRepository
Result.success(
User(
id = "fake-user-id",
name = "토닥이",
gender = Gender.FEMALE,
birth =
Birth(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ import com.kikidan.designsystem.theme.TodakunColor
import com.kikidan.designsystem.theme.TodakunTheme
import com.kikidan.designsystem.theme.TodakunTypography

/**
* A custom tab component for the Todakun design system.
*
* @param text The text to be displayed on the tab.
* @param selected Whether the tab is currently selected.
* @param onClick Callback to be invoked when the tab is clicked.
* @param modifier The modifier to be applied to the tab.
*/
@Composable
fun TodakunTab(
text: String,
Expand Down Expand Up @@ -62,6 +70,9 @@ fun TodakunTab(
}
}

/**
* Default values for [TodakunTab].
*/
private object TodakunTabDefaults {
val Shape = RoundedCornerShape(99.dp)
}
Expand Down
24 changes: 24 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_chevron_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M7.576,4.411C7.902,4.086 8.429,4.086 8.754,4.411L13.755,9.411C14.08,9.736 14.08,10.264 13.755,10.589L8.754,15.589C8.429,15.915 7.902,15.915 7.576,15.589C7.251,15.264 7.251,14.736 7.576,14.411L11.987,10L7.576,5.589C7.251,5.264 7.251,4.736 7.576,4.411Z"
android:fillColor="#000000"/>
</vector>
39 changes: 39 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_logout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M13.334,13.334V15.001C13.334,16.842 11.842,18.334 10.001,18.334H5.834C3.993,18.334 2.501,16.842 2.501,15.001V5.001C2.501,3.16 3.993,1.667 5.834,1.667H10.001C11.842,1.667 13.334,3.16 13.334,5.001V6.667"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#9A9A9A"
android:strokeLineCap="round"/>
<path
android:pathData="M15.834,12.501L17.745,10.59C18.07,10.264 18.07,9.737 17.745,9.411L15.834,7.501"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#9A9A9A"
android:strokeLineCap="round"/>
<path
android:pathData="M17.5,10.001L7.5,10.001"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#9A9A9A"
android:strokeLineCap="round"/>
</vector>
33 changes: 33 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_mail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M5.833,3.333L14.166,3.333A4.167,4.167 0,0 1,18.333 7.499L18.333,12.499A4.167,4.167 0,0 1,14.166 16.666L5.833,16.666A4.167,4.167 0,0 1,1.666 12.499L1.666,7.499A4.167,4.167 0,0 1,5.833 3.333z"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"/>
<path
android:pathData="M5,7.499L9,10.499C9.593,10.944 10.407,10.944 11,10.499L15,7.499"
android:strokeLineJoin="round"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"
android:strokeLineCap="round"/>
</vector>
45 changes: 45 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_manage_saju_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M8.333,5.833m3.333,0a3.333,3.333 0,1 0,-6.667 0a3.333,3.333 0,1 0,6.667 0"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"/>
<path
android:pathData="M2.5,14.112C2.5,13.395 2.951,12.756 3.626,12.515C6.67,11.427 9.997,11.427 13.041,12.515C13.716,12.756 14.167,13.395 14.167,14.112V15.208C14.167,16.198 13.29,16.958 12.311,16.818L11.515,16.705C9.405,16.403 7.262,16.403 5.151,16.705L4.356,16.818C3.376,16.958 2.5,16.198 2.5,15.208V14.112Z"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"/>
<path
android:pathData="M14.167,9.167H17.5"
android:strokeLineJoin="round"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"
android:strokeLineCap="round"/>
<path
android:pathData="M15.834,7.5L15.834,10.833"
android:strokeLineJoin="round"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"
android:strokeLineCap="round"/>
</vector>
29 changes: 29 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M10.002,10.001m2.5,0a2.5,2.5 0,1 0,-5 0a2.5,2.5 0,1 0,5 0"
android:strokeWidth="1.25"
android:fillColor="#00000000"
android:strokeColor="#171717"/>
<path
android:pathData="M10.001,1.668V1.043H10.001L10.001,1.668ZM13.751,4.116L13.438,4.657L13.439,4.657L13.751,4.116ZM13.751,15.886L13.439,15.345L13.439,15.345L13.751,15.886ZM10.001,18.334L10.001,18.959H10.001V18.334ZM6.251,15.886L6.563,15.345L6.563,15.345L6.251,15.886ZM6.251,4.116L6.563,4.657L6.563,4.657L6.251,4.116ZM7.946,1.923L7.793,1.317L7.946,1.923ZM4.431,15.619L4.574,16.228L4.431,15.619ZM3.674,15.422L4.149,15.015L3.674,15.422ZM7.946,18.078L8.1,17.473L7.946,18.078ZM7.434,17.487L8.043,17.347L7.434,17.487ZM12.567,17.488L11.958,17.347L12.567,17.488ZM12.054,18.079L11.901,17.473L12.054,18.079ZM15.571,15.619L15.715,15.011L15.571,15.619ZM17.869,7.257L17.279,7.463L17.869,7.257ZM17.578,8.074L17.181,7.591L17.578,8.074ZM2.133,12.744L1.543,12.95L2.133,12.744ZM2.425,11.928L2.027,11.446L2.425,11.928ZM15.571,4.382L15.714,4.99L15.571,4.382ZM3.674,4.58L3.2,4.173L3.674,4.58ZM17.578,11.928L17.976,11.446L17.578,11.928ZM17.869,12.744L17.279,12.539L17.869,12.744ZM12.054,1.922L11.901,2.528L12.054,1.922ZM12.567,2.514L13.176,2.373L12.567,2.514ZM10.001,1.668V2.293C10.657,2.293 11.294,2.375 11.901,2.528L12.054,1.922L12.207,1.316C11.501,1.138 10.761,1.043 10.001,1.043V1.668ZM12.567,2.514L11.958,2.654C12.146,3.467 12.657,4.206 13.438,4.657L13.751,4.116L14.064,3.574C13.596,3.304 13.289,2.863 13.176,2.373L12.567,2.514ZM13.751,4.116L13.439,4.657C14.156,5.071 14.969,5.166 15.714,4.99L15.571,4.382L15.427,3.774C14.978,3.88 14.493,3.822 14.064,3.574L13.751,4.116ZM16.327,4.58L15.852,4.986C16.472,5.709 16.96,6.547 17.279,7.463L17.869,7.257L18.459,7.051C18.088,5.985 17.521,5.011 16.801,4.173L16.327,4.58ZM17.578,8.074L17.181,7.591C16.487,8.163 16.043,9.03 16.043,10.001H16.668H17.293C17.293,9.42 17.558,8.901 17.976,8.556L17.578,8.074ZM16.668,10.001H16.043C16.043,10.973 16.488,11.839 17.181,12.41L17.578,11.928L17.976,11.446C17.558,11.101 17.293,10.583 17.293,10.001H16.668ZM17.869,12.744L17.279,12.539C16.96,13.455 16.473,14.293 15.853,15.015L16.328,15.422L16.802,15.829C17.521,14.99 18.088,14.016 18.46,12.95L17.869,12.744ZM15.571,15.619L15.715,15.011C14.969,14.835 14.156,14.931 13.439,15.345L13.751,15.886L14.064,16.427C14.493,16.179 14.979,16.122 15.428,16.228L15.571,15.619ZM13.751,15.886L13.439,15.345C12.657,15.796 12.146,16.535 11.958,17.347L12.567,17.488L13.176,17.628C13.289,17.138 13.596,16.698 14.064,16.427L13.751,15.886ZM12.054,18.079L11.901,17.473C11.294,17.627 10.657,17.709 10.001,17.709V18.334V18.959C10.762,18.959 11.501,18.864 12.208,18.685L12.054,18.079ZM10.001,18.334L10.001,17.709C9.344,17.709 8.708,17.627 8.1,17.473L7.946,18.078L7.793,18.684C8.5,18.864 9.239,18.959 10.001,18.959L10.001,18.334ZM7.434,17.487L8.043,17.347C7.855,16.535 7.345,15.796 6.563,15.345L6.251,15.886L5.938,16.427C6.406,16.697 6.712,17.138 6.825,17.628L7.434,17.487ZM6.251,15.886L6.563,15.345C5.846,14.931 5.033,14.835 4.287,15.011L4.431,15.619L4.574,16.228C5.023,16.122 5.509,16.179 5.938,16.427L6.251,15.886ZM3.674,15.422L4.149,15.015C3.53,14.293 3.043,13.455 2.724,12.539L2.133,12.744L1.543,12.95C1.914,14.016 2.481,14.99 3.2,15.828L3.674,15.422ZM2.425,11.928L2.822,12.41C3.515,11.839 3.96,10.973 3.96,10.001H3.335H2.71C2.71,10.583 2.445,11.101 2.027,11.446L2.425,11.928ZM3.335,10.001H3.96C3.96,9.03 3.516,8.163 2.822,7.591L2.425,8.074L2.027,8.556C2.445,8.901 2.71,9.42 2.71,10.001H3.335ZM2.134,7.257L2.724,7.463C3.043,6.546 3.53,5.709 4.149,4.987L3.674,4.58L3.2,4.173C2.481,5.012 1.915,5.986 1.543,7.052L2.134,7.257ZM4.431,4.382L4.287,4.991C5.033,5.167 5.846,5.071 6.563,4.657L6.251,4.116L5.938,3.574C5.509,3.822 5.023,3.88 4.574,3.774L4.431,4.382ZM6.251,4.116L6.563,4.657C7.345,4.206 7.855,3.467 8.043,2.655L7.434,2.515L6.825,2.374C6.712,2.864 6.406,3.304 5.938,3.574L6.251,4.116ZM7.946,1.923L8.1,2.529C8.707,2.375 9.344,2.293 10.001,2.293L10.001,1.668L10.001,1.043C9.24,1.043 8.5,1.138 7.793,1.317L7.946,1.923ZM7.434,2.515L8.043,2.655C8.056,2.599 8.078,2.56 8.094,2.539C8.109,2.521 8.112,2.526 8.1,2.529L7.946,1.923L7.793,1.317C7.217,1.463 6.92,1.96 6.825,2.374L7.434,2.515ZM2.425,8.074L2.822,7.591C2.772,7.55 2.743,7.505 2.731,7.474C2.721,7.449 2.728,7.45 2.724,7.463L2.134,7.257L1.543,7.052C1.322,7.686 1.665,8.257 2.027,8.556L2.425,8.074ZM4.431,15.619L4.287,15.011C4.231,15.024 4.186,15.022 4.16,15.016C4.138,15.011 4.141,15.006 4.149,15.015L3.674,15.422L3.2,15.828C3.585,16.278 4.161,16.325 4.574,16.228L4.431,15.619ZM7.946,18.078L8.1,17.473C8.112,17.476 8.109,17.48 8.094,17.463C8.077,17.442 8.056,17.403 8.043,17.347L7.434,17.487L6.825,17.628C6.92,18.042 7.217,18.538 7.793,18.684L7.946,18.078ZM12.567,17.488L11.958,17.347C11.945,17.403 11.923,17.443 11.906,17.464C11.892,17.481 11.889,17.476 11.901,17.473L12.054,18.079L12.208,18.685C12.783,18.539 13.081,18.042 13.176,17.628L12.567,17.488ZM16.328,15.422L15.853,15.015C15.861,15.006 15.864,15.011 15.842,15.016C15.816,15.022 15.771,15.024 15.715,15.011L15.571,15.619L15.428,16.228C15.841,16.325 16.417,16.278 16.802,15.829L16.328,15.422ZM17.869,7.257L17.279,7.463C17.275,7.45 17.282,7.449 17.272,7.474C17.26,7.505 17.231,7.55 17.181,7.591L17.578,8.074L17.976,8.556C18.338,8.257 18.681,7.686 18.459,7.051L17.869,7.257ZM2.133,12.744L2.724,12.539C2.728,12.551 2.721,12.552 2.731,12.527C2.742,12.497 2.772,12.452 2.822,12.41L2.425,11.928L2.027,11.446C1.665,11.745 1.322,12.316 1.543,12.95L2.133,12.744ZM15.571,4.382L15.714,4.99C15.77,4.977 15.815,4.98 15.841,4.986C15.863,4.991 15.86,4.995 15.852,4.986L16.327,4.58L16.801,4.173C16.416,3.723 15.84,3.676 15.427,3.774L15.571,4.382ZM3.674,4.58L4.149,4.987C4.141,4.996 4.138,4.991 4.16,4.986C4.186,4.98 4.231,4.978 4.287,4.991L4.431,4.382L4.574,3.774C4.161,3.677 3.585,3.723 3.2,4.173L3.674,4.58ZM17.578,11.928L17.181,12.41C17.231,12.452 17.26,12.497 17.272,12.527C17.282,12.552 17.275,12.551 17.279,12.539L17.869,12.744L18.46,12.95C18.681,12.316 18.338,11.745 17.976,11.446L17.578,11.928ZM12.054,1.922L11.901,2.528C11.889,2.525 11.892,2.52 11.906,2.538C11.923,2.559 11.945,2.598 11.958,2.654L12.567,2.514L13.176,2.373C13.081,1.96 12.783,1.462 12.207,1.316L12.054,1.922Z"
android:fillColor="#171717"/>
</vector>
22 changes: 22 additions & 0 deletions core/designsystem/src/main/res/values/strings.xml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으론 string의 경우 각 화면에서만 쓰인다고 생각합니다!
그래서 core보단 feature에 두는게 더 보기 편할 것 같은데 어떻게 생각하시나요?

@Moony-H Moony-H Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oungsi2000
오 그렇게 하면 나중에 아주 재미있는 일이 일어나는데, 소중한 경험을 뺏고 싶지 않네요...!

멀티 모듈을 적용하는 개발자들 사이에서 많이 일어나고, 또 매우매우 찾기 힘든 이슈가 발생하게 됩니다!

직접 경험해보면 좋은데 그 전에 "리소스 아이디"에 대해서 생각해보거나, AI에게 물어보면 좋을 것 같습니다!

Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,26 @@
<string name="bottom_nav_todak">토닥이</string>
<string name="bottom_nav_lucky_action">행운 액션</string>
<string name="bottom_nav_my">마이</string>

<!-- MyPage -->
<string name="mypage_home_title">My page</string>
<string name="mypage_menu_saju_info">사주 정보 관리</string>
<string name="mypage_menu_notification_setting">알림 설정</string>
<string name="mypage_menu_app_setting">앱 설정</string>
<string name="mypage_menu_inquiry">1:1 문의</string>
<string name="mypage_menu_logout">로그아웃</string>
<string name="mypage_app_version_label">앱 버전</string>
<string name="mypage_app_version_format">v %1$s</string>
<string name="mypage_view_mansaeryeok_button">만세력 보기</string>
<string name="mypage_edit_button">수정</string>
<string name="mypage_latest_version">(최신 버전)</string>

<!-- Common -->
<string name="separator_dot">·</string>
<string name="gender_male">남성</string>
<string name="gender_female">여성</string>
<string name="date_type_solar">양력</string>
<string name="date_type_lunar">음력</string>
<string name="birth_time_format">%1$d시 %2$02d분</string>
<string name="saju_card_label_format">-%1$s, %2$s</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import java.time.LocalTime

data class User(
val id: String,
val name: String,
val gender: Gender,
val birth: Birth,
)
Expand Down
1 change: 1 addition & 0 deletions feature/mypage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
12 changes: 12 additions & 0 deletions feature/mypage/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins {
alias(libs.plugins.todakun.feature)
}

android {
namespace = "com.kikidan.mypage"
}

dependencies {
implementation(libs.play.app.update.ktx)
implementation(libs.kotlinx.coroutines.play.services)
}
Empty file.
21 changes: 21 additions & 0 deletions feature/mypage/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
4 changes: 4 additions & 0 deletions feature/mypage/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.kikidan.mypage.home

import android.content.Context
import com.google.android.play.core.appupdate.AppUpdateManagerFactory
import com.google.android.play.core.install.model.UpdateAvailability
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.tasks.await
import javax.inject.Inject

class AppVersionChecker
@Inject
constructor(
@ApplicationContext private val context: Context,
) {
fun getCurrentVersionName(): String =
context.packageManager
.getPackageInfo(context.packageName, 0)
.versionName
.orEmpty()

suspend fun isLatestVersion(): Boolean =
try {
val appUpdateManager = AppUpdateManagerFactory.create(context)
val appUpdateInfo = appUpdateManager.appUpdateInfo.await()
appUpdateInfo.updateAvailability() != UpdateAvailability.UPDATE_AVAILABLE
} catch (e: Exception) {
// Play Store가 없는 기기(에뮬레이터 등)에서도 마이페이지 조회 자체는 실패하면 안 되므로 조회 실패 시 최신 버전으로 간주한다.
true
}
}
Loading