From a1033451455a3723856022dcd90744ac3d238226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=95=88=EB=B3=91=ED=97=8C?=
<64366488+Heonbyeong@users.noreply.github.com>
Date: Tue, 25 Jun 2024 14:44:12 +0900
Subject: [PATCH 001/157] Update README.md
---
README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index ba8feccb..3a2a759d 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,50 @@
-# 23rd-Android-Team-2-Android
-![screen1](https://github.com/YAPP-Github/23rd-Android-Team-2-Android/assets/64366488/2925d2c6-a53b-41b2-a336-2f950c448d37)
+![cover](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/d8d0ddcd-3eae-453d-87d0-b9138353fb71)
+
+
+
+
+
+
+
+# 머니몽
+> 머니몽은 `Money` + `Monitoring` 두 단어가 결합된 이름입니다. 머니몽이라는 이름 그대로, 장부를 기록하고 확인하며 관리할 수 있는 서비스에요.
+
+2023년 기준 전국 대학은 334개, 그 안에 있는 동아리는 무수히 많습니다. 그 많은 동아리는 아직까지도 수기로 장부를 작성하며, 영수증을 파일로 관리하고,
+엑셀로 정리하여 감사위원회에 제출합니다. 머니몽은 학생과 학생회의 불편함을 넘어, 국내 모든 동아리의 회계 관리에 대한 불편함을 해결하려고 합니다.
+
+
+
+
+## 온보딩 & 로그인
+![47](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/7307d8ae-cf69-45ff-8d8c-57cbd71002b6)
+
+
+
+
+## 소속 등록 & 가입
+![48](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/8e1c9750-53ba-4300-bb14-2daf57cd0931)
+![49](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/a246e125-290b-4ac5-9b0a-7f3b00b0d3c5)
+
+
+
+
+## 장부 확인
+![50](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/bfcb6e1d-1018-4741-8d32-fd44b39b2545)
+
+
+
+
+## 장부 등록
+![51](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/57d6b7a9-4088-4f3c-90b6-8fbfc827a21c)
+![52](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/274245ce-fc7b-4df7-ad12-f19ca6d75216)
+
+
+
+
+## 멤버 & 마이페이지
+![53](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/ad0c3373-2e78-498d-865e-91d4cb2c89e4)
+![54](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/3c6c57ea-a9de-4b43-a4ef-a4990e784319)
From 7b68ac3d9c059e978b5935ad26b90bab569e292a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=95=88=EB=B3=91=ED=97=8C?=
<64366488+Heonbyeong@users.noreply.github.com>
Date: Thu, 27 Jun 2024 18:04:31 +0900
Subject: [PATCH 002/157] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 3a2a759d..8c78613e 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-![cover](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/d8d0ddcd-3eae-453d-87d0-b9138353fb71)
+![cover](https://github.com/MONEYMONG/Android-Moneymong/assets/64366488/034a0bf6-f3fd-446d-a35d-35808ab4b7a9)
From 55851473ca5d17d8ba642fb6fd05e46db7102ec5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=95=88=EB=B3=91=ED=97=8C?=
<64366488+Heonbyeong@users.noreply.github.com>
Date: Wed, 3 Jul 2024 18:07:16 +0900
Subject: [PATCH 003/157] Create android-ci.yml
---
.github/workflows/android-ci.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 .github/workflows/android-ci.yml
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
new file mode 100644
index 00000000..a2a373db
--- /dev/null
+++ b/.github/workflows/android-ci.yml
@@ -0,0 +1,26 @@
+name: Android CI
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ cache: gradle
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+ - name: Build with Gradle
+ run: ./gradlew build
From f6db51c04bfa4d494f512a7e3f4ce375e8c35763 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 14:24:55 +0900
Subject: [PATCH 004/157] =?UTF-8?q?chore:=20ci/cd=20yaml=20=EC=9E=91?=
=?UTF-8?q?=EC=84=B1=20(=EC=B4=88=EC=95=88)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 41 +++++++++++++++++++++++++-------
1 file changed, 33 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index a2a373db..53c49f3c 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -2,25 +2,50 @@ name: Android CI
on:
push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
+ branches: [ "release/release" ]
jobs:
build:
- runs-on: ubuntu-latest
+ runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- - name: set up JDK 11
+ - name: set up JDK 17
uses: actions/setup-java@v3
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- - name: Build with Gradle
- run: ./gradlew build
+
+ - name: Clean Build
+ run: ./gradlew clean
+
+ - name: Check Code Convention
+ run: ./gradlew ktlintCheck
+
+ - name: Decode Service Account Key
+ env:
+ SERVICE_ACCOUNT_KEY_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
+ run: |
+ echo $SERVICE_ACCOUNT_KEY_BASE64 | base64 --decode > service_account_key.json
+
+ - name: Decode Keystore File
+ env:
+ KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
+ run: |
+ echo $KEY_STORE_BASE64 | base64 --decode > moneymong_keystore.keystore
+
+ - name: Build & Deploy Android release
+ env:
+ SERVICE_ACCOUNT_KEY: service_account_key.json
+ KEYSTORE_FILE: moneymong_keystore.keystore
+ KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
+ KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
+ run: bundle exec fastlane deploy
+
+ - name: Remove Credential
+ run: rm service_account_key.json moneymong_keystore.keystore
From 2c466e9fafc5edd5662096ec0b40b13f253f3f48 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 14:27:52 +0900
Subject: [PATCH 005/157] test: workflow
---
.github/workflows/android-ci.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 53c49f3c..e3430343 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -2,7 +2,10 @@ name: Android CI
on:
push:
- branches: [ "release/release" ]
+ branches:
+ - 'release/release'
+ - 'feature/moneymong-500-ci-cd-구축'
+
jobs:
build:
From e38028e14ddcc9b749cc3e876f4cc42b0845bae8 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 14:32:11 +0900
Subject: [PATCH 006/157] test: workflow
---
.github/workflows/android-ci.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index e3430343..b3538622 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -6,7 +6,6 @@ on:
- 'release/release'
- 'feature/moneymong-500-ci-cd-구축'
-
jobs:
build:
From 60c9541a7140c5ab89d11796abea4e4ace0e3f98 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 15:04:28 +0900
Subject: [PATCH 007/157] =?UTF-8?q?chore:=20local.properties=20=EC=83=9D?=
=?UTF-8?q?=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 9 ++++++++-
app/build.gradle.kts | 10 ----------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index b3538622..56ad35ca 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -23,6 +23,13 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
+ - name: Create API Certificate
+ run: |
+ echo "sdk.dir=$ANDROID_SDK_ROOT" > ./local.properties
+ echo "native_app_key=\"${{ secrets.NATIVE_APP_KEY }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_SECRET=\"${{ secrets.CLOVA_OCR_DOCUMENT_SECRET }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_BASEURL=\"${{ secrets.CLOVA_OCR_DOCUMENT_BASEURL }}\"" >> ./local.properties
+
- name: Clean Build
run: ./gradlew clean
@@ -50,4 +57,4 @@ jobs:
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm service_account_key.json moneymong_keystore.keystore
+ run: rm service_account_key.json moneymong_keystore.keystore local.properties
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 6af56666..916e7cf0 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -14,15 +14,6 @@ plugins {
}
android {
- signingConfigs {
- create("release") {
- storeFile =
- file(getApiKey("storeFile"))
- storePassword = getApiKey("storePassword")
- keyAlias = getApiKey("keyAlias")
- keyPassword = getApiKey("keyPassword")
- }
- }
namespace = "com.moneymong.moneymong"
compileSdk = 34
@@ -50,7 +41,6 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
- signingConfig = signingConfigs.getByName("release")
}
}
packaging {
From fe2186de1889b42a11f7eb0b19f75ad1b82ab5b7 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 15:09:12 +0900
Subject: [PATCH 008/157] =?UTF-8?q?test:=20lint=20=ED=8C=8C=EC=9D=B4?=
=?UTF-8?q?=ED=94=84=EB=9D=BC=EC=9D=B8=20=EC=A0=9C=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 56ad35ca..0e532d23 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -33,9 +33,6 @@ jobs:
- name: Clean Build
run: ./gradlew clean
- - name: Check Code Convention
- run: ./gradlew ktlintCheck
-
- name: Decode Service Account Key
env:
SERVICE_ACCOUNT_KEY_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
From f555ccfe7dce6dd6e3b64f6ff23fc9365e3bec49 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:04:50 +0900
Subject: [PATCH 009/157] =?UTF-8?q?test:=20fastfile=20=EC=9E=90=EA=B2=A9?=
=?UTF-8?q?=20=EC=A6=9D=EB=AA=85=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 1 +
fastlane/Fastfile | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 0e532d23..bd9f82db 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -51,6 +51,7 @@ jobs:
KEYSTORE_FILE: moneymong_keystore.keystore
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
+ KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: bundle exec fastlane deploy
- name: Remove Credential
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 19c557cc..7f248f74 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -32,7 +32,17 @@ platform :android do
desc "Deploy a new version to the Google Play"
lane :deploy do
- gradle(task: "clean assembleRelease")
+ gradle(
+ task: 'bundle',
+ flavor: "live"
+ build_type: 'Release'
+ properties: {
+ "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
+ "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
+ "android.injected.signing.key.alias" => ENV["KEYSTORE_KEY_ALIAS"],
+ "android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
+ }
+ )
upload_to_play_store
end
end
From 9e5c828541b045d7acfb95dbfd15fd225fe08886 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:08:46 +0900
Subject: [PATCH 010/157] =?UTF-8?q?test:=20,=20=EB=88=84=EB=9D=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 7f248f74..f538af0f 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -34,7 +34,7 @@ platform :android do
lane :deploy do
gradle(
task: 'bundle',
- flavor: "live"
+ flavor: "live",
build_type: 'Release'
properties: {
"android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
From c3f1e55fd0e579b2b05d9d9164227896b639256f Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:11:03 +0900
Subject: [PATCH 011/157] =?UTF-8?q?test:=20,=20=EB=88=84=EB=9D=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fastlane/Fastfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index f538af0f..a4683a96 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -35,13 +35,13 @@ platform :android do
gradle(
task: 'bundle',
flavor: "live",
- build_type: 'Release'
+ build_type: 'Release',
properties: {
"android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
"android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["KEYSTORE_KEY_ALIAS"],
"android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
- }
+ },
)
upload_to_play_store
end
From 21d9c612e72b6b53b1558e905acf6526cb9058ab Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:23:51 +0900
Subject: [PATCH 012/157] =?UTF-8?q?test:=20=ED=99=98=EA=B2=BD=EB=B3=80?=
=?UTF-8?q?=EC=88=98=20=EB=AC=B8=EC=9E=90=EC=97=B4=20=EC=B2=A0;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fastlane/Fastfile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index a4683a96..64754702 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -37,10 +37,10 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
- "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
- "android.injected.signing.key.alias" => ENV["KEYSTORE_KEY_ALIAS"],
- "android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
+ "android.injected.signing.store.file" => "#{ENV["KEYSTORE_FILE"]}",
+ "android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
+ "android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
+ "android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
},
)
upload_to_play_store
From f0062408de3fc6840ab6be7f03f6de197e66ea2f Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:35:52 +0900
Subject: [PATCH 013/157] test: keystore path fix
---
.github/workflows/android-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index bd9f82db..7b9516c0 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -43,7 +43,7 @@ jobs:
env:
KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
run: |
- echo $KEY_STORE_BASE64 | base64 --decode > moneymong_keystore.keystore
+ echo $KEY_STORE_BASE64 | base64 --decode > app/moneymong_keystore.keystore
- name: Build & Deploy Android release
env:
@@ -55,4 +55,4 @@ jobs:
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm service_account_key.json moneymong_keystore.keystore local.properties
+ run: rm service_account_key.json app/moneymong_keystore.keystore local.properties
From c45df99e49182049168b96e2e5be2d90ef53f7a6 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 16:56:22 +0900
Subject: [PATCH 014/157] =?UTF-8?q?test:=20keystore=20=ED=99=95=EC=9E=A5?=
=?UTF-8?q?=EC=9E=90=20fix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 7b9516c0..5e99460f 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -43,7 +43,7 @@ jobs:
env:
KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
run: |
- echo $KEY_STORE_BASE64 | base64 --decode > app/moneymong_keystore.keystore
+ echo $KEY_STORE_BASE64 | base64 --decode > moneymong_keystore.jks
- name: Build & Deploy Android release
env:
@@ -55,4 +55,4 @@ jobs:
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm service_account_key.json app/moneymong_keystore.keystore local.properties
+ run: rm service_account_key.json moneymong_keystore.jks local.properties
From ed7c6557cf6f82fe0ec35a800f9d51e69d5e6cab Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 17:01:13 +0900
Subject: [PATCH 015/157] =?UTF-8?q?test:=20keystore=20=ED=99=95=EC=9E=A5?=
=?UTF-8?q?=EC=9E=90=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 5e99460f..0893530d 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -48,7 +48,7 @@ jobs:
- name: Build & Deploy Android release
env:
SERVICE_ACCOUNT_KEY: service_account_key.json
- KEYSTORE_FILE: moneymong_keystore.keystore
+ KEYSTORE_FILE: moneymong_keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
From a33f882c946798f33edbb356bdc8d20b8c0e522a Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 17:26:17 +0900
Subject: [PATCH 016/157] =?UTF-8?q?test:=20working=20directory=20=EC=A7=80?=
=?UTF-8?q?=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 0893530d..509d1586 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -52,7 +52,8 @@ jobs:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+ working-directory: ${{ github.workspace }}
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm service_account_key.json moneymong_keystore.jks local.properties
+ run: rm service_account_key.json moneymong_keystore.jks ./local.properties
From 1fc373e6673ae5492e0610bb0f0ef7ff9feef52d Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 17:37:57 +0900
Subject: [PATCH 017/157] test: path fix
---
.github/workflows/android-ci.yml | 11 +++++------
fastlane/Fastfile | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 509d1586..da1168be 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -37,23 +37,22 @@ jobs:
env:
SERVICE_ACCOUNT_KEY_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
run: |
- echo $SERVICE_ACCOUNT_KEY_BASE64 | base64 --decode > service_account_key.json
+ echo $SERVICE_ACCOUNT_KEY_BASE64 | base64 --decode > $GITHUB_WORKSPACE/service_account_key.json
- name: Decode Keystore File
env:
KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
run: |
- echo $KEY_STORE_BASE64 | base64 --decode > moneymong_keystore.jks
+ echo $KEY_STORE_BASE64 | base64 --decode > $GITHUB_WORKSPACE/moneymong_keystore.jks
- name: Build & Deploy Android release
env:
- SERVICE_ACCOUNT_KEY: service_account_key.json
- KEYSTORE_FILE: moneymong_keystore.jks
+ SERVICE_ACCOUNT_KEY: $GITHUB_WORKSPACE/service_account_key.json
+ KEYSTORE_FILE: $GITHUB_WORKSPACE/moneymong_keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- working-directory: ${{ github.workspace }}
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm service_account_key.json moneymong_keystore.jks ./local.properties
+ run: rm $GITHUB_WORKSPACE/service_account_key.json $GITHUB_WORKSPACE/moneymong_keystore.jks ./local.properties
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 64754702..4655047a 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -37,7 +37,7 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => "#{ENV["KEYSTORE_FILE"]}",
+ "android.injected.signing.store.file" => "#{ENV["GITHUB_WORKSPACE"]}/moneymong_keystore.jks",
"android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
"android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
"android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
From 2a5c0aacdf5f4a060190230ad44c1bd315a5f30a Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 17:50:49 +0900
Subject: [PATCH 018/157] test: add json key
---
fastlane/Fastfile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 4655047a..f20f699b 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -43,6 +43,9 @@ platform :android do
"android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
},
)
- upload_to_play_store
+ upload_to_play_store(
+ track: "internal",
+ json_key: "#{ENV["SERVICE_ACCOUNT_KEY"]}"
+ )
end
end
From eefbf535f22411e35a2ee5dfd7af41d4be98b45a Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 17:58:58 +0900
Subject: [PATCH 019/157] test: json key path fix
---
fastlane/Fastfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index f20f699b..a4450c44 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -37,7 +37,7 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => "#{ENV["GITHUB_WORKSPACE"]}/moneymong_keystore.jks",
+ "android.injected.signing.store.file" => "#{ENV["KEYSTORE_FILE"]}",
"android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
"android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
"android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
@@ -45,7 +45,7 @@ platform :android do
)
upload_to_play_store(
track: "internal",
- json_key: "#{ENV["SERVICE_ACCOUNT_KEY"]}"
+ json_key: ENV["SERVICE_ACCOUNT_KEY"]
)
end
end
From 5ffc407f1370e36377a935d86a3be590812aa76f Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 18:18:14 +0900
Subject: [PATCH 020/157] =?UTF-8?q?test:=20env=20=EC=84=A4=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 1 +
fastlane/Fastfile | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index da1168be..a0609afc 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -52,6 +52,7 @@ jobs:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+ working-directory: $GITHUB_WORKSPACE/app
run: bundle exec fastlane deploy
- name: Remove Credential
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index a4450c44..57043631 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -37,10 +37,10 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => "#{ENV["KEYSTORE_FILE"]}",
- "android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
- "android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
- "android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
+ "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
+ "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
+ "android.injected.signing.key.alias" => ENV["KEYSTORE_KEY_ALIAS"],
+ "android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
},
)
upload_to_play_store(
From 600bd1b1a43ca97b73f685ec50fa0938ff46cf2b Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 18:21:36 +0900
Subject: [PATCH 021/157] test: working directory remove
---
.github/workflows/android-ci.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index a0609afc..da1168be 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -52,7 +52,6 @@ jobs:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- working-directory: $GITHUB_WORKSPACE/app
run: bundle exec fastlane deploy
- name: Remove Credential
From 786b6da75ddaf7a250ae6aa7c00ac6a597eaa938 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 18:36:16 +0900
Subject: [PATCH 022/157] test: app file fix
---
.github/workflows/android-ci.yml | 14 +++++---------
fastlane/Appfile | 2 +-
fastlane/Fastfile | 5 +----
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index da1168be..d55da2a6 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -34,25 +34,21 @@ jobs:
run: ./gradlew clean
- name: Decode Service Account Key
- env:
- SERVICE_ACCOUNT_KEY_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
run: |
- echo $SERVICE_ACCOUNT_KEY_BASE64 | base64 --decode > $GITHUB_WORKSPACE/service_account_key.json
+ echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}" | base64 --decode > app/service_account_key.json
- name: Decode Keystore File
- env:
- KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
run: |
- echo $KEY_STORE_BASE64 | base64 --decode > $GITHUB_WORKSPACE/moneymong_keystore.jks
+ echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > app/moneymong_keystore.jks
- name: Build & Deploy Android release
env:
- SERVICE_ACCOUNT_KEY: $GITHUB_WORKSPACE/service_account_key.json
- KEYSTORE_FILE: $GITHUB_WORKSPACE/moneymong_keystore.jks
+ SERVICE_ACCOUNT_KEY: app/service_account_key.json
+ KEYSTORE_FILE: app/moneymong_keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm $GITHUB_WORKSPACE/service_account_key.json $GITHUB_WORKSPACE/moneymong_keystore.jks ./local.properties
+ run: rm app/service_account_key.json app/moneymong_keystore.jks ./local.properties
diff --git a/fastlane/Appfile b/fastlane/Appfile
index bc0d61c2..d749722b 100644
--- a/fastlane/Appfile
+++ b/fastlane/Appfile
@@ -1,2 +1,2 @@
-json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
+json_key_file ENV['SERVICE_ACCOUNT_KEY'] # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.moneymong.moneymong") # e.g. com.krausefx.app
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 57043631..a4683a96 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -43,9 +43,6 @@ platform :android do
"android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
},
)
- upload_to_play_store(
- track: "internal",
- json_key: ENV["SERVICE_ACCOUNT_KEY"]
- )
+ upload_to_play_store
end
end
From 7be78761c9b89abdfe585a4a67bf2a479f6f62fe Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 18:58:49 +0900
Subject: [PATCH 023/157] test: fix
---
.github/workflows/android-ci.yml | 11 ++++++-----
fastlane/Appfile | 2 +-
fastlane/Fastfile | 12 +++++++-----
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index d55da2a6..25ccf51b 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -35,20 +35,21 @@ jobs:
- name: Decode Service Account Key
run: |
- echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}" | base64 --decode > app/service_account_key.json
+ echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./app/service_account_key.json
- name: Decode Keystore File
run: |
- echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > app/moneymong_keystore.jks
+ echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > ./app/moneymong_keystore.jks
- name: Build & Deploy Android release
env:
- SERVICE_ACCOUNT_KEY: app/service_account_key.json
- KEYSTORE_FILE: app/moneymong_keystore.jks
+ SERVICE_ACCOUNT_KEY: ./app/service_account_key.json
+ KEYSTORE_FILE: ./app/moneymong_keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+ CWD: ${{ github.workspace }}
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm app/service_account_key.json app/moneymong_keystore.jks ./local.properties
+ run: rm ./app/${SERVICE_ACCOUNT_KEY} && rm ./app/${KEYSTORE_FILE} && rm ./local.properties
diff --git a/fastlane/Appfile b/fastlane/Appfile
index d749722b..d60ec01f 100644
--- a/fastlane/Appfile
+++ b/fastlane/Appfile
@@ -1,2 +1,2 @@
-json_key_file ENV['SERVICE_ACCOUNT_KEY'] # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
+json_key_file("./service_account_key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.moneymong.moneymong") # e.g. com.krausefx.app
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index a4683a96..375c90d5 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -30,6 +30,8 @@ platform :android do
# You can also use other beta testing services here
end
+ keystore = File.join(Dir.pwd, “my_keystore.jks”)
+ json_file = File.join(Dir.pwd, “my_json_key.json”)
desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(
@@ -37,11 +39,11 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"],
- "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
- "android.injected.signing.key.alias" => ENV["KEYSTORE_KEY_ALIAS"],
- "android.injected.signing.key.password" => ENV["KEYSTORE_KEY_PASSWORD"],
- },
+ "android.injected.signing.store.file" => "#{ENV["CWD"]}/app/#{ENV["KEYSTORE_FILE"]}",
+ "android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
+ "android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
+ "android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
+ },
)
upload_to_play_store
end
From a67f85a8269bbe6b5510f3959e693ff5bfc307bd Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Tue, 23 Jul 2024 19:16:47 +0900
Subject: [PATCH 024/157] test: env
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 375c90d5..e8d7ac7a 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -39,7 +39,7 @@ platform :android do
flavor: "live",
build_type: 'Release',
properties: {
- "android.injected.signing.store.file" => "#{ENV["CWD"]}/app/#{ENV["KEYSTORE_FILE"]}",
+ "android.injected.signing.store.file" => "#{ENV["KEYSTORE_FILE"]}",
"android.injected.signing.store.password" => "#{ENV["KEYSTORE_PASSWORD"]}",
"android.injected.signing.key.alias" => "#{ENV["KEYSTORE_KEY_ALIAS"]}",
"android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
From c5871580e1c40c579f66dc10ad8cafb954a2d861 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 10:49:12 +0900
Subject: [PATCH 025/157] test: path
---
.github/workflows/android-ci.yml | 4 ++--
fastlane/Fastfile | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 25ccf51b..4bff2380 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -43,8 +43,8 @@ jobs:
- name: Build & Deploy Android release
env:
- SERVICE_ACCOUNT_KEY: ./app/service_account_key.json
- KEYSTORE_FILE: ./app/moneymong_keystore.jks
+ SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
+ KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index e8d7ac7a..d5151135 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -30,8 +30,6 @@ platform :android do
# You can also use other beta testing services here
end
- keystore = File.join(Dir.pwd, “my_keystore.jks”)
- json_file = File.join(Dir.pwd, “my_json_key.json”)
desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(
From be520d89c5b5c793e102abe48c64f9585773e11c Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 11:30:03 +0900
Subject: [PATCH 026/157] test: appfile path
---
fastlane/Appfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Appfile b/fastlane/Appfile
index d60ec01f..d4dcdac8 100644
--- a/fastlane/Appfile
+++ b/fastlane/Appfile
@@ -1,2 +1,2 @@
-json_key_file("./service_account_key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
+json_key_file("./app/service_account_key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.moneymong.moneymong") # e.g. com.krausefx.app
From 6b23a03fbc7ae43a3d0bf254e8d3059581f22c69 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 14:10:04 +0900
Subject: [PATCH 027/157] test: package name refactor
---
fastlane/Appfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Appfile b/fastlane/Appfile
index d4dcdac8..ee1194d6 100644
--- a/fastlane/Appfile
+++ b/fastlane/Appfile
@@ -1,2 +1,2 @@
json_key_file("./app/service_account_key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
-package_name("com.moneymong.moneymong") # e.g. com.krausefx.app
+package_name("com.moneymong.moneymong.live") # e.g. com.krausefx.app
From e8773757067f5910e729deca762f2b1c04479f52 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 14:50:19 +0900
Subject: [PATCH 028/157] test: increment version code
---
fastlane/Fastfile | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index d5151135..cddeecc1 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -16,6 +16,20 @@
default_platform(:android)
platform :android do
+ desc "Increment the Version Code"
+ lane :increment_version_code do
+ increment_version_code(
+ gradle_file_path: './app/build.gradle'
+ )
+
+ git_commit(
+ path: ["./app/build.gradle"],
+ message: "RELEASE INCREMENT VERSION CODE"
+ )
+
+ push_to_git_remote
+ end
+
desc "Runs all the tests"
lane :test do
gradle(task: "test")
@@ -32,6 +46,8 @@ platform :android do
desc "Deploy a new version to the Google Play"
lane :deploy do
+ increment_version_code
+
gradle(
task: 'bundle',
flavor: "live",
From d7845c61a79a33b62b26722f722f881b7910bd72 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 14:54:48 +0900
Subject: [PATCH 029/157] test: lane
---
fastlane/Fastfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index cddeecc1..96015c2a 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -17,7 +17,7 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
- lane :increment_version_code do
+ lane :increment_code do
increment_version_code(
gradle_file_path: './app/build.gradle'
)
@@ -46,7 +46,7 @@ platform :android do
desc "Deploy a new version to the Google Play"
lane :deploy do
- increment_version_code
+ increment_code
gradle(
task: 'bundle',
From f5b789428af1b77eb9485e5626bf27b9bade2298 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 15:07:13 +0900
Subject: [PATCH 030/157] test: version code
---
fastlane/Fastfile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 96015c2a..27ebbc6a 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -18,8 +18,11 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
lane :increment_code do
+ latest_release = google_play_track_version_code()[0]
+ new_release = latest_release + 1
+
increment_version_code(
- gradle_file_path: './app/build.gradle'
+ version_code: new_release
)
git_commit(
From e4c6f9f9f97928b0401bd8b4841e68ea0d19e0e3 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 15:09:51 +0900
Subject: [PATCH 031/157] test: version code
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 27ebbc6a..9be77e8c 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -18,7 +18,7 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
lane :increment_code do
- latest_release = google_play_track_version_code()[0]
+ latest_release = google_play_track_version_codes()[0]
new_release = latest_release + 1
increment_version_code(
From 12a951c4c5a733941a8a937628fcab16c386e236 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 15:34:30 +0900
Subject: [PATCH 032/157] test: add plugin
---
Gemfile | 3 +
Gemfile.lock | 222 ++++++++++++++++++++++++++++++++++++++++++++
fastlane/Pluginfile | 5 +
3 files changed, 230 insertions(+)
create mode 100644 Gemfile.lock
create mode 100644 fastlane/Pluginfile
diff --git a/Gemfile b/Gemfile
index 7a118b49..cdd3a6b3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,3 +1,6 @@
source "https://rubygems.org"
gem "fastlane"
+
+plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
+eval_gemfile(plugins_path) if File.exist?(plugins_path)
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 00000000..1a0d306c
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,222 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ CFPropertyList (3.0.7)
+ base64
+ nkf
+ rexml
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ artifactory (3.0.17)
+ atomos (0.1.3)
+ aws-eventstream (1.3.0)
+ aws-partitions (1.957.0)
+ aws-sdk-core (3.201.3)
+ aws-eventstream (~> 1, >= 1.3.0)
+ aws-partitions (~> 1, >= 1.651.0)
+ aws-sigv4 (~> 1.8)
+ jmespath (~> 1, >= 1.6.1)
+ aws-sdk-kms (1.88.0)
+ aws-sdk-core (~> 3, >= 3.201.0)
+ aws-sigv4 (~> 1.5)
+ aws-sdk-s3 (1.156.0)
+ aws-sdk-core (~> 3, >= 3.201.0)
+ aws-sdk-kms (~> 1)
+ aws-sigv4 (~> 1.5)
+ aws-sigv4 (1.9.0)
+ aws-eventstream (~> 1, >= 1.0.2)
+ babosa (1.0.4)
+ base64 (0.2.0)
+ claide (1.1.0)
+ colored (1.2)
+ colored2 (3.1.2)
+ commander (4.6.0)
+ highline (~> 2.0.0)
+ declarative (0.0.20)
+ digest-crc (0.6.5)
+ rake (>= 12.0.0, < 14.0.0)
+ domain_name (0.6.20240107)
+ dotenv (2.8.1)
+ emoji_regex (3.2.3)
+ excon (0.111.0)
+ faraday (1.10.3)
+ faraday-em_http (~> 1.0)
+ faraday-em_synchrony (~> 1.0)
+ faraday-excon (~> 1.1)
+ faraday-httpclient (~> 1.0)
+ faraday-multipart (~> 1.0)
+ faraday-net_http (~> 1.0)
+ faraday-net_http_persistent (~> 1.0)
+ faraday-patron (~> 1.0)
+ faraday-rack (~> 1.0)
+ faraday-retry (~> 1.0)
+ ruby2_keywords (>= 0.0.4)
+ faraday-cookie_jar (0.0.7)
+ faraday (>= 0.8.0)
+ http-cookie (~> 1.0.0)
+ faraday-em_http (1.0.0)
+ faraday-em_synchrony (1.0.0)
+ faraday-excon (1.1.0)
+ faraday-httpclient (1.0.1)
+ faraday-multipart (1.0.4)
+ multipart-post (~> 2)
+ faraday-net_http (1.0.1)
+ faraday-net_http_persistent (1.2.0)
+ faraday-patron (1.0.0)
+ faraday-rack (1.0.0)
+ faraday-retry (1.0.3)
+ faraday_middleware (1.2.0)
+ faraday (~> 1.0)
+ fastimage (2.3.1)
+ fastlane (2.221.1)
+ CFPropertyList (>= 2.3, < 4.0.0)
+ addressable (>= 2.8, < 3.0.0)
+ artifactory (~> 3.0)
+ aws-sdk-s3 (~> 1.0)
+ babosa (>= 1.0.3, < 2.0.0)
+ bundler (>= 1.12.0, < 3.0.0)
+ colored (~> 1.2)
+ commander (~> 4.6)
+ dotenv (>= 2.1.1, < 3.0.0)
+ emoji_regex (>= 0.1, < 4.0)
+ excon (>= 0.71.0, < 1.0.0)
+ faraday (~> 1.0)
+ faraday-cookie_jar (~> 0.0.6)
+ faraday_middleware (~> 1.0)
+ fastimage (>= 2.1.0, < 3.0.0)
+ gh_inspector (>= 1.1.2, < 2.0.0)
+ google-apis-androidpublisher_v3 (~> 0.3)
+ google-apis-playcustomapp_v1 (~> 0.1)
+ google-cloud-env (>= 1.6.0, < 2.0.0)
+ google-cloud-storage (~> 1.31)
+ highline (~> 2.0)
+ http-cookie (~> 1.0.5)
+ json (< 3.0.0)
+ jwt (>= 2.1.0, < 3)
+ mini_magick (>= 4.9.4, < 5.0.0)
+ multipart-post (>= 2.0.0, < 3.0.0)
+ naturally (~> 2.2)
+ optparse (>= 0.1.1, < 1.0.0)
+ plist (>= 3.1.0, < 4.0.0)
+ rubyzip (>= 2.0.0, < 3.0.0)
+ security (= 0.1.5)
+ simctl (~> 1.6.3)
+ terminal-notifier (>= 2.0.0, < 3.0.0)
+ terminal-table (~> 3)
+ tty-screen (>= 0.6.3, < 1.0.0)
+ tty-spinner (>= 0.8.0, < 1.0.0)
+ word_wrap (~> 1.0.0)
+ xcodeproj (>= 1.13.0, < 2.0.0)
+ xcpretty (~> 0.3.0)
+ xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
+ fastlane-plugin-increment_version_code (0.4.3)
+ gh_inspector (1.1.3)
+ google-apis-androidpublisher_v3 (0.54.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-core (0.11.3)
+ addressable (~> 2.5, >= 2.5.1)
+ googleauth (>= 0.16.2, < 2.a)
+ httpclient (>= 2.8.1, < 3.a)
+ mini_mime (~> 1.0)
+ representable (~> 3.0)
+ retriable (>= 2.0, < 4.a)
+ rexml
+ google-apis-iamcredentials_v1 (0.17.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-playcustomapp_v1 (0.13.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-storage_v1 (0.31.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-cloud-core (1.7.0)
+ google-cloud-env (>= 1.0, < 3.a)
+ google-cloud-errors (~> 1.0)
+ google-cloud-env (1.6.0)
+ faraday (>= 0.17.3, < 3.0)
+ google-cloud-errors (1.4.0)
+ google-cloud-storage (1.47.0)
+ addressable (~> 2.8)
+ digest-crc (~> 0.4)
+ google-apis-iamcredentials_v1 (~> 0.1)
+ google-apis-storage_v1 (~> 0.31.0)
+ google-cloud-core (~> 1.6)
+ googleauth (>= 0.16.2, < 2.a)
+ mini_mime (~> 1.0)
+ googleauth (1.8.1)
+ faraday (>= 0.17.3, < 3.a)
+ jwt (>= 1.4, < 3.0)
+ multi_json (~> 1.11)
+ os (>= 0.9, < 2.0)
+ signet (>= 0.16, < 2.a)
+ highline (2.0.3)
+ http-cookie (1.0.6)
+ domain_name (~> 0.5)
+ httpclient (2.8.3)
+ jmespath (1.6.2)
+ json (2.7.2)
+ jwt (2.8.2)
+ base64
+ mini_magick (4.13.2)
+ mini_mime (1.1.5)
+ multi_json (1.15.0)
+ multipart-post (2.4.1)
+ nanaimo (0.3.0)
+ naturally (2.2.1)
+ nkf (0.2.0)
+ optparse (0.5.0)
+ os (1.1.4)
+ plist (3.7.1)
+ public_suffix (6.0.1)
+ rake (13.2.1)
+ representable (3.2.0)
+ declarative (< 0.1.0)
+ trailblazer-option (>= 0.1.1, < 0.2.0)
+ uber (< 0.2.0)
+ retriable (3.1.2)
+ rexml (3.2.9)
+ strscan
+ rouge (2.0.7)
+ ruby2_keywords (0.0.5)
+ rubyzip (2.3.2)
+ security (0.1.5)
+ signet (0.19.0)
+ addressable (~> 2.8)
+ faraday (>= 0.17.5, < 3.a)
+ jwt (>= 1.5, < 3.0)
+ multi_json (~> 1.10)
+ simctl (1.6.10)
+ CFPropertyList
+ naturally
+ strscan (3.1.0)
+ terminal-notifier (2.0.0)
+ terminal-table (3.0.2)
+ unicode-display_width (>= 1.1.1, < 3)
+ trailblazer-option (0.1.2)
+ tty-cursor (0.7.1)
+ tty-screen (0.8.2)
+ tty-spinner (0.9.3)
+ tty-cursor (~> 0.7)
+ uber (0.1.0)
+ unicode-display_width (2.5.0)
+ word_wrap (1.0.0)
+ xcodeproj (1.24.0)
+ CFPropertyList (>= 2.3.3, < 4.0)
+ atomos (~> 0.1.3)
+ claide (>= 1.0.2, < 2.0)
+ colored2 (~> 3.1)
+ nanaimo (~> 0.3.0)
+ rexml (~> 3.2.4)
+ xcpretty (0.3.0)
+ rouge (~> 2.0.7)
+ xcpretty-travis-formatter (1.0.1)
+ xcpretty (~> 0.2, >= 0.0.7)
+
+PLATFORMS
+ arm64-darwin-23
+ ruby
+
+DEPENDENCIES
+ fastlane
+ fastlane-plugin-increment_version_code
+
+BUNDLED WITH
+ 2.5.3
diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile
new file mode 100644
index 00000000..412c2ff9
--- /dev/null
+++ b/fastlane/Pluginfile
@@ -0,0 +1,5 @@
+# Autogenerated by fastlane
+#
+# Ensure this file is checked in to source control!
+
+gem 'fastlane-plugin-increment_version_code'
From a7c89df90bd857d1b45b585a8373dec32af397a0 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 15:48:12 +0900
Subject: [PATCH 033/157] test: install dependency
---
.github/workflows/android-ci.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 4bff2380..9b7cfe2c 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -41,6 +41,11 @@ jobs:
run: |
echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > ./app/moneymong_keystore.jks
+ - name: Install Dependencies
+ run: |
+ gem install bundler
+ bundle install
+
- name: Build & Deploy Android release
env:
SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
@@ -52,4 +57,7 @@ jobs:
run: bundle exec fastlane deploy
- name: Remove Credential
- run: rm ./app/${SERVICE_ACCOUNT_KEY} && rm ./app/${KEYSTORE_FILE} && rm ./local.properties
+ run: |
+ rm ./app/${SERVICE_ACCOUNT_KEY}
+ rm ./app/${KEYSTORE_FILE}
+ rm ./local.properties
From 65ea10112ab9d4a2fdfebb3c94617ca3297e70cc Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 15:57:50 +0900
Subject: [PATCH 034/157] test: git path
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 9be77e8c..9904d1db 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -26,7 +26,7 @@ platform :android do
)
git_commit(
- path: ["./app/build.gradle"],
+ path: ["./app/build.gradle.kts"],
message: "RELEASE INCREMENT VERSION CODE"
)
From d46f5c0b3b09d14182d99fdd0b7a30540eb87c7e Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 16:02:07 +0900
Subject: [PATCH 035/157] test: git add
---
fastlane/Fastfile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 9904d1db..4c98c89b 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -25,6 +25,9 @@ platform :android do
version_code: new_release
)
+ git_add(
+ path: "./app/build.gradle.kts"
+ )
git_commit(
path: ["./app/build.gradle.kts"],
message: "RELEASE INCREMENT VERSION CODE"
From 6ee1fd014d5e8d21c7c29e56ceeddde2dea0512f Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 24 Jul 2024 16:18:20 +0900
Subject: [PATCH 036/157] test: gradle path
---
fastlane/Fastfile | 3 ++-
fastlane/README.md | 8 ++++++++
fastlane/report.xml | 9 +--------
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 4c98c89b..475a0b0e 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -22,11 +22,12 @@ platform :android do
new_release = latest_release + 1
increment_version_code(
+ gradle_file_path: './app/build.gradle.kts',
version_code: new_release
)
git_add(
- path: "./app/build.gradle.kts"
+ path: ["./app/build.gradle.kts"]
)
git_commit(
path: ["./app/build.gradle.kts"],
diff --git a/fastlane/README.md b/fastlane/README.md
index 7ec1207f..7088ba08 100644
--- a/fastlane/README.md
+++ b/fastlane/README.md
@@ -15,6 +15,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
## Android
+### android increment_code
+
+```sh
+[bundle exec] fastlane android increment_code
+```
+
+Increment the Version Code
+
### android test
```sh
diff --git a/fastlane/report.xml b/fastlane/report.xml
index c5951ce4..51ae580b 100644
--- a/fastlane/report.xml
+++ b/fastlane/report.xml
@@ -5,14 +5,7 @@
-
-
-
-
-
-
-
-
+
From dc323fb3e2bd52a284bbcc73bf7a41b380befbbe Mon Sep 17 00:00:00 2001
From: Heon
Date: Thu, 25 Jul 2024 11:40:07 +0900
Subject: [PATCH 037/157] test: add permission
---
.github/workflows/android-ci.yml | 2 ++
.idea/deploymentTargetSelector.xml | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 9b7cfe2c..9478b9b9 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -10,6 +10,8 @@ jobs:
build:
runs-on: macos-latest
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@v4
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
index 101ad3e8..67b5f25d 100644
--- a/.idea/deploymentTargetSelector.xml
+++ b/.idea/deploymentTargetSelector.xml
@@ -4,10 +4,10 @@
-
+
-
+
From 6e9495010aebafe7590c60835310f6ac77b05cdf Mon Sep 17 00:00:00 2001
From: Anka
Date: Thu, 25 Jul 2024 02:42:16 +0000
Subject: [PATCH 038/157] RELEASE INCREMENT VERSION CODE
---
app/build.gradle.kts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 916e7cf0..de1dda7b 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 12
+ versionCode = 13
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -87,4 +87,4 @@ dependencies {
fun getApiKey(propertyKey : String): String {
return gradleLocalProperties(rootDir).getProperty(propertyKey)
-}
\ No newline at end of file
+}
From a522ee9bc69944ca2160a432e82231634607a3b1 Mon Sep 17 00:00:00 2001
From: Heon
Date: Thu, 25 Jul 2024 13:47:09 +0900
Subject: [PATCH 039/157] test: rm path
---
.github/workflows/android-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 9478b9b9..bcf43ca5 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -60,6 +60,6 @@ jobs:
- name: Remove Credential
run: |
- rm ./app/${SERVICE_ACCOUNT_KEY}
- rm ./app/${KEYSTORE_FILE}
+ rm ./app/service_account_key.json
+ rm ./app/moneymong_keystore.jks
rm ./local.properties
From 399dbb768fd2927b5ff7631867faa84ba0102e06 Mon Sep 17 00:00:00 2001
From: Heon
Date: Thu, 25 Jul 2024 13:55:01 +0900
Subject: [PATCH 040/157] test: release skip
---
.github/workflows/android-ci.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index bcf43ca5..0f0f3710 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -48,15 +48,15 @@ jobs:
gem install bundler
bundle install
- - name: Build & Deploy Android release
- env:
- SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
- KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
- KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
- KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- CWD: ${{ github.workspace }}
- run: bundle exec fastlane deploy
+# - name: Build & Deploy Android release
+# env:
+# SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
+# KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
+# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
+# KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
+# KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+# CWD: ${{ github.workspace }}
+# run: bundle exec fastlane deploy
- name: Remove Credential
run: |
From 7608c880debc3fae22bbc0b257fd666a50a00c34 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 26 Jul 2024 09:15:14 +0900
Subject: [PATCH 041/157] test: finally
---
.github/workflows/android-ci.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 0f0f3710..8ed9f86f 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -58,8 +58,9 @@ jobs:
# CWD: ${{ github.workspace }}
# run: bundle exec fastlane deploy
+
- name: Remove Credential
run: |
rm ./app/service_account_key.json
rm ./app/moneymong_keystore.jks
- rm ./local.properties
+ rm ./local.properties
\ No newline at end of file
From 79caf6b724b70b66086d19b75d22016ebb2261bc Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 26 Jul 2024 09:25:12 +0900
Subject: [PATCH 042/157] chore: target branch set
---
.github/workflows/android-ci.yml | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 8ed9f86f..5b43c2d4 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -4,7 +4,6 @@ on:
push:
branches:
- 'release/release'
- - 'feature/moneymong-500-ci-cd-구축'
jobs:
build:
@@ -48,16 +47,15 @@ jobs:
gem install bundler
bundle install
-# - name: Build & Deploy Android release
-# env:
-# SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
-# KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
-# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
-# KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
-# KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
-# CWD: ${{ github.workspace }}
-# run: bundle exec fastlane deploy
-
+ - name: Build & Deploy Android release
+ env:
+ SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
+ KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
+ KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
+ KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
+ KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+ CWD: ${{ github.workspace }}
+ run: bundle exec fastlane deploy
- name: Remove Credential
run: |
From b0112994f307fc7dccf89cb2fb2272f3be5f1364 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 26 Jul 2024 09:41:21 +0900
Subject: [PATCH 043/157] chore: fastlane upload param add
---
fastlane/Fastfile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 475a0b0e..f60feed5 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -66,6 +66,11 @@ platform :android do
"android.injected.signing.key.password" => "#{ENV["KEYSTORE_KEY_PASSWORD"]}",
},
)
- upload_to_play_store
+ upload_to_play_store(
+ skip_upload_metadata: true,
+ skip_upload_images: true,
+ skip_upload_screenshots: true,
+ skip_upload_apk: true
+ )
end
end
From 714d8440afe781159cc0a91bcbfb6d2da0b5b15d Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 26 Jul 2024 10:52:56 +0900
Subject: [PATCH 044/157] chore: ignore keystore
---
.gitignore | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 8b0e0770..4960cd83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,8 @@
.externalNativeBuild
.cxx
local.properties
-keystore.properties
\ No newline at end of file
+keystore.properties
+
+# Keystore Files
+*.jks
+*.keystore
\ No newline at end of file
From 422a74757cee46563bdcd11dcff1b8fdb6db23a4 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:04:29 +0900
Subject: [PATCH 045/157] test: distribution
---
.github/workflows/android-ci.yml | 158 ++++++++++++++++++++-----------
Gemfile.lock | 8 ++
fastlane/Fastfile | 47 ++++++++-
fastlane/Pluginfile | 1 +
fastlane/README.md | 16 ++++
fastlane/report.xml | 9 +-
fastlane/tester-groups.txt | 1 +
7 files changed, 177 insertions(+), 63 deletions(-)
create mode 100644 fastlane/tester-groups.txt
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 5b43c2d4..2a0e1874 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -3,62 +3,106 @@ name: Android CI
on:
push:
branches:
- - 'release/release'
+ - 'release/**'
+ - 'feature/**'
jobs:
- build:
-
- runs-on: macos-latest
- permissions:
- contents: write
-
- steps:
- - uses: actions/checkout@v4
- - name: set up JDK 17
- uses: actions/setup-java@v3
- with:
- java-version: '17'
- distribution: 'temurin'
- cache: gradle
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
-
- - name: Create API Certificate
- run: |
- echo "sdk.dir=$ANDROID_SDK_ROOT" > ./local.properties
- echo "native_app_key=\"${{ secrets.NATIVE_APP_KEY }}\"" >> ./local.properties
- echo "CLOVA_OCR_DOCUMENT_SECRET=\"${{ secrets.CLOVA_OCR_DOCUMENT_SECRET }}\"" >> ./local.properties
- echo "CLOVA_OCR_DOCUMENT_BASEURL=\"${{ secrets.CLOVA_OCR_DOCUMENT_BASEURL }}\"" >> ./local.properties
-
- - name: Clean Build
- run: ./gradlew clean
-
- - name: Decode Service Account Key
- run: |
- echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./app/service_account_key.json
-
- - name: Decode Keystore File
- run: |
- echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > ./app/moneymong_keystore.jks
-
- - name: Install Dependencies
- run: |
- gem install bundler
- bundle install
-
- - name: Build & Deploy Android release
- env:
- SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
- KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
- KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
- KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- CWD: ${{ github.workspace }}
- run: bundle exec fastlane deploy
-
- - name: Remove Credential
- run: |
- rm ./app/service_account_key.json
- rm ./app/moneymong_keystore.jks
- rm ./local.properties
\ No newline at end of file
+ release_deploy_job:
+ if: github.ref == 'refs/heads/release/release'
+ runs-on: macos-latest
+ permissions:
+ contents: write
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: gradle
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+
+ - name: Create API Certificate
+ run: |
+ echo "sdk.dir=$ANDROID_SDK_ROOT" > ./local.properties
+ echo "native_app_key=\"${{ secrets.NATIVE_APP_KEY }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_SECRET=\"${{ secrets.CLOVA_OCR_DOCUMENT_SECRET }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_BASEURL=\"${{ secrets.CLOVA_OCR_DOCUMENT_BASEURL }}\"" >> ./local.properties
+
+ - name: Clean Build
+ run: ./gradlew clean
+
+ - name: Decode Service Account Key
+ run: |
+ echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./app/service_account_key.json
+
+ - name: Decode Keystore File
+ run: |
+ echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > ./app/moneymong_keystore.jks
+
+ - name: Install Dependencies
+ run: |
+ gem install bundler
+ bundle install
+
+ - name: Build & Deploy Android release
+ env:
+ SERVICE_ACCOUNT_KEY: ${{ github.workspace }}/app/service_account_key.json
+ KEYSTORE_FILE: ${{ github.workspace }}/app/moneymong_keystore.jks
+ KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
+ KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
+ KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
+ CWD: ${{ github.workspace }}
+ run: bundle exec fastlane deploy
+
+ - name: Remove Credential
+ run: |
+ rm ./app/service_account_key.json
+ rm ./app/moneymong_keystore.jks
+ rm ./local.properties
+
+ dev_deploy_job:
+ if: startWith(github.ref, 'refs/heads/feature/moneymong-')
+ runs-on: macos-latest
+ permissions:
+ contents: write
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: gradle
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+
+ - name: Create API Certificate
+ run: |
+ echo "sdk.dir=$ANDROID_SDK_ROOT" > ./local.properties
+ echo "native_app_key=\"${{ secrets.NATIVE_APP_KEY }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_SECRET=\"${{ secrets.CLOVA_OCR_DOCUMENT_SECRET }}\"" >> ./local.properties
+ echo "CLOVA_OCR_DOCUMENT_BASEURL=\"${{ secrets.CLOVA_OCR_DOCUMENT_BASEURL }}\"" >> ./local.properties
+
+ - name: Clean Build
+ run: ./gradlew clean
+
+ - name: Decode Service Account Key
+ run: |
+ echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./app/firebase_credentials.json
+
+ - name: Build & Deploy Distribute
+ env:
+ FIREBASE_CREDENTIALS: ${{ github.workspace }}/app/firebase_credentials.json
+ APP_ID: ${{ secrets.FIREBASE_TB_APP_ID }}
+ WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+ CWD: ${{ github.workspace }}
+ run: bundle exec fastlane distribute
+
+ - name: Remove Credential
+ run: rm ./local.properties
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
index 1a0d306c..c14f99bd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -109,6 +109,9 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
+ fastlane-plugin-firebase_app_distribution (0.9.1)
+ google-apis-firebaseappdistribution_v1 (~> 0.3.0)
+ google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
fastlane-plugin-increment_version_code (0.4.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
@@ -121,6 +124,10 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
+ google-apis-firebaseappdistribution_v1 (0.3.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-firebaseappdistribution_v1alpha (0.2.0)
+ google-apis-core (>= 0.11.0, < 2.a)
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
@@ -216,6 +223,7 @@ PLATFORMS
DEPENDENCIES
fastlane
+ fastlane-plugin-firebase_app_distribution
fastlane-plugin-increment_version_code
BUNDLED WITH
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index f60feed5..8b029f43 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -18,12 +18,13 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
lane :increment_code do
- latest_release = google_play_track_version_codes()[0]
- new_release = latest_release + 1
+ latest_release = firebase_app_distribution_get_latest_release(
+ app: "#{ENV["APP_ID"]}"
+ )
increment_version_code(
gradle_file_path: './app/build.gradle.kts',
- version_code: new_release
+ version_code: latest_release[:buildVersion].to_i + 1
)
git_add(
@@ -31,7 +32,7 @@ platform :android do
)
git_commit(
path: ["./app/build.gradle.kts"],
- message: "RELEASE INCREMENT VERSION CODE"
+ message: "INCREMENT VERSION CODE"
)
push_to_git_remote
@@ -51,9 +52,17 @@ platform :android do
# You can also use other beta testing services here
end
+ desc "Send Slack Message when Deploy to the Firebase Distribution"
+ lane :send_slack_message do |options|
+ slack(
+ message: options[:msg],
+ slack_url: options[:webhook_url]
+ )
+ end
+
desc "Deploy a new version to the Google Play"
lane :deploy do
- increment_code
+# increment_code
gradle(
task: 'bundle',
@@ -73,4 +82,32 @@ platform :android do
skip_upload_apk: true
)
end
+
+ desc "Deploy a new version to the Firebase Distribution"
+ lane :distribute do
+# increment_code
+ latest_release = firebase_app_distribution_get_latest_release(
+ app: "#{ENV["APP_ID"]}"
+ )
+ release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
+
+# gradle(
+# task: 'clean assemble',
+# flavor: "tb",
+# build_type: 'Release'
+# )
+# firebase_app_distribution(
+# service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
+# app: "#{ENV["APP_ID"]}",
+# groups: "fastlane/testers-groups.txt",
+# release_notes: release_note
+# )
+
+ send_slack_message(
+ msg: "#{release_note} 배포 완료",
+ webhook_url: "#{ENV["WEBHOOK_URL"]}"
+ )
+ end
+
+
end
diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile
index 412c2ff9..d3415012 100644
--- a/fastlane/Pluginfile
+++ b/fastlane/Pluginfile
@@ -3,3 +3,4 @@
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-increment_version_code'
+gem 'fastlane-plugin-firebase_app_distribution'
diff --git a/fastlane/README.md b/fastlane/README.md
index 7088ba08..4dfa90c4 100644
--- a/fastlane/README.md
+++ b/fastlane/README.md
@@ -39,6 +39,14 @@ Runs all the tests
Submit a new Beta Build to Crashlytics Beta
+### android send_slack_message
+
+```sh
+[bundle exec] fastlane android send_slack_message
+```
+
+Send Slack Message when Deploy to the Firebase Distribution
+
### android deploy
```sh
@@ -47,6 +55,14 @@ Submit a new Beta Build to Crashlytics Beta
Deploy a new version to the Google Play
+### android distribute
+
+```sh
+[bundle exec] fastlane android distribute
+```
+
+Deploy a new version to the Firebase Distribution
+
----
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
diff --git a/fastlane/report.xml b/fastlane/report.xml
index 51ae580b..e33b8427 100644
--- a/fastlane/report.xml
+++ b/fastlane/report.xml
@@ -5,7 +5,14 @@
-
+
+
+
+
+
+
+
+
diff --git a/fastlane/tester-groups.txt b/fastlane/tester-groups.txt
new file mode 100644
index 00000000..f88b41da
--- /dev/null
+++ b/fastlane/tester-groups.txt
@@ -0,0 +1 @@
+테스터
\ No newline at end of file
From 69d3af9925529a5c5524a1037028cad499e8c01a Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:06:36 +0900
Subject: [PATCH 046/157] test: workflow command fix
---
.github/workflows/android-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index 2a0e1874..f2fb9420 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -65,7 +65,7 @@ jobs:
rm ./local.properties
dev_deploy_job:
- if: startWith(github.ref, 'refs/heads/feature/moneymong-')
+ if: contains(github.ref, 'moneymong-')
runs-on: macos-latest
permissions:
contents: write
From cfcd00ea7774e6956c95aa13a1e76260ff55badf Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:09:43 +0900
Subject: [PATCH 047/157] test: run gem install
---
.github/workflows/android-ci.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index f2fb9420..d02f88d1 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -96,6 +96,11 @@ jobs:
run: |
echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./app/firebase_credentials.json
+ - name: Install Dependencies
+ run: |
+ gem install bundler
+ bundle install
+
- name: Build & Deploy Distribute
env:
FIREBASE_CREDENTIALS: ${{ github.workspace }}/app/firebase_credentials.json
From c5f6db3e398cf56c59743c9f406660bf71b23b28 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:13:16 +0900
Subject: [PATCH 048/157] test: get_lastest_release add credentials
---
fastlane/Fastfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 8b029f43..67d915d5 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -87,7 +87,8 @@ platform :android do
lane :distribute do
# increment_code
latest_release = firebase_app_distribution_get_latest_release(
- app: "#{ENV["APP_ID"]}"
+ service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
+ app: "#{ENV["APP_ID"]}"
)
release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
From e221fc89db315f0dcdba6463e888ae1106fae1ee Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:15:44 +0900
Subject: [PATCH 049/157] test: firebase api enabled
---
fastlane/Fastfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 67d915d5..966792d8 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,6 +86,7 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
+
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From f576c83ab588ccb736e139d5bb0cf28632ef3fa1 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:26:57 +0900
Subject: [PATCH 050/157] =?UTF-8?q?test:=20env=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fastlane/Fastfile | 4 ++--
fastlane/tester-groups.txt | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 966792d8..e38aaf5b 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -88,8 +88,8 @@ platform :android do
# increment_code
latest_release = firebase_app_distribution_get_latest_release(
- service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
- app: "#{ENV["APP_ID"]}"
+ service_credentials_file: ENV["FIREBASE_CREDENTIALS"],
+ app: ENV["APP_ID"]
)
release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
diff --git a/fastlane/tester-groups.txt b/fastlane/tester-groups.txt
index f88b41da..a483eac5 100644
--- a/fastlane/tester-groups.txt
+++ b/fastlane/tester-groups.txt
@@ -1 +1 @@
-테스터
\ No newline at end of file
+qa
\ No newline at end of file
From 7f6df965c7c3e5caf8e537954842ebb7a8450813 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:48:47 +0900
Subject: [PATCH 051/157] test: env
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index e38aaf5b..32bf721d 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -89,7 +89,7 @@ platform :android do
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: ENV["FIREBASE_CREDENTIALS"],
- app: ENV["APP_ID"]
+ app: "#{ENV["APP_ID"]}"
)
release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
From 04f9b048eb57f52f9637ab11f936d46c0aae44a0 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 15:57:37 +0900
Subject: [PATCH 052/157] test: env
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 32bf721d..966792d8 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -88,7 +88,7 @@ platform :android do
# increment_code
latest_release = firebase_app_distribution_get_latest_release(
- service_credentials_file: ENV["FIREBASE_CREDENTIALS"],
+ service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
)
release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
From f8356bca1b6adca8bce1b21f8332a3277c174694 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:16:01 +0900
Subject: [PATCH 053/157] =?UTF-8?q?test:=20firebase=20=EC=9D=B4=EA=B4=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/live/google-services.json | 14 +++++++-------
app/src/tb/google-services.json | 10 +++++-----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/app/src/live/google-services.json b/app/src/live/google-services.json
index 10028522..70624787 100644
--- a/app/src/live/google-services.json
+++ b/app/src/live/google-services.json
@@ -1,13 +1,13 @@
{
"project_info": {
- "project_number": "1091533625653",
- "project_id": "moneymong-9e794",
- "storage_bucket": "moneymong-9e794.appspot.com"
+ "project_number": "276339224954",
+ "project_id": "moneymong-ab377",
+ "storage_bucket": "moneymong-ab377.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:1091533625653:android:f8c3edecf6f6108fad547c",
+ "mobilesdk_app_id": "1:276339224954:android:62b573a4c614883abe66c3",
"android_client_info": {
"package_name": "com.moneymong.moneymong.live"
}
@@ -15,7 +15,7 @@
"oauth_client": [],
"api_key": [
{
- "current_key": "AIzaSyAb9dOMs-B-u9YynEWdtV9nrq_VbMpAXtg"
+ "current_key": "AIzaSyDh769AoQo0vRClh1GneOdjzhJE-h7r__4"
}
],
"services": {
@@ -26,7 +26,7 @@
},
{
"client_info": {
- "mobilesdk_app_id": "1:1091533625653:android:435637da7f3d4352ad547c",
+ "mobilesdk_app_id": "1:276339224954:android:6e845b0b1d59a02fbe66c3",
"android_client_info": {
"package_name": "com.moneymong.moneymong.tb"
}
@@ -34,7 +34,7 @@
"oauth_client": [],
"api_key": [
{
- "current_key": "AIzaSyAb9dOMs-B-u9YynEWdtV9nrq_VbMpAXtg"
+ "current_key": "AIzaSyDh769AoQo0vRClh1GneOdjzhJE-h7r__4"
}
],
"services": {
diff --git a/app/src/tb/google-services.json b/app/src/tb/google-services.json
index 790424d0..c44a190d 100644
--- a/app/src/tb/google-services.json
+++ b/app/src/tb/google-services.json
@@ -1,13 +1,13 @@
{
"project_info": {
- "project_number": "1091533625653",
- "project_id": "moneymong-9e794",
- "storage_bucket": "moneymong-9e794.appspot.com"
+ "project_number": "276339224954",
+ "project_id": "moneymong-ab377",
+ "storage_bucket": "moneymong-ab377.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:1091533625653:android:435637da7f3d4352ad547c",
+ "mobilesdk_app_id": "1:276339224954:android:6e845b0b1d59a02fbe66c3",
"android_client_info": {
"package_name": "com.moneymong.moneymong.tb"
}
@@ -15,7 +15,7 @@
"oauth_client": [],
"api_key": [
{
- "current_key": "AIzaSyAb9dOMs-B-u9YynEWdtV9nrq_VbMpAXtg"
+ "current_key": "AIzaSyDh769AoQo0vRClh1GneOdjzhJE-h7r__4"
}
],
"services": {
From 38d7a4d50b3d9bebfbdc0e1d496a0f701e71f0d1 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:21:14 +0900
Subject: [PATCH 054/157] =?UTF-8?q?test:=20firebase=20credentials=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
---
fastlane/Fastfile | 1 -
1 file changed, 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 966792d8..b8574b69 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -111,5 +111,4 @@ platform :android do
)
end
-
end
From d72058a34516fa554f58e0fbcdafb24f816c8518 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:24:23 +0900
Subject: [PATCH 055/157] test: get started distribution
---
fastlane/Fastfile | 1 -
1 file changed, 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index b8574b69..97664711 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,7 +86,6 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
-
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 400a0dea6b79ef7e73d871cca8a10ff629bfdf6b Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:26:18 +0900
Subject: [PATCH 056/157] test: get started distribution
---
fastlane/Fastfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 97664711..b8574b69 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,6 +86,7 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
+
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 087dd0b113b99ba39b7ae6c4dd67855704d01900 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:32:00 +0900
Subject: [PATCH 057/157] test: add test track
---
fastlane/Fastfile | 1 -
1 file changed, 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index b8574b69..97664711 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,7 +86,6 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
-
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From f4514ed1b2765cf8b4968155ef9fd40901958399 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 16:43:02 +0900
Subject: [PATCH 058/157] test: slack
---
fastlane/Fastfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 97664711..b8574b69 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,6 +86,7 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
+
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 0cb73c3fbf799a3cd526ce78e31f4c885b119b56 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 17:27:52 +0900
Subject: [PATCH 059/157] =?UTF-8?q?test:=20webhook=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fastlane/Fastfile | 1 -
1 file changed, 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index b8574b69..97664711 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -86,7 +86,6 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
# increment_code
-
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 94db1c58d1ab7bbe6d448b6c994371aa14eee948 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 18:15:28 +0900
Subject: [PATCH 060/157] test: apk
---
fastlane/Fastfile | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 97664711..c5798228 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -92,17 +92,17 @@ platform :android do
)
release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
-# gradle(
-# task: 'clean assemble',
-# flavor: "tb",
-# build_type: 'Release'
-# )
-# firebase_app_distribution(
-# service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
-# app: "#{ENV["APP_ID"]}",
-# groups: "fastlane/testers-groups.txt",
-# release_notes: release_note
-# )
+ gradle(
+ task: 'clean assemble',
+ flavor: "tb",
+ build_type: 'Release'
+ )
+ firebase_app_distribution(
+ service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
+ app: "#{ENV["APP_ID"]}",
+ groups: "fastlane/testers-groups.txt",
+ release_notes: release_note
+ )
send_slack_message(
msg: "#{release_note} 배포 완료",
From 417571e7c1446bf233b363b4e2013a7dab357020 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 18:34:40 +0900
Subject: [PATCH 061/157] test: increment code
---
fastlane/Fastfile | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index c5798228..1b857fe6 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -27,15 +27,15 @@ platform :android do
version_code: latest_release[:buildVersion].to_i + 1
)
- git_add(
- path: ["./app/build.gradle.kts"]
- )
- git_commit(
- path: ["./app/build.gradle.kts"],
- message: "INCREMENT VERSION CODE"
- )
-
- push_to_git_remote
+# git_add(
+# path: ["./app/build.gradle.kts"]
+# )
+# git_commit(
+# path: ["./app/build.gradle.kts"],
+# message: "INCREMENT VERSION CODE"
+# )
+#
+# push_to_git_remote
end
desc "Runs all the tests"
@@ -62,7 +62,7 @@ platform :android do
desc "Deploy a new version to the Google Play"
lane :deploy do
-# increment_code
+ increment_code
gradle(
task: 'bundle',
From dedf84f816155459ee10bb2e345b4a2c6c62e081 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 18:41:51 +0900
Subject: [PATCH 062/157] test: increment code
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 1b857fe6..fe389dbe 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -85,7 +85,7 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
-# increment_code
+ increment_code
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 6d0acab7b109c0e646a0dcf774332c42f6efb038 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Thu, 1 Aug 2024 18:45:48 +0900
Subject: [PATCH 063/157] test: firebase credentials
---
fastlane/Fastfile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index fe389dbe..7ee2f90e 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -17,8 +17,9 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
- lane :increment_code do
+ lane :increment_code do |options|
latest_release = firebase_app_distribution_get_latest_release(
+ service_credentials_file: options[:firebase_credentials],
app: "#{ENV["APP_ID"]}"
)
@@ -85,7 +86,9 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
- increment_code
+ increment_code(
+ firebase_credentials: "#{ENV["FIREBASE_CREDENTIALS"]}"
+ )
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
From 2ddf0341980d84701771f478d3bab1d6057a4ebf Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 10:48:13 +0900
Subject: [PATCH 064/157] test: groups file path
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 7ee2f90e..0a55f0d4 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -103,7 +103,7 @@ platform :android do
firebase_app_distribution(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}",
- groups: "fastlane/testers-groups.txt",
+ groups: "fastlane/tester-groups.txt",
release_notes: release_note
)
From 32b80dabc5a501e4f3dbda35d6c081301d039b9e Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 11:11:26 +0900
Subject: [PATCH 065/157] test: tester groups fix
---
fastlane/tester-groups.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/tester-groups.txt b/fastlane/tester-groups.txt
index a483eac5..bd37386b 100644
--- a/fastlane/tester-groups.txt
+++ b/fastlane/tester-groups.txt
@@ -1 +1 @@
-qa
\ No newline at end of file
+moneymong-android-tester
\ No newline at end of file
From 635db37609faf7a49bcdfbf858088311a4e17713 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 11:20:29 +0900
Subject: [PATCH 066/157] test: param fix
---
fastlane/Fastfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 0a55f0d4..161fbdf7 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -103,7 +103,7 @@ platform :android do
firebase_app_distribution(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}",
- groups: "fastlane/tester-groups.txt",
+ groups_file: "fastlane/tester-groups.txt",
release_notes: release_note
)
From 744e6dcdc27a33c3e059df25fd7e3cb1a3a87fcf Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 11:31:42 +0900
Subject: [PATCH 067/157] test: version code increment
---
fastlane/Fastfile | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 161fbdf7..e011767d 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -18,14 +18,9 @@ default_platform(:android)
platform :android do
desc "Increment the Version Code"
lane :increment_code do |options|
- latest_release = firebase_app_distribution_get_latest_release(
- service_credentials_file: options[:firebase_credentials],
- app: "#{ENV["APP_ID"]}"
- )
-
increment_version_code(
gradle_file_path: './app/build.gradle.kts',
- version_code: latest_release[:buildVersion].to_i + 1
+ version_code: options[:new_version_code]
)
# git_add(
@@ -86,14 +81,16 @@ platform :android do
desc "Deploy a new version to the Firebase Distribution"
lane :distribute do
- increment_code(
- firebase_credentials: "#{ENV["FIREBASE_CREDENTIALS"]}"
- )
latest_release = firebase_app_distribution_get_latest_release(
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
)
- release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion]})]"
+ new_version_code = latest_release[:buildVersion].to_i + 1
+ increment_code(
+ new_version_code: new_version_code
+ )
+
+ release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion].to_i + 1})]"
gradle(
task: 'clean assemble',
From 8ceb2a7f808f0f67b8dc4000e9931a722e5143c5 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 13:48:37 +0900
Subject: [PATCH 068/157] test: versionName
---
Gemfile.lock | 2 ++
app/build.gradle.kts | 2 +-
fastlane/Pluginfile | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index c14f99bd..17b308dc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -112,6 +112,7 @@ GEM
fastlane-plugin-firebase_app_distribution (0.9.1)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
+ fastlane-plugin-get_version_name (0.2.2)
fastlane-plugin-increment_version_code (0.4.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
@@ -224,6 +225,7 @@ PLATFORMS
DEPENDENCIES
fastlane
fastlane-plugin-firebase_app_distribution
+ fastlane-plugin-get_version_name
fastlane-plugin-increment_version_code
BUNDLED WITH
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index de1dda7b..72624cee 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -22,7 +22,7 @@ android {
minSdk = 24
targetSdk = 34
versionCode = 13
- versionName = "1.1.0"
+ versionName = "1.1.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile
index d3415012..5321d67e 100644
--- a/fastlane/Pluginfile
+++ b/fastlane/Pluginfile
@@ -4,3 +4,4 @@
gem 'fastlane-plugin-increment_version_code'
gem 'fastlane-plugin-firebase_app_distribution'
+gem 'fastlane-plugin-get_version_name'
From e9b50a510eb3353af89d040477e60eff85d469ee Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 13:57:22 +0900
Subject: [PATCH 069/157] test: get version name plugin
---
fastlane/Fastfile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index e011767d..d7ac8deb 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -85,13 +85,14 @@ platform :android do
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
)
+ version_name = get_version_name()
new_version_code = latest_release[:buildVersion].to_i + 1
+ release_note = "머니몽 Android TB [#{version_name} (#{new_version_code})]"
+
increment_code(
new_version_code: new_version_code
)
- release_note = "머니몽 Android TB [#{latest_release[:displayVersion]} (#{latest_release[:buildVersion].to_i + 1})]"
-
gradle(
task: 'clean assemble',
flavor: "tb",
From 053caeeb3efbdc5340bbb926f48eebd84f860b2d Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 14:36:35 +0900
Subject: [PATCH 070/157] test: get version name
---
fastlane/Fastfile | 6 ++++--
fastlane/README.md | 8 ++++++++
fastlane/report.xml | 6 ++----
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index d7ac8deb..ded981f8 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -85,7 +85,10 @@ platform :android do
service_credentials_file: "#{ENV["FIREBASE_CREDENTIALS"]}",
app: "#{ENV["APP_ID"]}"
)
- version_name = get_version_name()
+ version_name = get_version_name(
+ gradle_file_path:"./app/build.gradle.kts",
+ ext_constant_name:"versionName"
+ )
new_version_code = latest_release[:buildVersion].to_i + 1
release_note = "머니몽 Android TB [#{version_name} (#{new_version_code})]"
@@ -110,5 +113,4 @@ platform :android do
webhook_url: "#{ENV["WEBHOOK_URL"]}"
)
end
-
end
diff --git a/fastlane/README.md b/fastlane/README.md
index 4dfa90c4..2a515589 100644
--- a/fastlane/README.md
+++ b/fastlane/README.md
@@ -63,6 +63,14 @@ Deploy a new version to the Google Play
Deploy a new version to the Firebase Distribution
+### android test2
+
+```sh
+[bundle exec] fastlane android test2
+```
+
+
+
----
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
diff --git a/fastlane/report.xml b/fastlane/report.xml
index e33b8427..fe8a0866 100644
--- a/fastlane/report.xml
+++ b/fastlane/report.xml
@@ -5,14 +5,12 @@
-
+
-
-
-
+
From d63fe511dd043ec3fbb4c0d7a9045f73959607d4 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 15:49:16 +0900
Subject: [PATCH 071/157] =?UTF-8?q?chore:=20=EB=82=B4=EB=B6=80=20=EB=B0=B0?=
=?UTF-8?q?=ED=8F=AC=20=EC=9E=90=EB=8F=99=ED=99=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/android-ci.yml | 1 -
fastlane/Fastfile | 20 +++++++++-----------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index d02f88d1..c087c413 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -4,7 +4,6 @@ on:
push:
branches:
- 'release/**'
- - 'feature/**'
jobs:
release_deploy_job:
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index ded981f8..e6d5a8c4 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -23,15 +23,15 @@ platform :android do
version_code: options[:new_version_code]
)
-# git_add(
-# path: ["./app/build.gradle.kts"]
-# )
-# git_commit(
-# path: ["./app/build.gradle.kts"],
-# message: "INCREMENT VERSION CODE"
-# )
-#
-# push_to_git_remote
+ git_add(
+ path: ["./app/build.gradle.kts"]
+ )
+ git_commit(
+ path: ["./app/build.gradle.kts"],
+ message: "INCREMENT VERSION CODE"
+ )
+
+ push_to_git_remote
end
desc "Runs all the tests"
@@ -58,8 +58,6 @@ platform :android do
desc "Deploy a new version to the Google Play"
lane :deploy do
- increment_code
-
gradle(
task: 'bundle',
flavor: "live",
From 0b5dc0827641f2f96f3b32c87eaf2ec78122bba6 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 15:58:23 +0900
Subject: [PATCH 072/157] chore: workflow target branch fix
---
.github/workflows/android-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index c087c413..a5bac587 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -64,7 +64,7 @@ jobs:
rm ./local.properties
dev_deploy_job:
- if: contains(github.ref, 'moneymong-')
+ if: contains(github.ref, 'release-')
runs-on: macos-latest
permissions:
contents: write
From 4f207dd0c14f39439599782f012b0dd6af1221cd Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Fri, 2 Aug 2024 17:18:26 +0900
Subject: [PATCH 073/157] chore: version name
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 72624cee..de1dda7b 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -22,7 +22,7 @@ android {
minSdk = 24
targetSdk = 34
versionCode = 13
- versionName = "1.1.1"
+ versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
From 6e2248a7d8687325935f6c87ee5342af1418c7f4 Mon Sep 17 00:00:00 2001
From: Heon
Date: Sun, 4 Aug 2024 23:22:00 +0900
Subject: [PATCH 074/157] chore: remove firebase credentials json
---
.github/workflows/android-ci.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index a5bac587..b50b667f 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -109,4 +109,6 @@ jobs:
run: bundle exec fastlane distribute
- name: Remove Credential
- run: rm ./local.properties
\ No newline at end of file
+ run: |
+ rm ./local.properties
+ rm ./app/firebase_credentials.json
\ No newline at end of file
From ceae1957abf1ca49d6b0c3ca29e69382fbb1d7f0 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Mon, 5 Aug 2024 00:37:14 +0900
Subject: [PATCH 075/157] =?UTF-8?q?moneymong-485=20fix:=20Custom=20Popup?=
=?UTF-8?q?=20=EC=9C=BC=EB=A1=9C=20=EA=B8=B0=EC=A1=B4=20=EC=9D=B4=EC=8A=88?=
=?UTF-8?q?(=ED=9D=B0=EC=83=89=EC=A4=84)=20=EB=8C=80=EC=9D=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../view/onboarding/LedgerOnboarding.kt | 26 +----
.../onboarding/popup/LedgerOnboardingPopup.kt | 39 ++++++++
.../popup/LedgerOnboardingPopupLayout.kt | 95 +++++++++++++++++++
3 files changed, 136 insertions(+), 24 deletions(-)
create mode 100644 feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopup.kt
create mode 100644 feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopupLayout.kt
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboarding.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboarding.kt
index 47a7ae3b..1beb6833 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboarding.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboarding.kt
@@ -9,15 +9,11 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
-import androidx.compose.ui.unit.IntOffset
-import androidx.compose.ui.unit.IntRect
import androidx.compose.ui.unit.IntSize
-import androidx.compose.ui.unit.LayoutDirection
-import androidx.compose.ui.window.Popup
-import androidx.compose.ui.window.PopupPositionProvider
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.moneymong.moneymong.design_system.theme.Gray10
import com.moneymong.moneymong.design_system.theme.White
+import com.moneymong.moneymong.ledger.view.onboarding.popup.LedgerOnboardingPopup
import java.time.LocalDate
@@ -68,9 +64,7 @@ internal fun LedgerOnboarding(
}
}
- Popup(
- popupPositionProvider = LedgerPopupPositionProvider()
- ) {
+ LedgerOnboardingPopup {
when (currentPage) {
LedgerOnboardingPage.DATE -> {
LedgerOnboardingDatePage(
@@ -101,20 +95,4 @@ internal fun LedgerOnboarding(
}
}
}
-}
-
-
-private class LedgerPopupPositionProvider : PopupPositionProvider {
- override fun calculatePosition(
- anchorBounds: IntRect,
- windowSize: IntSize,
- layoutDirection: LayoutDirection,
- popupContentSize: IntSize
- ): IntOffset {
-
- return IntOffset(
- x = 0,
- y = 0
- )
- }
}
\ No newline at end of file
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopup.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopup.kt
new file mode 100644
index 00000000..5e6649ec
--- /dev/null
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopup.kt
@@ -0,0 +1,39 @@
+package com.moneymong.moneymong.ledger.view.onboarding.popup
+
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.DisposableEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.rememberCompositionContext
+import androidx.compose.runtime.rememberUpdatedState
+import androidx.compose.ui.platform.LocalView
+
+@Composable
+internal fun LedgerOnboardingPopup(
+ content: @Composable () -> Unit
+) {
+ val view = LocalView.current
+ val parentComposition = rememberCompositionContext()
+ val currentContent by rememberUpdatedState(content)
+ val popupLayout = remember {
+ LedgerOnboardingPopupLayout(
+ composeView = view
+ ).apply {
+ setContent(parentComposition) {
+ currentContent()
+ }
+ }
+ }
+
+ DisposableEffect(key1 = popupLayout) {
+ popupLayout.show()
+
+ onDispose {
+ popupLayout.disposeComposition()
+ popupLayout.dismiss()
+ }
+ }
+}
+
+
+
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopupLayout.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopupLayout.kt
new file mode 100644
index 00000000..d490c94c
--- /dev/null
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/popup/LedgerOnboardingPopupLayout.kt
@@ -0,0 +1,95 @@
+package com.moneymong.moneymong.ledger.view.onboarding.popup
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.graphics.PixelFormat
+import android.view.Gravity
+import android.view.View
+import android.view.WindowManager
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionContext
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.platform.AbstractComposeView
+import androidx.lifecycle.findViewTreeLifecycleOwner
+import androidx.lifecycle.findViewTreeViewModelStoreOwner
+import androidx.lifecycle.setViewTreeLifecycleOwner
+import androidx.lifecycle.setViewTreeViewModelStoreOwner
+import androidx.savedstate.findViewTreeSavedStateRegistryOwner
+import androidx.savedstate.setViewTreeSavedStateRegistryOwner
+
+
+@SuppressLint("ViewConstructor")
+internal class LedgerOnboardingPopupLayout(
+ private val composeView: View,
+) : AbstractComposeView(composeView.context) {
+
+ private val windowManager =
+ composeView.context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
+ private val params = createLayoutParams()
+ private var content: @Composable () -> Unit by mutableStateOf({})
+
+
+ init {
+ id = android.R.id.content
+ setViewTreeLifecycleOwner(composeView.findViewTreeLifecycleOwner())
+ setViewTreeViewModelStoreOwner(composeView.findViewTreeViewModelStoreOwner())
+ setViewTreeSavedStateRegistryOwner(composeView.findViewTreeSavedStateRegistryOwner())
+ }
+
+ @Composable
+ override fun Content() {
+ content()
+ }
+
+ fun setContent(parent: CompositionContext, content: @Composable () -> Unit) {
+ setParentCompositionContext(parent)
+ this.content = content
+ }
+
+ fun show() {
+ windowManager.addView(this, params)
+ }
+
+ fun dismiss() {
+ setViewTreeLifecycleOwner(null)
+ windowManager.removeViewImmediate(this)
+ }
+
+
+ private fun createLayoutParams(): WindowManager.LayoutParams {
+ return WindowManager.LayoutParams().apply {
+ // Start to position the popup in the top left corner, a new position will be calculated
+ gravity = Gravity.START or Gravity.TOP
+
+ // Flags specific to android.widget.PopupWindow
+ flags = flags and (
+ WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES or
+ WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE or
+ WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
+ ).inv()
+
+ // Make the popup window not focusable
+ flags = flags or WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+
+ // Enables us to intercept outside clicks even when popup is not focusable
+ flags = flags or WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
+
+ type = WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL
+
+ // Get the Window token from the parent view
+ token = composeView.applicationWindowToken
+
+ // Set the popup window to occupy the entire screen
+ width = WindowManager.LayoutParams.MATCH_PARENT
+ height = WindowManager.LayoutParams.MATCH_PARENT
+
+ format = PixelFormat.TRANSLUCENT
+
+ // accessibilityTitle is not exposed as a public API therefore we set popup window
+ // title which is used as a fallback by a11y services
+ title = "LedgerOnboardingPopup"
+ }
+ }
+}
\ No newline at end of file
From 9582d99842eb6db006e80ad6428d81a4524348b9 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Mon, 5 Aug 2024 17:40:57 +0900
Subject: [PATCH 076/157] test: prod
---
.github/workflows/android-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index b50b667f..c64c71c6 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -3,11 +3,11 @@ name: Android CI
on:
push:
branches:
- - 'release/**'
+ - 'feature/**'
jobs:
release_deploy_job:
- if: github.ref == 'refs/heads/release/release'
+ if: contains(github.ref, 'moneymong-')
runs-on: macos-latest
permissions:
contents: write
From 899a61bc2fd9363af0c5e47c017d5f0db95ab8f7 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Mon, 5 Aug 2024 17:48:05 +0900
Subject: [PATCH 077/157] chore: redo
---
.github/workflows/android-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml
index c64c71c6..b50b667f 100644
--- a/.github/workflows/android-ci.yml
+++ b/.github/workflows/android-ci.yml
@@ -3,11 +3,11 @@ name: Android CI
on:
push:
branches:
- - 'feature/**'
+ - 'release/**'
jobs:
release_deploy_job:
- if: contains(github.ref, 'moneymong-')
+ if: github.ref == 'refs/heads/release/release'
runs-on: macos-latest
permissions:
contents: write
From d8513997b1ecc69522513ccda1bd8ad9cca4c6ea Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 7 Aug 2024 17:42:32 +0900
Subject: [PATCH 078/157] feat: gradle
---
core/common/build.gradle.kts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts
index 8d7caeb2..fba5fbee 100644
--- a/core/common/build.gradle.kts
+++ b/core/common/build.gradle.kts
@@ -2,6 +2,7 @@
plugins {
alias(libs.plugins.moneymong.android.library)
alias(libs.plugins.moneymong.android.library.compose)
+ alias(libs.plugins.moneymong.android.hilt)
}
android {
@@ -20,6 +21,10 @@ dependencies {
implementation(libs.orbit.viewModel)
implementation(libs.okhttp)
+ implementation(platform(libs.firebase.bom))
+ implementation(libs.firebase.analytics)
+ implementation(libs.firebase.crashlytics)
+
testImplementation(libs.junit4)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.test.espresso.core)
From 10be77f7ce251a0659d7f5cd7da5ecfe5e480d60 Mon Sep 17 00:00:00 2001
From: Heonbyeong
Date: Wed, 7 Aug 2024 17:43:04 +0900
Subject: [PATCH 079/157] =?UTF-8?q?feat:=20event=20tracker=20=EA=B0=9C?=
=?UTF-8?q?=EB=B0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/moneymong/moneymong/MainActivity.kt | 6 +++
.../moneymong/common/di/EventModule.kt | 18 +++++++++
.../moneymong/moneymong/common/event/Event.kt | 38 +++++++++++++++++++
.../moneymong/common/event/EventTracker.kt | 24 ++++++++++++
.../moneymong/ledger/LedgerScreen.kt | 1 +
.../moneymong/ledger/LedgerViewModel.kt | 7 ++++
6 files changed, 94 insertions(+)
create mode 100644 core/common/src/main/java/com/moneymong/moneymong/common/di/EventModule.kt
create mode 100644 core/common/src/main/java/com/moneymong/moneymong/common/event/Event.kt
create mode 100644 core/common/src/main/java/com/moneymong/moneymong/common/event/EventTracker.kt
diff --git a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt
index 51b7d080..c9a08ade 100644
--- a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt
+++ b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt
@@ -9,6 +9,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.Modifier
+import com.moneymong.moneymong.common.event.EventTracker
import dagger.hilt.android.AndroidEntryPoint
import com.moneymong.moneymong.design_system.theme.MMTheme
import com.moneymong.moneymong.domain.repository.TokenRepository
@@ -32,8 +33,13 @@ class MainActivity : ComponentActivity() {
lateinit var tokenRepository: TokenRepository
private val expired = mutableStateOf(false)
+ @Inject
+ lateinit var eventTracker: EventTracker
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
+ eventTracker.initialize()
+
setContent {
MMTheme {
MoneyMongApp(expired.value) {
diff --git a/core/common/src/main/java/com/moneymong/moneymong/common/di/EventModule.kt b/core/common/src/main/java/com/moneymong/moneymong/common/di/EventModule.kt
new file mode 100644
index 00000000..d058d534
--- /dev/null
+++ b/core/common/src/main/java/com/moneymong/moneymong/common/di/EventModule.kt
@@ -0,0 +1,18 @@
+package com.moneymong.moneymong.common.di
+
+import com.moneymong.moneymong.common.event.EventTracker
+import dagger.Module
+import dagger.Provides
+import dagger.hilt.InstallIn
+import dagger.hilt.components.SingletonComponent
+import javax.inject.Singleton
+
+@Module
+@InstallIn(SingletonComponent::class)
+object EventModule {
+
+ @Provides
+ @Singleton
+ fun provideEventTracker(): EventTracker =
+ EventTracker()
+}
\ No newline at end of file
diff --git a/core/common/src/main/java/com/moneymong/moneymong/common/event/Event.kt b/core/common/src/main/java/com/moneymong/moneymong/common/event/Event.kt
new file mode 100644
index 00000000..6d0fe619
--- /dev/null
+++ b/core/common/src/main/java/com/moneymong/moneymong/common/event/Event.kt
@@ -0,0 +1,38 @@
+package com.moneymong.moneymong.common.event
+
+enum class Event(val eventName: String, val desc: String) {
+ OPERATION_COST_CLICK(
+ eventName = "operation_cost_click",
+ desc = "운영비 등록하기 버튼 클릭"
+ ),
+ LEDGER_CLICK(
+ eventName = "ledger_click",
+ desc = "소속 장부 확인 버튼 클릭"
+ ),
+ OCR_REGISTER_CLICK(
+ eventName = "ocr_register_click",
+ desc = "등록하기 버튼 클릭"
+ ),
+ OCR_MODIFY_CLICK(
+ eventName = "ocr_modify_click",
+ desc = "수정하기 버튼 클릭"
+ ),
+ OCR_MODIFY_TO_REGISTER_CLICK(
+ eventName = "ocr_modify_to_register_click",
+ desc = "등록하기 버튼 클릭"
+ ),
+ PLUS_CLICK(
+ eventName = "plus_click",
+ desc = "+ 플로팅 버튼 클릭"
+ ),
+ HAND_CLICK(
+ eventName = "hand_click",
+ desc = "수동 등록 플로팅 버튼 클릭"
+ ),
+ OCR_CLICK(
+ eventName = "ocr_click",
+ desc = "OCR 등록 플로팅 버튼 클릭"
+ )
+ ;
+
+}
\ No newline at end of file
diff --git a/core/common/src/main/java/com/moneymong/moneymong/common/event/EventTracker.kt b/core/common/src/main/java/com/moneymong/moneymong/common/event/EventTracker.kt
new file mode 100644
index 00000000..c6288943
--- /dev/null
+++ b/core/common/src/main/java/com/moneymong/moneymong/common/event/EventTracker.kt
@@ -0,0 +1,24 @@
+package com.moneymong.moneymong.common.event
+
+import android.os.Bundle
+import com.google.firebase.Firebase
+import com.google.firebase.analytics.FirebaseAnalytics
+import com.google.firebase.analytics.analytics
+import javax.inject.Inject
+
+class EventTracker @Inject constructor() {
+
+ private lateinit var firebaseAnalytics: FirebaseAnalytics
+ private var initialized: Boolean = false
+
+ fun initialize() {
+ firebaseAnalytics = Firebase.analytics
+ initialized = true
+ }
+
+ fun logEvent(event: Event, param: Bundle? = null) {
+ check(initialized) { "logEvent를 호출하기 전 초기화가 필요합니다." }
+
+ firebaseAnalytics.logEvent(event.eventName, param)
+ }
+}
\ No newline at end of file
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
index 36d6afaa..7643d1c6 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
@@ -325,6 +325,7 @@ fun LedgerScreen(
iconResource = R.drawable.ic_plus_default,
containerColor = containerColor,
onClick = {
+ viewModel.event()
expandableFab = !expandableFab
}
)
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
index e3aa1497..6b27b4c5 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
@@ -3,6 +3,8 @@ package com.moneymong.moneymong.ledger
import androidx.lifecycle.SavedStateHandle
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.common.error.MoneyMongError
+import com.moneymong.moneymong.common.event.Event
+import com.moneymong.moneymong.common.event.EventTracker
import com.moneymong.moneymong.domain.usecase.agency.FetchAgencyIdUseCase
import com.moneymong.moneymong.domain.usecase.agency.FetchMyAgencyListUseCase
import com.moneymong.moneymong.domain.usecase.agency.SaveAgencyIdUseCase
@@ -28,6 +30,7 @@ import javax.inject.Inject
@HiltViewModel
class LedgerViewModel @Inject constructor(
savedStateHandle: SavedStateHandle,
+ private val eventTracker: EventTracker,
private val fetchLedgerTransactionListUseCase: FetchLedgerTransactionListUseCase,
private val fetchAgencyExistLedgerUseCase: FetchAgencyExistLedgerUseCase,
private val fetchMyAgencyListUseCase: FetchMyAgencyListUseCase,
@@ -216,4 +219,8 @@ class LedgerViewModel @Inject constructor(
postDisplayedLedgerOnboardingUseCase(onboardingType = state.onboardingType)
reduce { state.copy(visibleOnboarding = false) }
}
+
+ fun event() {
+ eventTracker.logEvent(Event.PLUS_CLICK)
+ }
}
\ No newline at end of file
From 9308c97776b4e2709a4aa9daa9b63d25174c9a68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?=
<101038047+eunseo0105@users.noreply.github.com>
Date: Wed, 7 Aug 2024 22:12:50 +0900
Subject: [PATCH 080/157] =?UTF-8?q?Feat.=EC=86=8C=EC=86=8D=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/res/drawable/ic_agency_delete.png | Bin 0 -> 1216 bytes
.../moneymong/network/api/AgencyApi.kt | 7 +++
.../member/MemberRemoteDataSource.kt | 2 +
.../member/MemberRemoteDataSourceImpl.kt | 4 ++
.../repository/member/MemberRepositoryImpl.kt | 4 ++
.../repository/member/MemberRepository.kt | 2 +
.../usecase/member/AgencyDeleteUseCase.kt | 12 +++++
.../moneymong/ledger/LedgerScreen.kt | 12 ++++-
.../moneymong/ledger/LedgerViewModel.kt | 49 +++++++++++++----
.../java/com/example/member/MemberScreen.kt | 49 ++++++++++++++++-
.../java/com/example/member/MemberState.kt | 2 +
.../com/example/member/MemberViewModel.kt | 50 +++++++++++++++++-
.../member/component/MemberCardView.kt | 25 +++++++++
13 files changed, 205 insertions(+), 13 deletions(-)
create mode 100644 core/design-system/src/main/res/drawable/ic_agency_delete.png
create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
diff --git a/core/design-system/src/main/res/drawable/ic_agency_delete.png b/core/design-system/src/main/res/drawable/ic_agency_delete.png
new file mode 100644
index 0000000000000000000000000000000000000000..7a3b6b7f7f7fbffae7e13781f57625e3d6b41ec4
GIT binary patch
literal 1216
zcmV;x1V8(UP)@~0drDELIAGL9O(c600d`2O+f$vv5yPt3W#N_@(tJl2v+$9yji9EtpIqVO3>^;T!C=~#uXS}C7Jg2
zfC`oFA^kV$g88Z_Qr(@I$(f$p_w;lFH8nLgH8nMN6heiF&T1RYB!fU3HVEotJnmC(
ze}IapL?F>!&49)xf6U;AK5}tDA9s%snBW45?yEgM%_@Q*_UUwY4FL%%ka)3v$dA)9
zLLzWPXFDqhM1nww?#5UUD!VHNK-dh8T_KICu}?nG_)yC7qJm
zAw+%*BC{VOL<>o>s2KrUNE6wMw&0mC0)ZAa6@9+b3$}Nf(}XRgjnDjXUUAN+2tcS9
zG_NeBWX0t%xcn}y8J*LSPy)47h4kTFACA!J`*Rqa)0JSO*j=F(=oU(cc@BzlbXbOQ
z_oYqE5x3z5Z^!5KAn%oVJFP(C#p`(f-x6JE55pE+eIH7gKE2hlV^T6Om`
zkL~}Wj)xZ)0~lf~5S?gaKun{Uddk;gKHRnkDNj@^PM9%8P*-E+D{Te(g;;57l0+dY
z6-b@3rx9e+B31Vwi!54VDNwHNL83AHIOI8_w-hL1!|Ktf7KeikF&kEoMpa@b&^0uW@_NMpfb>khx)d#VZ#}
zqgosiw!~;yJsVYty+HTGusR5&F@Kai#>~*Hwzo8@5|<#Y3znI9zP^Ntx!UoQDJzqF
z085;9`-txPPw28|LXRJ}Z>WT#=VZz%fdQTE%)t`J%`9}lSD;?AEYRWl4ra~G6=lY_
znbpx~Uq5*k0dmRRD4#l|P~jxdr2$NyA-yD{~oVzFkz;uJ}y
z6JF+nifp&hT;K~kn6XfDKiM|M<0n40UP;32S?z9QoCeIJy7?jbsP{Q0_CxGjt*NQ0
esi~>Cll%el-HxngB5MQy0000
+
+ //DELETE
+ @DELETE("api/v1/agencies/{agencyId}")
+ suspend fun deleteAgency(
+ @Path("agencyId") agencyId: Int
+ ) : Result
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSource.kt
index 8b5713b9..da900da5 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSource.kt
@@ -11,4 +11,6 @@ interface MemberRemoteDataSource {
suspend fun getMemberLists(agencyId: Long): Result
suspend fun updateMemberAuthor(agencyId : Long, data : UpdateAuthorRequest) : Result
suspend fun blockMemberAuthor(agencyId: Long, data : MemberBlockRequest) : Result
+ suspend fun deleteAgency(agencyId: Int) : Result
+
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSourceImpl.kt
index 222d5038..0cdcc50c 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/member/MemberRemoteDataSourceImpl.kt
@@ -31,4 +31,8 @@ class MemberRemoteDataSourceImpl @Inject constructor(
override suspend fun blockMemberAuthor(agencyId: Long, data: MemberBlockRequest): Result {
return memberApi.blockMemberAuthor(agencyId, data)
}
+
+ override suspend fun deleteAgency(agencyId: Int): Result {
+ return agencyApi.deleteAgency(agencyId)
+ }
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/member/MemberRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/member/MemberRepositoryImpl.kt
index 50ca2298..8bfc4841 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/member/MemberRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/member/MemberRepositoryImpl.kt
@@ -31,4 +31,8 @@ class MemberRepositoryImpl @Inject constructor(
return memberRemoteDataSource.blockMemberAuthor(agencyId, data)
}
+
+ override suspend fun deleteAgency(agencyId: Int): Result {
+ return memberRemoteDataSource.deleteAgency(agencyId)
+ }
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/member/MemberRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/member/MemberRepository.kt
index c789f21c..4ff59b80 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/member/MemberRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/member/MemberRepository.kt
@@ -11,4 +11,6 @@ interface MemberRepository {
suspend fun getMemberLists(agencyId: Long) : Result
suspend fun updateMemberAuthor(agencyId : Long, data : UpdateAuthorRequest) : Result
suspend fun blockMemberAuthor(agencyId: Long, data: MemberBlockRequest) : Result
+ suspend fun deleteAgency(agencyId: Int) :Result
+
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
new file mode 100644
index 00000000..a6b57b25
--- /dev/null
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
@@ -0,0 +1,12 @@
+package com.moneymong.moneymong.domain.usecase.member
+
+import com.moneymong.moneymong.domain.repository.member.MemberRepository
+import javax.inject.Inject
+
+class AgencyDeleteUseCase @Inject constructor(
+ private val memberRepository: MemberRepository
+) {
+ suspend operator fun invoke(agencyId: Int) : Result {
+ return memberRepository.deleteAgency(agencyId)
+ }
+}
\ No newline at end of file
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
index 36d6afaa..d8c5685b 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
@@ -333,7 +333,17 @@ fun LedgerScreen(
}
} else {
Box(modifier = modifier.fillMaxSize()) {
- MemberScreen(agencyId = state.agencyId)
+ MemberScreen(
+ agencyId = state.agencyId,
+ agencyList = state.agencyList,
+ onClickItem = {
+ viewModel.eventEmit(
+ LedgerSideEffect.LedgerSelectedAgencyChange(
+ it
+ )
+ )
+ },
+ changeAgencyList = { viewModel.changeAgencyList(it) })
}
}
}
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
index e3aa1497..1f3116ad 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
@@ -1,5 +1,6 @@
package com.moneymong.moneymong.ledger
+import android.util.Log
import androidx.lifecycle.SavedStateHandle
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.common.error.MoneyMongError
@@ -14,6 +15,7 @@ import com.moneymong.moneymong.domain.usecase.member.MemberListUseCase
import com.moneymong.moneymong.domain.usecase.user.FetchUserIdUseCase
import com.moneymong.moneymong.ledger.navigation.LedgerArgs
import com.moneymong.moneymong.ledger.view.LedgerTransactionType
+import com.moneymong.moneymong.model.agency.MyAgencyResponse
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
import org.orbitmvi.orbit.annotation.OrbitExperimental
@@ -69,6 +71,7 @@ class LedgerViewModel @Inject constructor(
reduce { state.copy(isAgencyExistLoading = true) }
fetchAgencyExistLedgerUseCase(state.agencyId)
.onSuccess {
+ Log.d("fetchAgencyExistLedger${state.agencyId}",it.toString() )
reduce {
state.copy(
isExistLedger = it,
@@ -90,6 +93,8 @@ class LedgerViewModel @Inject constructor(
page = 0,
limit = 100
).onSuccess {
+ Log.d("fetchLedgerTransactionList${state.existAgency}",it.toString() )
+
reduce {
state.copy(
ledgerTransaction = it,
@@ -97,11 +102,17 @@ class LedgerViewModel @Inject constructor(
)
}
}.onFailure {
- reduce {
+ if (it.message.equals("장부가 존재하지 않습니다.")) { //TODO - 서버 의논 후 변경 예정
state.copy(
- visibleError = true,
- errorMessage = it.message ?: MoneyMongError.UnExpectedError.message
+ visibleError = false,
)
+ } else {
+ reduce {
+ state.copy(
+ visibleError = true,
+ errorMessage = it.message ?: MoneyMongError.UnExpectedError.message
+ )
+ }
}
}.also { reduce { state.copy(isLedgerTransactionLoading = false) } }
}
@@ -111,6 +122,8 @@ class LedgerViewModel @Inject constructor(
reduce { state.copy(isMyAgencyLoading = true) }
fetchMyAgencyListUseCase()
.onSuccess {
+ Log.d("fetchMyAgencyList${state.existAgency}",it.toString() )
+
reduce {
state.copy(
agencyList = it,
@@ -142,11 +155,20 @@ class LedgerViewModel @Inject constructor(
)
}
}.onFailure {
- reduce {
- state.copy(
- visibleError = true,
- errorMessage = it.message ?: MoneyMongError.UnExpectedError.message
- )
+ if (it.message.equals("소속에 가입 후 장부를 사용할 수 있습니다.")) { //TODO - 서버 의논 후 변경 예정
+ reduce {
+ state.copy(
+ visibleError = false
+ )
+ }
+ } else {
+ reduce {
+ state.copy(
+ visibleError = true,
+ errorMessage = it.message
+ ?: MoneyMongError.UnExpectedError.message
+ )
+ }
}
}.also { reduce { state.copy(isAgencyMemberLoading = false) } }
}
@@ -216,4 +238,13 @@ class LedgerViewModel @Inject constructor(
postDisplayedLedgerOnboardingUseCase(onboardingType = state.onboardingType)
reduce { state.copy(visibleOnboarding = false) }
}
-}
\ No newline at end of file
+
+
+ fun changeAgencyList(filteredAgencyList: List) = intent {
+ reduce {
+ state.copy(
+ agencyList = filteredAgencyList
+ )
+ }
+ }
+}
diff --git a/feature/member/src/main/java/com/example/member/MemberScreen.kt b/feature/member/src/main/java/com/example/member/MemberScreen.kt
index e7a4019c..75ee832e 100644
--- a/feature/member/src/main/java/com/example/member/MemberScreen.kt
+++ b/feature/member/src/main/java/com/example/member/MemberScreen.kt
@@ -37,6 +37,7 @@ import com.moneymong.moneymong.design_system.component.bottomSheet.MDSBottomShee
import com.moneymong.moneymong.design_system.component.button.MDSButton
import com.moneymong.moneymong.design_system.component.button.MDSButtonSize
import com.moneymong.moneymong.design_system.component.button.MDSButtonType
+import com.moneymong.moneymong.design_system.component.modal.MDSModal
import com.moneymong.moneymong.design_system.component.snackbar.MDSSnackbarHost
import com.moneymong.moneymong.design_system.error.ErrorDialog
import com.moneymong.moneymong.design_system.error.ErrorScreen
@@ -50,6 +51,7 @@ import com.moneymong.moneymong.design_system.theme.Gray08
import com.moneymong.moneymong.design_system.theme.MMHorizontalSpacing
import com.moneymong.moneymong.design_system.theme.Red03
import com.moneymong.moneymong.design_system.theme.White
+import com.moneymong.moneymong.model.agency.MyAgencyResponse
import kotlinx.coroutines.launch
import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect
@@ -59,7 +61,10 @@ import org.orbitmvi.orbit.compose.collectSideEffect
@Composable
fun MemberScreen(
viewModel: MemberViewModel = hiltViewModel(),
- agencyId: Int
+ agencyId: Int,
+ agencyList: List,
+ onClickItem: (agencyId: Int) -> Unit,
+ changeAgencyList: (changeAgencyList: List) -> Unit
) {
val sheetState = rememberModalBottomSheetState(
skipPartiallyExpanded = true,
@@ -196,6 +201,44 @@ fun MemberScreen(
)
}
+ if (state.deleteAgency) {
+ MDSModal(
+ icon = R.drawable.ic_warning_filled,
+ title = "소속을 정말 삭제하시겠어요?",
+ description = "등록된 회비 내역이 모두 사라져요.",
+ negativeBtnText = "취소",
+ positiveBtnText = "확인",
+ onClickNegative = { viewModel.deleteAgencyBtnClicked(false) },
+ onClickPositive = {
+ viewModel.deleteAgency(
+ agencyId,
+ agencyList,
+ onClickItem,
+ changeAgencyList
+ )
+ }
+ )
+ }
+
+ if (state.deleteAgency) {
+ MDSModal(
+ icon = R.drawable.ic_warning_filled,
+ title = "소속을 정말 삭제하시겠어요?",
+ description = "등록된 회비 내역이 모두 사라져요.",
+ negativeBtnText = "취소",
+ positiveBtnText = "확인",
+ onClickNegative = { viewModel.deleteAgencyBtnClicked(false) },
+ onClickPositive = {
+ viewModel.deleteAgency(
+ agencyId,
+ agencyList,
+ onClickItem,
+ changeAgencyList
+ )
+ }
+ )
+ }
+
if (state.visibleBottomSheet) {
viewModel.isRoleChanged(false)
MDSBottomSheet(
@@ -383,6 +426,8 @@ fun MemberScreen(
invitationCode = state.invitationCode,
isReInvitationCode = { viewModel.eventEmit(MemberSideEffect.GetReInvitationCode(it)) }, //TODO
onCopyChange = { onCopyClick -> viewModel.onCopyClickChanged(onCopyClick) },
+ deleteAgencyBtnClicked = { onClick -> viewModel.deleteAgencyBtnClicked(onClick)}
+
)
MemberListView(
@@ -428,6 +473,8 @@ fun MemberScreen(
invitationCode = state.invitationCode,
isReInvitationCode = { viewModel.eventEmit(MemberSideEffect.GetReInvitationCode(it)) },
onCopyChange = { onCopyClick -> viewModel.onCopyClickChanged(onCopyClick) },
+ deleteAgencyBtnClicked = { onClick -> viewModel.deleteAgencyBtnClicked(onClick)}
+
)
MemberListView(
diff --git a/feature/member/src/main/java/com/example/member/MemberState.kt b/feature/member/src/main/java/com/example/member/MemberState.kt
index cc11fb63..3a4ae76a 100644
--- a/feature/member/src/main/java/com/example/member/MemberState.kt
+++ b/feature/member/src/main/java/com/example/member/MemberState.kt
@@ -31,4 +31,6 @@ data class MemberState(
val isUserAuthor: String = "",
val agencyId: Int = 0,
val isBlockedUser : Boolean = false,
+ val deleteAgency : Boolean = false,
+
) : State
\ No newline at end of file
diff --git a/feature/member/src/main/java/com/example/member/MemberViewModel.kt b/feature/member/src/main/java/com/example/member/MemberViewModel.kt
index e0283de1..fe15ac2b 100644
--- a/feature/member/src/main/java/com/example/member/MemberViewModel.kt
+++ b/feature/member/src/main/java/com/example/member/MemberViewModel.kt
@@ -3,12 +3,14 @@ package com.example.member
import android.util.Log
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.domain.usecase.agency.FetchAgencyIdUseCase
+import com.moneymong.moneymong.domain.usecase.member.AgencyDeleteUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberBlockUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberInvitationCodeUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberListUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberReInvitationCodeUseCase
import com.moneymong.moneymong.domain.usecase.member.UpdateMemberAuthorUseCase
import com.moneymong.moneymong.domain.usecase.user.GetMyInfoUseCase
+import com.moneymong.moneymong.model.agency.MyAgencyResponse
import com.moneymong.moneymong.model.member.AgencyUser
import com.moneymong.moneymong.model.member.MemberBlockRequest
import com.moneymong.moneymong.model.member.UpdateAuthorRequest
@@ -27,7 +29,8 @@ class MemberViewModel @Inject constructor(
private val getMyInfoUseCase: GetMyInfoUseCase,
private val updateMemberAuthorUseCase: UpdateMemberAuthorUseCase,
private val memberBlockUseCase: MemberBlockUseCase,
- private val fetchAgencyIdUseCase: FetchAgencyIdUseCase
+ private val fetchAgencyIdUseCase: FetchAgencyIdUseCase,
+ private val delecteAgencyUseCase: AgencyDeleteUseCase
) : BaseViewModel(MemberState()) {
init {
@@ -256,6 +259,7 @@ class MemberViewModel @Inject constructor(
}
}
+
fun blockMemberAuthor(agencyId: Long, userId: Long) = intent {
memberBlockUseCase(agencyId, MemberBlockRequest(userId))
.onSuccess {
@@ -263,7 +267,7 @@ class MemberViewModel @Inject constructor(
updateMemberListByBlock(userId)
}
.onFailure {
- reduce{
+ reduce {
state.copy(
visiblePopUpError = true,
errorPopUpMessage = it.message.toString()
@@ -272,6 +276,48 @@ class MemberViewModel @Inject constructor(
}
}
+
+ fun deleteAgency(
+ agencyId: Int,
+ agencyList: List,
+ onClickItem: (agencyId: Int) -> Unit,
+ changeAgencyList: (agencyList: List) -> Unit
+ ) = intent {
+ delecteAgencyUseCase.invoke(agencyId)
+ .onSuccess {
+ Log.d("deleteAgency${agencyId}", it.toString())
+ val filteredList = agencyList.filter { it.id != agencyId }
+ if (filteredList.isNotEmpty()) {
+ val randomAgency = filteredList.random()
+ onClickItem(randomAgency.id)
+ changeAgencyList(filteredList)
+ } else {
+ changeAgencyList(emptyList())
+ }
+ reduce {
+ state.copy(
+ deleteAgency = false
+ )
+ }
+ }.onFailure {
+ reduce {
+ state.copy(
+ visiblePopUpError = true,
+ errorPopUpMessage = it.message.toString()
+ )
+ }
+ }
+ }
+
+
+ fun deleteAgencyBtnClicked(deleteAgencyBtnClicked : Boolean) = intent {
+ reduce {
+ state.copy(
+ deleteAgency = deleteAgencyBtnClicked
+ )
+ }
+ }
+
private fun updateFilteredMemberListByBlock(userId: Long) = intent {
val currentMemberList = state.filteredMemberList
val updateBlockedMemberList = currentMemberList.filterNot { member ->
diff --git a/feature/member/src/main/java/com/example/member/component/MemberCardView.kt b/feature/member/src/main/java/com/example/member/component/MemberCardView.kt
index 42b2336c..b0ca5ba8 100644
--- a/feature/member/src/main/java/com/example/member/component/MemberCardView.kt
+++ b/feature/member/src/main/java/com/example/member/component/MemberCardView.kt
@@ -5,6 +5,7 @@ import android.content.ClipboardManager
import android.content.Context
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
@@ -31,6 +32,7 @@ import com.moneymong.moneymong.design_system.theme.Body4
import com.moneymong.moneymong.design_system.theme.Gray02
import com.moneymong.moneymong.design_system.theme.Gray10
import com.moneymong.moneymong.design_system.theme.Mint03
+import com.moneymong.moneymong.design_system.theme.Red03
import com.moneymong.moneymong.design_system.theme.White
import com.moneymong.moneymong.model.member.AgencyUser
@@ -45,6 +47,8 @@ fun MemberCardView(
invitationCode: String,
isReInvitationCode: (Long) -> Unit,
onCopyChange: (Boolean) -> Unit,
+ deleteAgencyBtnClicked : (Boolean) -> Unit
+
) {
val context = LocalContext.current
@@ -92,6 +96,27 @@ fun MemberCardView(
contentColor = White,
)
+ if(memberMyInfo.agencyUserRole != "MEMBER"){
+ Row (
+ modifier = Modifier
+ .fillMaxWidth()
+ .noRippleClickable { deleteAgencyBtnClicked(true) },
+ horizontalArrangement = Arrangement.End,
+ verticalAlignment = Alignment.CenterVertically
+ ){
+ Text(
+ text = "소속삭제",
+ color = Red03,
+ style = Body3
+ )
+ Image(
+ modifier= Modifier.size(18.dp),
+ painter =painterResource(id = R.drawable.ic_agency_delete),
+ contentDescription =""
+ )
+
+ }
+ }
}
if (memberMyInfo.agencyUserRole == "STAFF") {
From d787edc4b1037d1dde221820b45baa65862b2a50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?=
<101038047+eunseo0105@users.noreply.github.com>
Date: Wed, 7 Aug 2024 22:13:20 +0900
Subject: [PATCH 081/157] =?UTF-8?q?Fix:=20Agency.kt=20=EC=9E=84=EC=8B=9C?=
=?UTF-8?q?=20=ED=8C=8C=EC=9D=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/moneymong/feature/agency/search/Agency.kt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
index 594479fe..0f5d6ea2 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
@@ -16,6 +16,7 @@ fun AgencyGetResponse.toAgency(): Agency {
type = when (this.type) {
"IN_SCHOOL_CLUB" -> AgencyType.CLUB
"STUDENT_COUNCIL" -> AgencyType.COUNCIL
+ "GENERAL" -> AgencyType.GENERAL //임의로 설정 -> 추후 소속 코드 반영
else -> throw IllegalArgumentException("Unknown type: $type")
},
name = this.name,
@@ -29,6 +30,7 @@ fun MyAgencyResponse.toAgency(): Agency {
type = when (this.type) {
"IN_SCHOOL_CLUB" -> AgencyType.CLUB
"STUDENT_COUNCIL" -> AgencyType.COUNCIL
+ "GENERAL" -> AgencyType.GENERAL //임의로 설정 -> 추후 소속 코드 반영
else -> throw IllegalArgumentException("Unknown type: $type")
},
name = this.name,
@@ -38,10 +40,13 @@ fun MyAgencyResponse.toAgency(): Agency {
enum class AgencyType(val text: String) {
CLUB(text = "동아리"),
- COUNCIL(text = "학생회");
+ COUNCIL(text = "학생회"),
+ GENERAL(text ="기타"); //임의로 설정 -> 추후 소속 코드 반영
fun agencyRegisterTypeToString(): String = when (this) {
CLUB -> "IN_SCHOOL_CLUB"
COUNCIL -> "STUDENT_COUNCIL"
+ GENERAL -> "IN_SCHOOL_CLUB" //임의로 설정 -> 추후 소속 코드 반영
+
}
}
\ No newline at end of file
From 19f70e3ec0003b7b9423d3cd6f1bb4574e5b30b5 Mon Sep 17 00:00:00 2001
From: Heon
Date: Wed, 7 Aug 2024 22:15:00 +0900
Subject: [PATCH 082/157] feat: event tracking
---
.../complete/AgencyRegisterCompleteViewModel.kt | 14 +++++++++++---
.../moneymong/moneymong/ledger/LedgerScreen.kt | 7 ++++---
.../moneymong/ledger/LedgerViewModel.kt | 16 +++++++++++-----
.../moneymong/ocr_detail/OCRDetailViewModel.kt | 4 ++++
.../moneymong/ocr_result/OCRResultViewModel.kt | 6 ++++++
5 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/complete/AgencyRegisterCompleteViewModel.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/complete/AgencyRegisterCompleteViewModel.kt
index 775e5e65..4efbe5f1 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/complete/AgencyRegisterCompleteViewModel.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/complete/AgencyRegisterCompleteViewModel.kt
@@ -1,21 +1,29 @@
package com.moneymong.moneymong.feature.agency.register.complete
import com.moneymong.moneymong.common.base.BaseViewModel
+import com.moneymong.moneymong.common.event.Event
+import com.moneymong.moneymong.common.event.EventTracker
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
-class AgencyRegisterCompleteViewModel @Inject constructor() :
+class AgencyRegisterCompleteViewModel @Inject constructor(
+ private val eventTracker: EventTracker
+) :
BaseViewModel(
AgencyRegisterCompleteState
) {
- fun navigateToLedger() =
+ fun navigateToLedger() {
+ eventTracker.logEvent(Event.LEDGER_CLICK)
eventEmit(sideEffect = AgencyRegisterCompleteSideEffect.NavigateToLedger)
+ }
fun navigateToAgencySearch() =
eventEmit(sideEffect = AgencyRegisterCompleteSideEffect.NavigateToAgencySearch)
- fun navigateToLedgerManual() =
+ fun navigateToLedgerManual() {
+ eventTracker.logEvent(Event.OPERATION_COST_CLICK)
eventEmit(sideEffect = AgencyRegisterCompleteSideEffect.NavigateToLedgerManual)
+ }
}
\ No newline at end of file
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
index 7643d1c6..4ef805f3 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerScreen.kt
@@ -42,6 +42,7 @@ import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavOptions
import com.example.member.MemberScreen
+import com.moneymong.moneymong.common.event.Event
import com.moneymong.moneymong.common.ui.plus
import com.moneymong.moneymong.design_system.R
import com.moneymong.moneymong.design_system.component.bottomSheet.MDSBottomSheet
@@ -283,7 +284,7 @@ fun LedgerScreen(
height = 24.dp
),
containerColor = Mint03,
- onClick = { viewModel.eventEmit(LedgerSideEffect.LedgerNavigateToOCR) }
+ onClick = viewModel::onClickLedgerRegisterOCR
)
}
if (expandableFab) Spacer(modifier = Modifier.height(10.dp))
@@ -307,7 +308,7 @@ fun LedgerScreen(
MDSFloatingActionButton(
iconResource = R.drawable.ic_pencil,
containerColor = Mint03,
- onClick = { viewModel.eventEmit(LedgerSideEffect.LedgerNavigateToLedgerManual) }
+ onClick = viewModel::onClickLedgerRegisterManual
)
}
if (expandableFab) Spacer(modifier = Modifier.height(10.dp))
@@ -325,7 +326,7 @@ fun LedgerScreen(
iconResource = R.drawable.ic_plus_default,
containerColor = containerColor,
onClick = {
- viewModel.event()
+ viewModel.eventTracker.logEvent(Event.PLUS_CLICK)
expandableFab = !expandableFab
}
)
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
index 6b27b4c5..c5ba3868 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
@@ -30,7 +30,7 @@ import javax.inject.Inject
@HiltViewModel
class LedgerViewModel @Inject constructor(
savedStateHandle: SavedStateHandle,
- private val eventTracker: EventTracker,
+ val eventTracker: EventTracker,
private val fetchLedgerTransactionListUseCase: FetchLedgerTransactionListUseCase,
private val fetchAgencyExistLedgerUseCase: FetchAgencyExistLedgerUseCase,
private val fetchMyAgencyListUseCase: FetchMyAgencyListUseCase,
@@ -215,12 +215,18 @@ class LedgerViewModel @Inject constructor(
fetchLedgerTransactionList()
}
+ fun onClickLedgerRegisterOCR() = intent {
+ eventTracker.logEvent(Event.OCR_CLICK)
+ postSideEffect(LedgerSideEffect.LedgerNavigateToOCR)
+ }
+
+ fun onClickLedgerRegisterManual() = intent {
+ eventTracker.logEvent(Event.HAND_CLICK)
+ postSideEffect(LedgerSideEffect.LedgerNavigateToLedgerManual)
+ }
+
fun onDismissOnboarding() = intent {
postDisplayedLedgerOnboardingUseCase(onboardingType = state.onboardingType)
reduce { state.copy(visibleOnboarding = false) }
}
-
- fun event() {
- eventTracker.logEvent(Event.PLUS_CLICK)
- }
}
\ No newline at end of file
diff --git a/feature/ocr-detail/src/main/java/com/moneymong/moneymong/ocr_detail/OCRDetailViewModel.kt b/feature/ocr-detail/src/main/java/com/moneymong/moneymong/ocr_detail/OCRDetailViewModel.kt
index ad718676..b987fca8 100644
--- a/feature/ocr-detail/src/main/java/com/moneymong/moneymong/ocr_detail/OCRDetailViewModel.kt
+++ b/feature/ocr-detail/src/main/java/com/moneymong/moneymong/ocr_detail/OCRDetailViewModel.kt
@@ -3,6 +3,8 @@ package com.moneymong.moneymong.ocr_detail
import android.content.SharedPreferences
import androidx.compose.ui.text.input.TextFieldValue
import com.moneymong.moneymong.common.base.BaseViewModel
+import com.moneymong.moneymong.common.event.Event
+import com.moneymong.moneymong.common.event.EventTracker
import com.moneymong.moneymong.common.ext.toMultipart
import com.moneymong.moneymong.common.ui.isValidPaymentDate
import com.moneymong.moneymong.common.ui.isValidPaymentTime
@@ -29,6 +31,7 @@ import javax.inject.Inject
@HiltViewModel
class OCRDetailViewModel @Inject constructor(
+ private val eventTracker: EventTracker,
private val prefs: SharedPreferences,
private val postLedgerTransactionUseCase: PostLedgerTransactionUseCase,
private val postFileUploadUseCase: PostFileUploadUseCase,
@@ -134,6 +137,7 @@ class OCRDetailViewModel @Inject constructor(
}
fun onClickPostLedger() = intent {
+ eventTracker.logEvent(Event.OCR_MODIFY_TO_REGISTER_CLICK)
postDocumentImage(imageFile = state.receiptFile, isReceipt = true)
}
diff --git a/feature/ocr-result/src/main/java/com/moneymong/moneymong/ocr_result/OCRResultViewModel.kt b/feature/ocr-result/src/main/java/com/moneymong/moneymong/ocr_result/OCRResultViewModel.kt
index ca5f1fa6..b7e9c027 100644
--- a/feature/ocr-result/src/main/java/com/moneymong/moneymong/ocr_result/OCRResultViewModel.kt
+++ b/feature/ocr-result/src/main/java/com/moneymong/moneymong/ocr_result/OCRResultViewModel.kt
@@ -2,6 +2,8 @@ package com.moneymong.moneymong.ocr_result
import android.content.SharedPreferences
import com.moneymong.moneymong.common.base.BaseViewModel
+import com.moneymong.moneymong.common.event.Event
+import com.moneymong.moneymong.common.event.EventTracker
import com.moneymong.moneymong.common.ext.toMultipart
import com.moneymong.moneymong.domain.usecase.agency.FetchAgencyIdUseCase
import com.moneymong.moneymong.domain.usecase.ledger.PostLedgerTransactionUseCase
@@ -21,6 +23,7 @@ import javax.inject.Inject
@HiltViewModel
class OCRResultViewModel @Inject constructor(
+ private val eventTracker: EventTracker,
private val prefs: SharedPreferences,
private val postLedgerTransactionUseCase: PostLedgerTransactionUseCase,
private val postFileUploadUseCase: PostFileUploadUseCase,
@@ -59,6 +62,8 @@ class OCRResultViewModel @Inject constructor(
}
fun postReceiptImage() = intent {
+ eventTracker.logEvent(Event.OCR_REGISTER_CLICK)
+
state.receiptFile?.let {
if (!state.isLoading) {
reduce { state.copy(isLoading = true) }
@@ -93,6 +98,7 @@ class OCRResultViewModel @Inject constructor(
// onClick
fun onClickOCREdit() = intent {
+ eventTracker.logEvent(Event.OCR_MODIFY_CLICK)
postSideEffect(OCRResultSideEffect.OCRResultNavigateToOCRDetail(state.document))
}
}
\ No newline at end of file
From a4dc6a8b9bca9f21c59fe26632f2b353df2dc92d Mon Sep 17 00:00:00 2001
From: eunseo
Date: Sat, 10 Aug 2024 22:03:54 +0900
Subject: [PATCH 083/157] =?UTF-8?q?Fix:=20=ED=9D=AC=EC=A7=81=EB=8B=98=20?=
=?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../usecase/member/AgencyDeleteUseCase.kt | 2 +-
.../moneymong/ledger/LedgerViewModel.kt | 10 ++++----
.../java/com/example/member/MemberScreen.kt | 23 ++-----------------
.../com/example/member/MemberViewModel.kt | 7 +++---
4 files changed, 13 insertions(+), 29 deletions(-)
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
index a6b57b25..c9a6fc3e 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/member/AgencyDeleteUseCase.kt
@@ -3,7 +3,7 @@ package com.moneymong.moneymong.domain.usecase.member
import com.moneymong.moneymong.domain.repository.member.MemberRepository
import javax.inject.Inject
-class AgencyDeleteUseCase @Inject constructor(
+class DeleteAgencyUseCase @Inject constructor(
private val memberRepository: MemberRepository
) {
suspend operator fun invoke(agencyId: Int) : Result {
diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
index 1f3116ad..33765868 100644
--- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
+++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/LedgerViewModel.kt
@@ -102,10 +102,12 @@ class LedgerViewModel @Inject constructor(
)
}
}.onFailure {
- if (it.message.equals("장부가 존재하지 않습니다.")) { //TODO - 서버 의논 후 변경 예정
- state.copy(
- visibleError = false,
- )
+ if (it.message.equals("장부가 존재하지 않습니다.")) {
+ reduce { //TODO - 서버 의논 후 변경 예정
+ state.copy(
+ visibleError = false,
+ )
+ }
} else {
reduce {
state.copy(
diff --git a/feature/member/src/main/java/com/example/member/MemberScreen.kt b/feature/member/src/main/java/com/example/member/MemberScreen.kt
index 75ee832e..be6ce479 100644
--- a/feature/member/src/main/java/com/example/member/MemberScreen.kt
+++ b/feature/member/src/main/java/com/example/member/MemberScreen.kt
@@ -63,7 +63,7 @@ fun MemberScreen(
viewModel: MemberViewModel = hiltViewModel(),
agencyId: Int,
agencyList: List,
- onClickItem: (agencyId: Int) -> Unit,
+ changeAgency: (agencyId: Int) -> Unit,
changeAgencyList: (changeAgencyList: List) -> Unit
) {
val sheetState = rememberModalBottomSheetState(
@@ -213,26 +213,7 @@ fun MemberScreen(
viewModel.deleteAgency(
agencyId,
agencyList,
- onClickItem,
- changeAgencyList
- )
- }
- )
- }
-
- if (state.deleteAgency) {
- MDSModal(
- icon = R.drawable.ic_warning_filled,
- title = "소속을 정말 삭제하시겠어요?",
- description = "등록된 회비 내역이 모두 사라져요.",
- negativeBtnText = "취소",
- positiveBtnText = "확인",
- onClickNegative = { viewModel.deleteAgencyBtnClicked(false) },
- onClickPositive = {
- viewModel.deleteAgency(
- agencyId,
- agencyList,
- onClickItem,
+ changeAgency,
changeAgencyList
)
}
diff --git a/feature/member/src/main/java/com/example/member/MemberViewModel.kt b/feature/member/src/main/java/com/example/member/MemberViewModel.kt
index fe15ac2b..460f31b7 100644
--- a/feature/member/src/main/java/com/example/member/MemberViewModel.kt
+++ b/feature/member/src/main/java/com/example/member/MemberViewModel.kt
@@ -3,7 +3,7 @@ package com.example.member
import android.util.Log
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.domain.usecase.agency.FetchAgencyIdUseCase
-import com.moneymong.moneymong.domain.usecase.member.AgencyDeleteUseCase
+import com.moneymong.moneymong.domain.usecase.member.DeleteAgencyUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberBlockUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberInvitationCodeUseCase
import com.moneymong.moneymong.domain.usecase.member.MemberListUseCase
@@ -30,7 +30,7 @@ class MemberViewModel @Inject constructor(
private val updateMemberAuthorUseCase: UpdateMemberAuthorUseCase,
private val memberBlockUseCase: MemberBlockUseCase,
private val fetchAgencyIdUseCase: FetchAgencyIdUseCase,
- private val delecteAgencyUseCase: AgencyDeleteUseCase
+ private val deleteAgencyUseCase: DeleteAgencyUseCase
) : BaseViewModel(MemberState()) {
init {
@@ -283,7 +283,7 @@ class MemberViewModel @Inject constructor(
onClickItem: (agencyId: Int) -> Unit,
changeAgencyList: (agencyList: List) -> Unit
) = intent {
- delecteAgencyUseCase.invoke(agencyId)
+ deleteAgencyUseCase.invoke(agencyId)
.onSuccess {
Log.d("deleteAgency${agencyId}", it.toString())
val filteredList = agencyList.filter { it.id != agencyId }
@@ -302,6 +302,7 @@ class MemberViewModel @Inject constructor(
}.onFailure {
reduce {
state.copy(
+ deleteAgency = false,
visiblePopUpError = true,
errorPopUpMessage = it.message.toString()
)
From 8aa8fa2e6eb254fb4e949218e05d233a65f49d8b Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Thu, 25 Jul 2024 16:01:12 +0900
Subject: [PATCH 084/157] =?UTF-8?q?MONEYMONG-494=20feat:=20selection=20dis?=
=?UTF-8?q?abled=20=ED=83=80=EC=9E=85=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../component/selection/Selection.kt | 74 +++++++++++--------
.../component/selection/SelectionDefaults.kt | 66 +++++++++++++++++
.../component/selection/SelectionType.kt | 25 -------
3 files changed, 108 insertions(+), 57 deletions(-)
create mode 100644 core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionDefaults.kt
delete mode 100644 core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionType.kt
diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/Selection.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/Selection.kt
index 782fbab9..60cae240 100644
--- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/Selection.kt
+++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/Selection.kt
@@ -6,40 +6,43 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableIntStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.theme.Body3
-import com.moneymong.moneymong.design_system.theme.Gray03
@Composable
fun MDSSelection(
modifier: Modifier = Modifier,
text: String,
- isSelected: Boolean,
+ enabled: Boolean = true,
+ isSelected: Boolean = false,
type: MDSSelectionType = MDSSelectionType.PRIMARY,
- onClick: () -> Unit
+ onClick: () -> Unit = {}
) {
- val backgroundColor =
- if (isSelected) type.backgroundColor else unSelectedBackgroundColor
- val contentColor =
- if (isSelected) type.contentColor else unSelectedContentColor
- val borderColor =
- if (isSelected) type.backgroundColor else Gray03
+ val backgroundColor = selectionBackgroundColor(enabled, isSelected, type)
+ val contentColor = selectionContentColor(enabled, isSelected, type)
+ val borderColor = selectionBorderColor(enabled, isSelected, type)
Box(
modifier = modifier
.clip(RoundedCornerShape(8.dp))
.background(color = backgroundColor)
- .clickable { onClick() }
+ .clickable(enabled = enabled) { onClick() }
.border(
width = 1.dp,
color = borderColor,
@@ -59,28 +62,35 @@ fun MDSSelection(
@Preview(showBackground = true)
@Composable
private fun MDSSelectionPreview() {
- Row(
- modifier = Modifier.fillMaxWidth(),
- horizontalArrangement = Arrangement.spacedBy(10.dp)
+ var selectedType by remember { mutableIntStateOf(1) }
+
+ Box(
+ modifier = Modifier
+ .fillMaxSize()
+ .background(Color.White)
) {
- MDSSelection(
- modifier = Modifier.weight(1f),
- text = "동아리",
- isSelected = true,
- onClick = {}
- )
- MDSSelection(
- modifier = Modifier.weight(1f),
- text = "나는 Secondary",
- isSelected = true,
- type = MDSSelectionType.SECONDARY,
- onClick = {}
- )
- MDSSelection(
- modifier = Modifier.weight(1f),
- text = "학생회",
- isSelected = false,
- onClick = {}
- )
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.spacedBy(10.dp)
+ ) {
+ MDSSelection(
+ modifier = Modifier.weight(1f),
+ text = "동아리",
+ isSelected = selectedType == 1,
+ onClick = { selectedType = 1 }
+ )
+ MDSSelection(
+ modifier = Modifier.weight(1f),
+ text = "나는 Secondary",
+ isSelected = selectedType == 2,
+ type = MDSSelectionType.SECONDARY,
+ onClick = { selectedType = 2 }
+ )
+ MDSSelection(
+ modifier = Modifier.weight(1f),
+ text = "나는 disabled",
+ enabled = false,
+ )
+ }
}
}
\ No newline at end of file
diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionDefaults.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionDefaults.kt
new file mode 100644
index 00000000..c310238b
--- /dev/null
+++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionDefaults.kt
@@ -0,0 +1,66 @@
+package com.moneymong.moneymong.design_system.component.selection
+
+import androidx.compose.ui.graphics.Color
+import com.moneymong.moneymong.design_system.theme.Blue01
+import com.moneymong.moneymong.design_system.theme.Blue04
+import com.moneymong.moneymong.design_system.theme.Gray03
+import com.moneymong.moneymong.design_system.theme.Gray04
+import com.moneymong.moneymong.design_system.theme.Gray05
+import com.moneymong.moneymong.design_system.theme.White
+
+
+enum class MDSSelectionType(
+ val backgroundColor: Color,
+ val contentColor: Color
+) {
+ PRIMARY(
+ backgroundColor = Blue04,
+ contentColor = White
+ ),
+ SECONDARY(
+ backgroundColor = Blue01,
+ contentColor = Blue04
+ )
+}
+
+internal val unSelectedBackgroundColor = White
+internal val unSelectedContentColor = Gray05
+
+internal val disabledBackgroundColor = Gray03
+internal val disabledContentColor = Gray04
+
+internal val selectionBackgroundColor: (
+ enabled: Boolean,
+ isSelected: Boolean,
+ type: MDSSelectionType
+) -> Color = { enabled, isSelected, type ->
+ when {
+ enabled.not() -> disabledBackgroundColor
+ isSelected.not() -> unSelectedBackgroundColor
+ else -> type.backgroundColor
+ }
+}
+
+internal val selectionContentColor: (
+ enabled: Boolean,
+ isSelected: Boolean,
+ type: MDSSelectionType
+) -> Color = { enabled, isSelected, type ->
+ when {
+ enabled.not() -> disabledContentColor
+ isSelected.not() -> unSelectedContentColor
+ else -> type.contentColor
+ }
+}
+
+internal val selectionBorderColor: (
+ enabled: Boolean,
+ isSelected: Boolean,
+ type: MDSSelectionType
+) -> Color = { enabled, isSelected, type ->
+ when {
+ enabled.not() -> disabledBackgroundColor
+ isSelected.not() -> Gray03
+ else -> type.backgroundColor
+ }
+}
\ No newline at end of file
diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionType.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionType.kt
deleted file mode 100644
index 6b308d7f..00000000
--- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/component/selection/SelectionType.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.moneymong.moneymong.design_system.component.selection
-
-import androidx.compose.ui.graphics.Color
-import com.moneymong.moneymong.design_system.theme.Blue01
-import com.moneymong.moneymong.design_system.theme.Blue04
-import com.moneymong.moneymong.design_system.theme.Gray05
-import com.moneymong.moneymong.design_system.theme.White
-
-
-enum class MDSSelectionType(
- val backgroundColor: Color,
- val contentColor: Color
-) {
- PRIMARY(
- backgroundColor = Blue04,
- contentColor = White
- ),
- SECONDARY(
- backgroundColor = Blue01,
- contentColor = Blue04
- ),
-}
-
-internal val unSelectedBackgroundColor = White
-internal val unSelectedContentColor = Gray05
\ No newline at end of file
From 8f48362b07bf3aa668342c1baf05ecd5d34feb0f Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Thu, 25 Jul 2024 16:42:05 +0900
Subject: [PATCH 085/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EC=86=8C?=
=?UTF-8?q?=EC=86=8D=20=ED=83=80=EC=9E=85=EC=97=90=20'=EA=B8=B0=ED=83=80?=
=?UTF-8?q?=20=EB=AA=A8=EC=9E=84'=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../view/AgencyRegisterContentView.kt | 26 ++++++++++++++++---
.../moneymong/feature/agency/search/Agency.kt | 24 ++++++++++-------
2 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
index 4e2af5a7..749c5166 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
@@ -20,6 +20,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.text.input.TextFieldValue
+import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.component.selection.MDSSelection
import com.moneymong.moneymong.design_system.component.textfield.MDSTextField
@@ -59,7 +60,7 @@ internal fun AgencyResisterContentView(
@Composable
private fun TitleView() {
Text(
- text = "동아리 or 학생회 등록에\n필요한 항목들을 채워주세요.",
+ text = "회비 관리가 필요한\n소속 정보를 알려주세요!",
color = Gray10,
style = Heading2
)
@@ -83,16 +84,22 @@ private fun SelectTypeView(
) {
MDSSelection(
modifier = Modifier.weight(1f),
- text = "동아리",
+ text = AgencyType.CLUB.text,
isSelected = agencyType == AgencyType.CLUB,
onClick = { onAgencyTypeChange(AgencyType.CLUB) }
)
MDSSelection(
modifier = Modifier.weight(1f),
- text = "학생회",
+ text = AgencyType.COUNCIL.text,
isSelected = agencyType == AgencyType.COUNCIL,
onClick = { onAgencyTypeChange(AgencyType.COUNCIL) }
)
+ MDSSelection(
+ modifier = Modifier.weight(1f),
+ text = AgencyType.GENERAL.text,
+ isSelected = agencyType == AgencyType.GENERAL,
+ onClick = { onAgencyTypeChange(AgencyType.GENERAL) }
+ )
}
}
}
@@ -144,4 +151,17 @@ private fun InputNameView(
focusManager.clearFocus()
})
)
+}
+
+
+@Preview
+@Composable
+private fun AgencyResisterContentViewPreview() {
+ AgencyResisterContentView(
+ agencyType = AgencyType.GENERAL,
+ onAgencyTypeChange = {},
+ agencyName = TextFieldValue("동아리"),
+ onAgencyNameChange = {},
+ changeNameTextFieldIsError = {}
+ )
}
\ No newline at end of file
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
index 594479fe..97faed69 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
@@ -10,12 +10,25 @@ data class Agency(
val memberCount: Int
)
+enum class AgencyType(val text: String) {
+ CLUB(text = "동아리"),
+ COUNCIL(text = "학생회"),
+ GENERAL(text = "기타 모임");
+
+ fun agencyRegisterTypeToString(): String = when (this) {
+ CLUB -> "IN_SCHOOL_CLUB"
+ COUNCIL -> "STUDENT_COUNCIL"
+ GENERAL -> "GENERAL"
+ }
+}
+
fun AgencyGetResponse.toAgency(): Agency {
return Agency(
id = this.id,
type = when (this.type) {
"IN_SCHOOL_CLUB" -> AgencyType.CLUB
"STUDENT_COUNCIL" -> AgencyType.COUNCIL
+ "GENERAL" -> AgencyType.GENERAL
else -> throw IllegalArgumentException("Unknown type: $type")
},
name = this.name,
@@ -29,19 +42,10 @@ fun MyAgencyResponse.toAgency(): Agency {
type = when (this.type) {
"IN_SCHOOL_CLUB" -> AgencyType.CLUB
"STUDENT_COUNCIL" -> AgencyType.COUNCIL
+ "GENERAL" -> AgencyType.GENERAL
else -> throw IllegalArgumentException("Unknown type: $type")
},
name = this.name,
memberCount = this.headCount
)
-}
-
-enum class AgencyType(val text: String) {
- CLUB(text = "동아리"),
- COUNCIL(text = "학생회");
-
- fun agencyRegisterTypeToString(): String = when (this) {
- CLUB -> "IN_SCHOOL_CLUB"
- COUNCIL -> "STUDENT_COUNCIL"
- }
}
\ No newline at end of file
From b300d5fb63f0be411df7608fea563706ad1612af Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Thu, 25 Jul 2024 16:59:28 +0900
Subject: [PATCH 086/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EB=8C=80?=
=?UTF-8?q?=ED=95=99=20=EC=A0=95=EB=B3=B4=20=EC=9C=A0=EB=AC=B4=EB=A5=BC=20?=
=?UTF-8?q?=EC=86=8C=EC=86=8D=20=EC=B0=BE=EA=B8=B0=20->=20=EC=86=8C?=
=?UTF-8?q?=EC=86=8D=20=EB=93=B1=EB=A1=9D=EC=9C=BC=EB=A1=9C=20=EC=A0=84?=
=?UTF-8?q?=EB=8B=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../agency/navigation/AgencyNavigation.kt | 2 +-
.../navigation/AgencyRegisterNavigation.kt | 27 ++++++++++++++++---
.../agency/search/AgencySearchScreen.kt | 8 +++---
.../agency/search/AgencySearchSideEffect.kt | 2 +-
.../agency/search/AgencySearchViewModel.kt | 3 ++-
5 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyNavigation.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyNavigation.kt
index 740c4dc9..b8e29e87 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyNavigation.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyNavigation.kt
@@ -19,7 +19,7 @@ fun NavController.navigateAgency(
fun NavGraphBuilder.agencyScreen(
padding: PaddingValues,
- navigateToRegister: () -> Unit,
+ navigateToRegister: (isUniversityStudent: Boolean) -> Unit,
navigateAgencyJoin: (agencyId: Long) -> Unit
) {
composable(route = agencyRoute) {
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyRegisterNavigation.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyRegisterNavigation.kt
index cbabd184..36edc7b2 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyRegisterNavigation.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/navigation/AgencyRegisterNavigation.kt
@@ -3,23 +3,42 @@ package com.moneymong.moneymong.feature.agency.navigation
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
+import androidx.navigation.NavType
import androidx.navigation.compose.composable
+import androidx.navigation.navArgument
import com.moneymong.moneymong.feature.agency.register.AgencyRegisterScreen
const val agencyRegisterRoute = "agencyRegister_route"
+const val IS_UNIVERSITY_STUDENT = "isUniversityStudent"
+const val agencyRegisterRouteWithArgs = "${agencyRegisterRoute}/{${IS_UNIVERSITY_STUDENT}}"
-fun NavController.navigateAgencyRegister(navOptions: NavOptions? = null) {
- navigate(agencyRegisterRoute, navOptions)
+private val arguments = listOf(
+ navArgument(IS_UNIVERSITY_STUDENT) {
+ type = NavType.BoolType
+ defaultValue = false
+ }
+)
+
+fun NavController.navigateAgencyRegister(
+ isUniversityStudent: Boolean,
+ navOptions: NavOptions? = null
+) {
+ navigate("${agencyRegisterRoute}/${isUniversityStudent}", navOptions)
}
fun NavGraphBuilder.agencyRegisterScreen(
navigateToComplete: () -> Unit,
navigateUp: () -> Unit
) {
- composable(route = agencyRegisterRoute) {
+ composable(
+ route = agencyRegisterRouteWithArgs,
+ arguments = arguments
+ ) { backStackEntry ->
AgencyRegisterScreen(
navigateToComplete = navigateToComplete,
- navigateUp = navigateUp
+ navigateUp = navigateUp,
+ registrableClubOrCouncil = backStackEntry.arguments?.getBoolean(IS_UNIVERSITY_STUDENT)
+ ?: false
)
}
}
\ No newline at end of file
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
index 12c01cc4..3c2f0051 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
@@ -29,13 +29,13 @@ import androidx.paging.compose.itemKey
import com.moneymong.moneymong.common.error.MoneyMongError
import com.moneymong.moneymong.design_system.R
import com.moneymong.moneymong.design_system.component.button.MDSFloatingActionButton
+import com.moneymong.moneymong.design_system.component.indicator.LoadingItem
+import com.moneymong.moneymong.design_system.component.indicator.LoadingScreen
import com.moneymong.moneymong.design_system.component.tooltip.MDSToolTip
import com.moneymong.moneymong.design_system.component.tooltip.MDSToolTipPosition
import com.moneymong.moneymong.design_system.error.ErrorDialog
import com.moneymong.moneymong.design_system.error.ErrorItem
import com.moneymong.moneymong.design_system.error.ErrorScreen
-import com.moneymong.moneymong.design_system.component.indicator.LoadingItem
-import com.moneymong.moneymong.design_system.component.indicator.LoadingScreen
import com.moneymong.moneymong.design_system.theme.Body4
import com.moneymong.moneymong.design_system.theme.Gray01
import com.moneymong.moneymong.design_system.theme.Gray08
@@ -50,7 +50,7 @@ import org.orbitmvi.orbit.compose.collectSideEffect
fun AgencySearchScreen(
modifier: Modifier = Modifier,
viewModel: AgencySearchViewModel = hiltViewModel(),
- navigateToRegister: () -> Unit,
+ navigateToRegister: (isUniversityStudent: Boolean) -> Unit,
navigateAgencyJoin: (agencyId: Long) -> Unit
) {
val state by viewModel.collectAsState()
@@ -59,7 +59,7 @@ fun AgencySearchScreen(
viewModel.collectSideEffect {
when (it) {
is AgencySearchSideEffect.NavigateToRegister -> {
- navigateToRegister()
+ navigateToRegister(it.isUniversityStudent)
}
is AgencySearchSideEffect.NavigateToAgencyJoin -> {
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt
index 678b673d..4934e6e8 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt
@@ -3,6 +3,6 @@ package com.moneymong.moneymong.feature.agency.search
import com.moneymong.moneymong.common.base.SideEffect
sealed interface AgencySearchSideEffect : SideEffect {
- data object NavigateToRegister : AgencySearchSideEffect
+ data class NavigateToRegister(val isUniversityStudent: Boolean) : AgencySearchSideEffect
data class NavigateToAgencyJoin(val agencyId: Long) : AgencySearchSideEffect
}
\ No newline at end of file
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
index 74869816..95a7fa3f 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
@@ -20,7 +20,8 @@ class AgencySearchViewModel @Inject constructor(
) : BaseViewModel(AgencySearchState()) {
fun navigateToRegister() =
- eventEmit(sideEffect = AgencySearchSideEffect.NavigateToRegister)
+ // todo: 서버 쪽에서 '대학 없음' 의 제공 방법이 나오면 교체
+ eventEmit(sideEffect = AgencySearchSideEffect.NavigateToRegister(isUniversityStudent = false))
fun navigateToJoin(agencyId: Long) =
eventEmit(sideEffect = AgencySearchSideEffect.NavigateToAgencyJoin(agencyId))
From 34af18b882c8e7eb1107989d7ba87c9db9131818 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Fri, 26 Jul 2024 20:29:03 +0900
Subject: [PATCH 087/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EB=8C=80?=
=?UTF-8?q?=ED=95=99=20=EC=A0=95=EB=B3=B4=20=EC=9C=A0=EB=AC=B4=EC=97=90=20?=
=?UTF-8?q?=EB=94=B0=EB=A5=B8=20=EB=93=B1=EB=A1=9D=20=EA=B0=80=EB=8A=A5?=
=?UTF-8?q?=ED=95=9C=20=EC=86=8C=EC=86=8D=20=EC=A0=9C=ED=95=9C=20=EA=B8=B0?=
=?UTF-8?q?=EB=8A=A5=20=EC=A0=81=EC=9A=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../agency/register/AgencyRegisterScreen.kt | 15 +++++++++++++--
.../register/view/AgencyRegisterContentView.kt | 16 +++++++++++-----
.../moneymong/feature/agency/search/Agency.kt | 2 +-
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/AgencyRegisterScreen.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/AgencyRegisterScreen.kt
index 10c98b41..8e4a3fda 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/AgencyRegisterScreen.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/AgencyRegisterScreen.kt
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.Icon
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -34,6 +35,7 @@ import com.moneymong.moneymong.design_system.theme.Gray07
import com.moneymong.moneymong.design_system.theme.MMHorizontalSpacing
import com.moneymong.moneymong.design_system.theme.White
import com.moneymong.moneymong.feature.agency.register.view.AgencyResisterContentView
+import com.moneymong.moneymong.feature.agency.search.AgencyType
import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect
@@ -42,7 +44,8 @@ fun AgencyRegisterScreen(
modifier: Modifier = Modifier,
viewModel: AgencyRegisterViewModel = hiltViewModel(),
navigateToComplete: () -> Unit,
- navigateUp: () -> Unit
+ navigateUp: () -> Unit,
+ registrableClubOrCouncil: Boolean
) {
val state by viewModel.collectAsState()
val focusManager = LocalFocusManager.current
@@ -60,6 +63,12 @@ fun AgencyRegisterScreen(
}
}
+ LaunchedEffect(key1 = registrableClubOrCouncil) {
+ if (registrableClubOrCouncil.not()) {
+ viewModel.changeAgencyType(AgencyType.GENERAL)
+ }
+ }
+
if (state.visibleOutDialog) {
MDSModal(
icon = R.drawable.ic_warning_filled,
@@ -117,6 +126,7 @@ fun AgencyRegisterScreen(
agencyName = state.agencyName,
onAgencyNameChange = viewModel::changeAgencyName,
changeNameTextFieldIsError = viewModel::changeNameTextFieldIsError,
+ registrableClubOrCouncil = registrableClubOrCouncil
)
val canRegister = state.agencyName.text.isNotEmpty() && state.nameTextFieldIsError.not()
@@ -137,6 +147,7 @@ fun AgencyRegisterScreen(
fun AgencyRegisterScreenPreview() {
AgencyRegisterScreen(
navigateToComplete = {},
- navigateUp = {}
+ navigateUp = {},
+ registrableClubOrCouncil = false
)
}
\ No newline at end of file
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
index 749c5166..ef9dce22 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/register/view/AgencyRegisterContentView.kt
@@ -38,14 +38,16 @@ internal fun AgencyResisterContentView(
onAgencyTypeChange: (AgencyType) -> Unit,
agencyName: TextFieldValue,
onAgencyNameChange: (TextFieldValue) -> Unit,
- changeNameTextFieldIsError: (Boolean) -> Unit
+ changeNameTextFieldIsError: (Boolean) -> Unit,
+ registrableClubOrCouncil: Boolean
) {
Column(modifier = modifier) {
TitleView()
Spacer(modifier = Modifier.height(44.dp))
SelectTypeView(
agencyType = agencyType,
- onAgencyTypeChange = onAgencyTypeChange
+ onAgencyTypeChange = onAgencyTypeChange,
+ registrableClubOrCouncil = registrableClubOrCouncil
)
Spacer(modifier = Modifier.height(24.dp))
InputNameView(
@@ -70,7 +72,8 @@ private fun TitleView() {
@Composable
private fun SelectTypeView(
agencyType: AgencyType?,
- onAgencyTypeChange: (AgencyType) -> Unit
+ onAgencyTypeChange: (AgencyType) -> Unit,
+ registrableClubOrCouncil: Boolean
) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Text(
@@ -85,19 +88,21 @@ private fun SelectTypeView(
MDSSelection(
modifier = Modifier.weight(1f),
text = AgencyType.CLUB.text,
+ enabled = registrableClubOrCouncil,
isSelected = agencyType == AgencyType.CLUB,
onClick = { onAgencyTypeChange(AgencyType.CLUB) }
)
MDSSelection(
modifier = Modifier.weight(1f),
text = AgencyType.COUNCIL.text,
+ enabled = registrableClubOrCouncil,
isSelected = agencyType == AgencyType.COUNCIL,
onClick = { onAgencyTypeChange(AgencyType.COUNCIL) }
)
MDSSelection(
modifier = Modifier.weight(1f),
text = AgencyType.GENERAL.text,
- isSelected = agencyType == AgencyType.GENERAL,
+ isSelected = agencyType == AgencyType.GENERAL || registrableClubOrCouncil.not(),
onClick = { onAgencyTypeChange(AgencyType.GENERAL) }
)
}
@@ -162,6 +167,7 @@ private fun AgencyResisterContentViewPreview() {
onAgencyTypeChange = {},
agencyName = TextFieldValue("동아리"),
onAgencyNameChange = {},
- changeNameTextFieldIsError = {}
+ changeNameTextFieldIsError = {},
+ registrableClubOrCouncil = true
)
}
\ No newline at end of file
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
index 97faed69..eed95827 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
@@ -18,7 +18,7 @@ enum class AgencyType(val text: String) {
fun agencyRegisterTypeToString(): String = when (this) {
CLUB -> "IN_SCHOOL_CLUB"
COUNCIL -> "STUDENT_COUNCIL"
- GENERAL -> "GENERAL"
+ GENERAL -> "GENERAL" // todo: 서버 쪽에서 '대학 없음' 을 받는 방법이 나오면 교체
}
}
From 09c4668327cb49176108f8112750170ef3500169 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Mon, 29 Jul 2024 22:05:48 +0900
Subject: [PATCH 088/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EB=82=B4=20?=
=?UTF-8?q?=EB=8C=80=ED=95=99=20=EC=A0=95=EB=B3=B4=20=EA=B0=80=EC=A0=B8?=
=?UTF-8?q?=EC=98=A4=EA=B8=B0=20api=20=ED=86=B5=EC=8B=A0=20=EA=B5=AC?=
=?UTF-8?q?=ED=98=84=20=EB=B0=8F=20University=20=EA=B4=80=EB=A0=A8=20UseCa?=
=?UTF-8?q?se=20=EB=B6=84=EB=A6=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/network/api/UniversityApi.kt | 4 +++
.../datasource/signup/UnivRemoteDataSource.kt | 7 +++--
.../signup/UnivRemoteDataSourceImpl.kt | 10 +++++--
.../repository/signup/UnivRepositoryImpl.kt | 5 ++++
.../domain/repository/UnivRepository.kt | 7 +++--
.../university/CreateUniveristyUseCase.kt | 13 ++++++++++
.../university/FetchMyUniversityUseCase.kt | 13 ++++++++++
.../SearchUniversityUseCase.kt} | 11 +++-----
.../feature/sign/viewmodel/SignUpViewModel.kt | 26 ++++++++++---------
9 files changed, 70 insertions(+), 26 deletions(-)
create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/CreateUniveristyUseCase.kt
create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/FetchMyUniversityUseCase.kt
rename domain/src/main/java/com/moneymong/moneymong/domain/usecase/{signup/UnivUseCase.kt => university/SearchUniversityUseCase.kt} (50%)
diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/UniversityApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/UniversityApi.kt
index bc68e2ce..9dcb60b7 100644
--- a/core/network/src/main/java/com/moneymong/moneymong/network/api/UniversityApi.kt
+++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/UniversityApi.kt
@@ -1,6 +1,7 @@
package com.moneymong.moneymong.network.api
import com.moneymong.moneymong.model.sign.UnivRequest
+import com.moneymong.moneymong.model.sign.UnivResponse
import com.moneymong.moneymong.model.sign.UniversitiesResponse
import retrofit2.http.Body
import retrofit2.http.GET
@@ -18,4 +19,7 @@ interface UniversityApi {
suspend fun searchUniv(
@Query("keyword") searchQuery: String
): Result
+
+ @GET("api/v1/user-university")
+ suspend fun getMyUniv(): Result
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSource.kt
index 3d59f394..915bce95 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSource.kt
@@ -2,10 +2,13 @@ package com.moneymong.moneymong.data.datasource.signup
import com.moneymong.moneymong.model.sign.SearchQueryRequest
import com.moneymong.moneymong.model.sign.UnivRequest
+import com.moneymong.moneymong.model.sign.UnivResponse
import com.moneymong.moneymong.model.sign.UniversitiesResponse
interface UnivRemoteDataSource {
- suspend fun createUniv(body: UnivRequest) : Result
+ suspend fun createUniv(body: UnivRequest): Result
- suspend fun searchUniv(searchQuery : SearchQueryRequest) : Result
+ suspend fun searchUniv(searchQuery: SearchQueryRequest): Result
+
+ suspend fun getMyUniv(): Result
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSourceImpl.kt
index 534d35b7..fce6e293 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/signup/UnivRemoteDataSourceImpl.kt
@@ -1,12 +1,14 @@
package com.moneymong.moneymong.data.datasource.signup
-import com.moneymong.moneymong.network.api.UniversityApi
import com.moneymong.moneymong.model.sign.SearchQueryRequest
import com.moneymong.moneymong.model.sign.UnivRequest
+import com.moneymong.moneymong.model.sign.UnivResponse
import com.moneymong.moneymong.model.sign.UniversitiesResponse
+import com.moneymong.moneymong.network.api.UniversityApi
import javax.inject.Inject
-class UnivRemoteDataSourceImpl @Inject constructor(private val universityApi: UniversityApi) : UnivRemoteDataSource {
+class UnivRemoteDataSourceImpl @Inject constructor(private val universityApi: UniversityApi) :
+ UnivRemoteDataSource {
override suspend fun createUniv(body: UnivRequest): Result {
return universityApi.createUniv(body = body)
}
@@ -14,4 +16,8 @@ class UnivRemoteDataSourceImpl @Inject constructor(private val universityApi: Un
override suspend fun searchUniv(searchQuery: SearchQueryRequest): Result {
return universityApi.searchUniv(searchQuery.searchQuery)
}
+
+ override suspend fun getMyUniv(): Result {
+ return universityApi.getMyUniv()
+ }
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/signup/UnivRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/signup/UnivRepositoryImpl.kt
index 202c42f8..7c5fb33d 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/signup/UnivRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/signup/UnivRepositoryImpl.kt
@@ -4,6 +4,7 @@ import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSource
import com.moneymong.moneymong.domain.repository.UnivRepository
import com.moneymong.moneymong.model.sign.SearchQueryRequest
import com.moneymong.moneymong.model.sign.UnivRequest
+import com.moneymong.moneymong.model.sign.UnivResponse
import com.moneymong.moneymong.model.sign.UniversitiesResponse
import javax.inject.Inject
@@ -17,4 +18,8 @@ class UnivRepositoryImpl @Inject constructor(
override suspend fun searchUniv(searchQuery: SearchQueryRequest): Result {
return univRemoteDataSource.searchUniv(searchQuery)
}
+
+ override suspend fun getMyUniv(): Result {
+ return univRemoteDataSource.getMyUniv()
+ }
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt
index 62559313..fadba50c 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt
@@ -2,10 +2,13 @@ package com.moneymong.moneymong.domain.repository
import com.moneymong.moneymong.model.sign.SearchQueryRequest
import com.moneymong.moneymong.model.sign.UnivRequest
+import com.moneymong.moneymong.model.sign.UnivResponse
import com.moneymong.moneymong.model.sign.UniversitiesResponse
interface UnivRepository {
- suspend fun createUniv(body: UnivRequest) : Result
+ suspend fun createUniv(body: UnivRequest): Result
- suspend fun searchUniv(searchQuery: SearchQueryRequest) : Result
+ suspend fun searchUniv(searchQuery: SearchQueryRequest): Result
+
+ suspend fun getMyUniv(): Result
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/CreateUniveristyUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/CreateUniveristyUseCase.kt
new file mode 100644
index 00000000..6e474301
--- /dev/null
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/CreateUniveristyUseCase.kt
@@ -0,0 +1,13 @@
+package com.moneymong.moneymong.domain.usecase.university
+
+import com.moneymong.moneymong.domain.repository.UnivRepository
+import com.moneymong.moneymong.model.sign.UnivRequest
+import javax.inject.Inject
+
+class CreateUniversityUseCase @Inject constructor(
+ private val univRepository: UnivRepository
+) {
+ suspend operator fun invoke(body: UnivRequest): Result {
+ return univRepository.createUniv(body)
+ }
+}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/FetchMyUniversityUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/FetchMyUniversityUseCase.kt
new file mode 100644
index 00000000..e4145337
--- /dev/null
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/FetchMyUniversityUseCase.kt
@@ -0,0 +1,13 @@
+package com.moneymong.moneymong.domain.usecase.university
+
+import com.moneymong.moneymong.domain.repository.UnivRepository
+import com.moneymong.moneymong.model.sign.UnivResponse
+import javax.inject.Inject
+
+class FetchMyUniversityUseCase @Inject constructor(
+ private val univRepository: UnivRepository
+) {
+ suspend operator fun invoke(): Result {
+ return univRepository.getMyUniv()
+ }
+}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/UnivUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt
similarity index 50%
rename from domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/UnivUseCase.kt
rename to domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt
index bc5143fc..2247bc43 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/UnivUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt
@@ -1,19 +1,14 @@
-package com.moneymong.moneymong.domain.usecase.signup
+package com.moneymong.moneymong.domain.usecase.university
import com.moneymong.moneymong.domain.repository.UnivRepository
import com.moneymong.moneymong.model.sign.SearchQueryRequest
-import com.moneymong.moneymong.model.sign.UnivRequest
import com.moneymong.moneymong.model.sign.UniversitiesResponse
import javax.inject.Inject
-class UnivUseCase @Inject constructor(
+class SearchUniversityUseCase @Inject constructor(
private val univRepository: UnivRepository
) {
- suspend fun createUniv(body : UnivRequest) : Result{
- return univRepository.createUniv(body)
- }
-
- suspend fun searchUniv(searchQuery : String) : Result {
+ suspend operator fun invoke(searchQuery: String): Result {
return univRepository.searchUniv(SearchQueryRequest(searchQuery))
}
}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
index 5ccca470..50b26444 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
@@ -3,7 +3,8 @@ package com.moneymong.moneymong.feature.sign.viewmodel
import androidx.compose.ui.text.input.TextFieldValue
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.domain.usecase.signup.SchoolInfoUseCase
-import com.moneymong.moneymong.domain.usecase.signup.UnivUseCase
+import com.moneymong.moneymong.domain.usecase.university.CreateUniversityUseCase
+import com.moneymong.moneymong.domain.usecase.university.SearchUniversityUseCase
import com.moneymong.moneymong.feature.sign.sideeffect.SignUpSideEffect
import com.moneymong.moneymong.feature.sign.state.SignUpState
import com.moneymong.moneymong.feature.sign.util.Grade
@@ -20,12 +21,13 @@ import javax.inject.Inject
@HiltViewModel
class SignUpViewModel @Inject constructor(
- private val univUseCase: UnivUseCase,
- private val schoolInfoUseCase : SchoolInfoUseCase,
+ private val createUniversityUseCase: CreateUniversityUseCase,
+ private val searchUniversityUseCase: SearchUniversityUseCase,
+ private val schoolInfoUseCase: SchoolInfoUseCase,
) : BaseViewModel(SignUpState()) {
fun createUniv(universityName: String, grade: Int) = intent {
val body = UnivRequest(universityName, grade)
- univUseCase.createUniv(body)
+ createUniversityUseCase(body)
.onSuccess {
reduce {
state.copy(
@@ -44,7 +46,7 @@ class SignUpViewModel @Inject constructor(
}
fun searchUniv(searchQuery: String) = intent {
- univUseCase.searchUniv(searchQuery)
+ searchUniversityUseCase(searchQuery)
.onSuccess {
reduce {
state.copy(
@@ -61,7 +63,7 @@ class SignUpViewModel @Inject constructor(
}
}
- fun storeSchoolInfoExist(infoExist : Boolean ){
+ fun storeSchoolInfoExist(infoExist: Boolean) {
CoroutineScope(Dispatchers.IO).launch {
schoolInfoUseCase.invoke(infoExist)
}
@@ -149,16 +151,16 @@ class SignUpViewModel @Inject constructor(
}
}
- fun visiblePopUpErrorChanged(visiblePopUpError : Boolean) = intent{
- reduce{
+ fun visiblePopUpErrorChanged(visiblePopUpError: Boolean) = intent {
+ reduce {
state.copy(
visiblePopUpError = visiblePopUpError,
)
}
}
- fun visibleErrorChanged(visibleError : Boolean) = intent{
- reduce{
+ fun visibleErrorChanged(visibleError: Boolean) = intent {
+ reduce {
state.copy(
visibleError = visibleError,
)
@@ -166,8 +168,8 @@ class SignUpViewModel @Inject constructor(
}
- fun isButtonVisibleChanged(isButtonVisible : Boolean) = intent{
- reduce{
+ fun isButtonVisibleChanged(isButtonVisible: Boolean) = intent {
+ reduce {
state.copy(
isButtonVisible = isButtonVisible
)
From 2b2987317b5c08b2dc9cb35d28ea7961733c59d5 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Mon, 29 Jul 2024 22:09:27 +0900
Subject: [PATCH 089/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EC=86=8C?=
=?UTF-8?q?=EC=86=8D=20=EA=B2=80=EC=83=89=20=ED=99=94=EB=A9=B4=EC=97=90?=
=?UTF-8?q?=EC=84=9C=20=EB=8C=80=ED=95=99=20=EC=A0=95=EB=B3=B4=20=EC=9C=A0?=
=?UTF-8?q?=EB=AC=B4=20=ED=8C=90=EB=8B=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../agency/search/AgencySearchScreen.kt | 6 +--
.../agency/search/AgencySearchState.kt | 1 +
.../agency/search/AgencySearchViewModel.kt | 46 +++++++++++++------
3 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
index 3c2f0051..8796ae61 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt
@@ -102,7 +102,7 @@ fun AgencySearchScreen(
isLoading = state.isLoading,
isError = state.isError,
errorMessage = state.errorMessage,
- fetchMyAgencyList = viewModel::fetchMyAgencyList
+ onRetry = viewModel::getInitialData,
)
}
Column(
@@ -135,7 +135,7 @@ private fun AgencySearchContentView(
isLoading: Boolean,
isError: Boolean,
errorMessage: String,
- fetchMyAgencyList: () -> Unit
+ onRetry: () -> Unit,
) {
val contentLoading = pagingItems.loadState.refresh is LoadState.Loading || isLoading
val contentError = pagingItems.loadState.refresh is LoadState.Error || isError
@@ -152,7 +152,7 @@ private fun AgencySearchContentView(
message = contentErrorMessage,
onRetry = {
pagingItems.retry()
- fetchMyAgencyList()
+ onRetry()
},
)
} else {
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchState.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchState.kt
index 8ee355c3..2feee998 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchState.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchState.kt
@@ -8,6 +8,7 @@ data class AgencySearchState(
val isError: Boolean = false,
val errorMessage: String = "",
val visibleWarningDialog: Boolean = false,
+ val isUniversityStudent: Boolean = false
) : State {
val joinedAgenciesIds: List
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
index 95a7fa3f..9d5a7cec 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
@@ -7,21 +7,26 @@ import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.common.error.MoneyMongError
import com.moneymong.moneymong.domain.usecase.agency.FetchMyAgencyListUseCase
import com.moneymong.moneymong.domain.usecase.agency.GetAgenciesUseCase
+import com.moneymong.moneymong.domain.usecase.university.FetchMyUniversityUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.async
+import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.map
import org.orbitmvi.orbit.syntax.simple.intent
+import org.orbitmvi.orbit.syntax.simple.postSideEffect
import org.orbitmvi.orbit.syntax.simple.reduce
import javax.inject.Inject
@HiltViewModel
class AgencySearchViewModel @Inject constructor(
getAgenciesUseCase: GetAgenciesUseCase,
- private val fetchMyAgencyListUseCase: FetchMyAgencyListUseCase
+ private val fetchMyAgencyListUseCase: FetchMyAgencyListUseCase,
+ private val fetchMyUniversityUseCase: FetchMyUniversityUseCase
) : BaseViewModel(AgencySearchState()) {
- fun navigateToRegister() =
- // todo: 서버 쪽에서 '대학 없음' 의 제공 방법이 나오면 교체
- eventEmit(sideEffect = AgencySearchSideEffect.NavigateToRegister(isUniversityStudent = false))
+ fun navigateToRegister() = intent {
+ postSideEffect(AgencySearchSideEffect.NavigateToRegister(isUniversityStudent = state.isUniversityStudent))
+ }
fun navigateToJoin(agencyId: Long) =
eventEmit(sideEffect = AgencySearchSideEffect.NavigateToAgencyJoin(agencyId))
@@ -33,37 +38,50 @@ class AgencySearchViewModel @Inject constructor(
}.cachedIn(viewModelScope)
init {
- fetchMyAgencyList()
+ getInitialData()
}
- fun fetchMyAgencyList() = intent {
+ fun getInitialData() = intent {
reduce {
state.copy(
isLoading = true,
isError = false
)
}
- fetchMyAgencyListUseCase()
- .also {
- reduce { state.copy(isLoading = false) }
+ coroutineScope {
+ val fetchMyAgenciesDeferred = async {
+ fetchMyAgencyListUseCase()
+ }
+ val fetchMyUniversityDeferred = async {
+ fetchMyUniversityUseCase()
}
- .onSuccess {
+
+ val fetchMyUniversityResult = fetchMyUniversityDeferred.await()
+ val fetchMyAgenciesResult = fetchMyAgenciesDeferred.await()
+
+ if (fetchMyAgenciesResult.isSuccess && fetchMyUniversityResult.isSuccess) {
reduce {
state.copy(
- joinedAgencies = it.map { myAgencyResponse -> myAgencyResponse.toAgency() }
+ isLoading = false,
+ joinedAgencies = fetchMyAgenciesResult.getOrThrow()
+ .map { myAgencyResponse -> myAgencyResponse.toAgency() },
+ isUniversityStudent = fetchMyUniversityResult.getOrThrow().universityName == "대학 없음",
)
}
- }.onFailure {
+ } else {
reduce {
state.copy(
+ isLoading = false,
isError = true,
- errorMessage = it.message ?: MoneyMongError.UnExpectedError.message,
+ errorMessage = fetchMyAgenciesResult.exceptionOrNull()?.message
+ ?: fetchMyUniversityResult.exceptionOrNull()?.message
+ ?: MoneyMongError.UnExpectedError.message
)
}
}
+ }
}
-
fun changeVisibleWarningDialog(visible: Boolean) = intent {
reduce {
state.copy(visibleWarningDialog = visible)
From b29932f40de5ac14f3e9aa37e8a5de619f55b0ab Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 31 Jul 2024 16:08:30 +0900
Subject: [PATCH 090/157] =?UTF-8?q?MONEYMONG-494=20fix:=20=EC=86=8C?=
=?UTF-8?q?=EC=86=8D=20=EA=B2=80=EC=83=89=20=ED=99=94=EB=A9=B4,=20?=
=?UTF-8?q?=EB=8C=80=ED=95=99=20=EC=A0=95=EB=B3=B4=20=EC=9C=A0=EB=AC=B4=20?=
=?UTF-8?q?=ED=8C=90=EB=8B=A8=20=EA=B8=B0=EC=A4=80=20null=20=EB=A1=9C=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
---
.../com/moneymong/moneymong/model/sign/UnivResponse.kt | 2 +-
.../moneymong/moneymong/network/di/NetworkModule.kt | 10 +++++-----
.../feature/agency/search/AgencySearchViewModel.kt | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivResponse.kt
index 46dbf79f..6a098bd1 100644
--- a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivResponse.kt
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivResponse.kt
@@ -1,6 +1,6 @@
package com.moneymong.moneymong.model.sign
data class UnivResponse(
- val universityName: String,
+ val universityName: String?,
val grade: Int
)
\ No newline at end of file
diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/di/NetworkModule.kt b/core/network/src/main/java/com/moneymong/moneymong/network/di/NetworkModule.kt
index c56ba0f8..683c179a 100644
--- a/core/network/src/main/java/com/moneymong/moneymong/network/di/NetworkModule.kt
+++ b/core/network/src/main/java/com/moneymong/moneymong/network/di/NetworkModule.kt
@@ -9,15 +9,15 @@ import com.google.gson.GsonBuilder
import com.moneymong.moneymong.network.BuildConfig
import com.moneymong.moneymong.network.adapter.ResultCallAdapterFactory
import com.moneymong.moneymong.network.api.AccessTokenApi
-import com.moneymong.moneymong.network.api.UniversityApi
-import com.moneymong.moneymong.network.util.AuthInterceptor
-import com.moneymong.moneymong.network.api.MoneyMongApi
import com.moneymong.moneymong.network.api.AgencyApi
import com.moneymong.moneymong.network.api.ClovaApi
import com.moneymong.moneymong.network.api.LedgerApi
import com.moneymong.moneymong.network.api.LedgerDetailApi
import com.moneymong.moneymong.network.api.MemberApi
+import com.moneymong.moneymong.network.api.MoneyMongApi
+import com.moneymong.moneymong.network.api.UniversityApi
import com.moneymong.moneymong.network.api.UserApi
+import com.moneymong.moneymong.network.util.AuthInterceptor
import com.moneymong.moneymong.network.util.MoneyMongTokenAuthenticator
import dagger.Module
import dagger.Provides
@@ -97,7 +97,7 @@ object NetworkModule {
addConverterFactory(GsonConverterFactory.create(gson))
addCallAdapterFactory(ResultCallAdapterFactory.create())
}.build()
-
+
@Provides
@Singleton
@ClovaRetrofit
@@ -112,7 +112,7 @@ object NetworkModule {
@Provides
fun provideMoneyMongApi(@MoneyMongRetrofit retrofit: Retrofit): MoneyMongApi =
retrofit.create(MoneyMongApi::class.java)
-
+
@Provides
fun provideUnivApi(@MoneyMongRetrofit retrofit: Retrofit): UniversityApi =
retrofit.create(UniversityApi::class.java)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
index 9d5a7cec..c27bcd1e 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt
@@ -65,7 +65,7 @@ class AgencySearchViewModel @Inject constructor(
isLoading = false,
joinedAgencies = fetchMyAgenciesResult.getOrThrow()
.map { myAgencyResponse -> myAgencyResponse.toAgency() },
- isUniversityStudent = fetchMyUniversityResult.getOrThrow().universityName == "대학 없음",
+ isUniversityStudent = fetchMyUniversityResult.getOrThrow().universityName != null,
)
}
} else {
From 3fb5f9d71b1eb4270783f717f362a8683d9b2338 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 31 Jul 2024 17:15:29 +0900
Subject: [PATCH 091/157] =?UTF-8?q?MONEYMONG-494=20feat:=20=EB=B6=88?=
=?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20todo=20=EC=A0=9C=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/moneymong/moneymong/feature/agency/search/Agency.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
index eed95827..97faed69 100644
--- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
+++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt
@@ -18,7 +18,7 @@ enum class AgencyType(val text: String) {
fun agencyRegisterTypeToString(): String = when (this) {
CLUB -> "IN_SCHOOL_CLUB"
COUNCIL -> "STUDENT_COUNCIL"
- GENERAL -> "GENERAL" // todo: 서버 쪽에서 '대학 없음' 을 받는 방법이 나오면 교체
+ GENERAL -> "GENERAL"
}
}
From 6b3ea3ffe756b9b77ccce9f18d9001b45025fbaa Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 31 Jul 2024 16:28:36 +0900
Subject: [PATCH 092/157] =?UTF-8?q?MONEYMONG-495=20feat:=20=EB=A7=88?=
=?UTF-8?q?=EC=9D=B4=EB=AA=BD=20=ED=95=99=EA=B5=90=20=EC=A0=95=EB=B3=B4?=
=?UTF-8?q?=EA=B0=80=20=EC=97=86=EC=9D=84=20=EC=8B=9C,=20=EC=A0=95?=
=?UTF-8?q?=EB=B3=B4=20=EC=97=86=EC=9D=8C=20=ED=91=9C=EC=8B=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../feature/mymong/main/view/MyMongInfoView.kt | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
index 11479c5f..2fd0696a 100644
--- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
+++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
@@ -21,8 +21,8 @@ import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.R
-import com.moneymong.moneymong.design_system.error.ErrorItem
import com.moneymong.moneymong.design_system.component.indicator.LoadingItem
+import com.moneymong.moneymong.design_system.error.ErrorItem
import com.moneymong.moneymong.design_system.theme.Blue04
import com.moneymong.moneymong.design_system.theme.Body2
import com.moneymong.moneymong.design_system.theme.Body3
@@ -126,6 +126,12 @@ fun UniversityInfo(
university: String,
grade: Int
) {
+ val universityInfoText = when {
+ university.isEmpty() -> "정보 없음"
+ grade == 5 -> "$university ${grade}학년 이상"
+ else -> "$university ${grade}학년"
+ }
+
Box(
modifier = Modifier
.fillMaxWidth()
@@ -148,7 +154,7 @@ fun UniversityInfo(
)
Spacer(modifier = Modifier.width(8.dp))
Text(
- text = "$university $grade" + if (grade == 5) "학년 이상" else "학년",
+ text = universityInfoText,
color = Gray08,
style = Body4
)
From a2d1a457a4c43e9d9e4786b86f42177fd565a0ec Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 31 Jul 2024 16:41:48 +0900
Subject: [PATCH 093/157] =?UTF-8?q?MONEYMONG-495=20feat:=20=EB=A7=88?=
=?UTF-8?q?=EC=9D=B4=EB=AA=BD=20=ED=95=99=EA=B5=90=20=EC=A0=95=EB=B3=B4=20?=
=?UTF-8?q?=EC=A4=91=EC=95=99=20=EC=A0=95=EB=A0=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/feature/mymong/main/view/MyMongInfoView.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
index 2fd0696a..44312bf5 100644
--- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
+++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
@@ -146,7 +146,9 @@ fun UniversityInfo(
style = Body3
)
Spacer(modifier = Modifier.height(6.dp))
- Row {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
Image(
modifier = Modifier.size(24.dp),
painter = painterResource(id = R.drawable.img_university),
From 6cf8100b844dbef7f5c8de860c87a30b8072159c Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 31 Jul 2024 17:03:41 +0900
Subject: [PATCH 094/157] =?UTF-8?q?MONEYMONG-495=20feat:=20=EB=A7=88?=
=?UTF-8?q?=EC=9D=B4=EB=AA=BD=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EA=B0=80?=
=?UTF-8?q?=EB=8A=A5=EC=84=B1=20=EB=B6=80=EC=97=AC=20=EB=B0=8F=20=EC=9D=B4?=
=?UTF-8?q?=EB=A6=84=EC=97=90=20"=EB=8B=98"=20suffix=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/moneymong/feature/mymong/main/MyMongScreen.kt | 3 +++
.../moneymong/feature/mymong/main/view/MyMongInfoView.kt | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt
index bf60302a..c4bb3f91 100644
--- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt
+++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt
@@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
@@ -77,6 +79,7 @@ fun MyMongScreen(
modifier = modifier
.fillMaxSize()
.background(color = Gray01)
+ .verticalScroll(state = rememberScrollState())
.padding(horizontal = MMHorizontalSpacing),
) {
MyMongTopBar(modifier = Modifier.align(Alignment.CenterHorizontally))
diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
index 44312bf5..e0e4e7c2 100644
--- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
+++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongInfoView.kt
@@ -97,7 +97,7 @@ private fun Profile(
Spacer(modifier = Modifier.width(16.dp))
Column {
Text(
- text = name,
+ text = name + "님",
color = Gray10,
style = Heading1
)
From b36a9ef5aaf2251d66786a5c7925d89e2fd082ba Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 10 Jul 2024 11:27:55 +0900
Subject: [PATCH 095/157] =?UTF-8?q?moneymong-323=20feat:=20data=20layer=20?=
=?UTF-8?q?=EC=97=90=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20=EB=A1=9C=EA=B7=B8?=
=?UTF-8?q?=EC=9D=B8=20=EA=B4=80=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20=EC=A0=9C?=
=?UTF-8?q?=EA=B1=B0=20=EB=B0=8F=20PostAccessTokenUseCase=20=EC=83=9D?=
=?UTF-8?q?=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/model/sign/LoginType.kt | 5 ++
.../moneymong/network/api/AccessTokenApi.kt | 10 +--
.../datasource/login/LoginRemoteDataSource.kt | 7 +-
.../login/LoginRemoteDataSourceImpl.kt | 84 +++----------------
.../repository/login/LoginRepositoryImpl.kt | 15 +---
.../moneymong/data/util/LoginType.kt | 5 --
.../domain/repository/LoginRepository.kt | 4 +-
.../domain/usecase/login/LoginUseCase.kt | 15 ----
.../usecase/login/PostAccessTokenUseCase.kt | 13 +++
.../domain/usecase/login/TokenUseCase.kt | 1 -
10 files changed, 43 insertions(+), 116 deletions(-)
create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/sign/LoginType.kt
delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/util/LoginType.kt
delete mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/LoginUseCase.kt
create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/LoginType.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/LoginType.kt
new file mode 100644
index 00000000..4d046902
--- /dev/null
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/LoginType.kt
@@ -0,0 +1,5 @@
+package com.moneymong.moneymong.model.sign
+
+enum class LoginType {
+ KAKAO
+}
\ No newline at end of file
diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/AccessTokenApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/AccessTokenApi.kt
index a625211b..845a39ae 100644
--- a/core/network/src/main/java/com/moneymong/moneymong/network/api/AccessTokenApi.kt
+++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/AccessTokenApi.kt
@@ -1,8 +1,8 @@
package com.moneymong.moneymong.network.api
import com.moneymong.moneymong.model.sign.RefreshTokenRequest
-import com.moneymong.moneymong.model.sign.TokenRequest
import com.moneymong.moneymong.model.sign.RefreshTokenResponse
+import com.moneymong.moneymong.model.sign.TokenRequest
import com.moneymong.moneymong.model.sign.TokenResponse
import retrofit2.http.Body
import retrofit2.http.DELETE
@@ -10,14 +10,14 @@ import retrofit2.http.POST
interface AccessTokenApi {
@POST("api/v1/users")
- suspend fun accessTokenApi(
- @Body body : TokenRequest
+ suspend fun postAccessToken(
+ @Body body: TokenRequest
): Result
@POST("api/v1/tokens")
suspend fun refreshTokenApi(
- @Body body : RefreshTokenRequest
- ) : Result
+ @Body body: RefreshTokenRequest
+ ): Result
@DELETE("api/v1/tokens")
suspend fun deleteRefreshToken(
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
index 592da4e6..eaa0af16 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
@@ -1,9 +1,8 @@
package com.moneymong.moneymong.data.datasource.login
-import com.moneymong.moneymong.domain.util.LoginCallback
+import com.moneymong.moneymong.model.sign.LoginType
interface LoginRemoteDataSource {
- suspend fun loginWithKakaoTalk(callback: LoginCallback)
- suspend fun loginWithKakaoAccount(callback: LoginCallback)
-}
\ No newline at end of file
+ suspend fun postAccessToken(type: LoginType, accessToken: String): Result
+}
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
index 3ecd5b9a..d9ef2bbd 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
@@ -1,89 +1,24 @@
package com.moneymong.moneymong.data.datasource.login
-import android.content.Context
import android.util.Log
-import com.kakao.sdk.common.model.ClientError
-import com.kakao.sdk.common.model.ClientErrorCause
-import com.kakao.sdk.user.UserApiClient
import com.moneymong.moneymong.data.datasource.user.UserLocalDataSource
-import com.moneymong.moneymong.data.util.LoginType
-import com.moneymong.moneymong.domain.util.LoginCallback
+import com.moneymong.moneymong.model.sign.LoginType
+import com.moneymong.moneymong.model.sign.TokenRequest
import com.moneymong.moneymong.network.api.AccessTokenApi
import com.moneymong.moneymong.network.api.UserApi
-import com.moneymong.moneymong.model.sign.TokenRequest
-import dagger.hilt.android.qualifiers.ApplicationContext
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
import javax.inject.Inject
class LoginRemoteDataSourceImpl @Inject constructor(
- @ApplicationContext private val context: Context,
private val accessTokenApi: AccessTokenApi,
private val userApi: UserApi,
private val loginLocalDataSourceImpl: LoginLocalDataSourceImpl,
private val userLocalDataSource: UserLocalDataSource,
) : LoginRemoteDataSource {
- override suspend fun loginWithKakaoTalk(callback: LoginCallback) {
- UserApiClient.instance.loginWithKakaoTalk(context) { token, error ->
- if (error != null) {
- Log.d("this", "카카오톡으로 로그인 실패 : $error")
- CoroutineScope(Dispatchers.IO).launch {
- callback.onLoginFailure(exception = Exception())
- }
-
- // 사용자가 카카오톡 설치 후 디바이스 권한 요청 화면에서 로그인을 취소한 경우,
- // 의도적인 로그인 취소로 보고 카카오계정으로 로그인 시도 없이 로그인 취소로 처리 (예: 뒤로 가기)
- if (error is ClientError && error.reason == ClientErrorCause.Cancelled) {
- return@loginWithKakaoTalk
- }
-
- // 카카오톡에 연결된 카카오계정이 없는 경우, 카카오계정으로 로그인 시도
- CoroutineScope(Dispatchers.IO).launch {
- loginWithKakaoAccount(callback)
- }
- } else if (token != null) {
- CoroutineScope(Dispatchers.IO).launch {
- sendToken(LoginType.KAKAO.type, token.accessToken)
- callback.onLoginSuccess()
- }
- Log.d("this", "카카오톡으로 로그인 성공 ${token.accessToken}")
- }
- }
- }
-
-
- override suspend fun loginWithKakaoAccount(callback: LoginCallback) {
- UserApiClient.instance.loginWithKakaoAccount(context) { token, error ->
- if (error != null) {
- Log.d("this", "카카오계정으로 로그인 실패 : $error")
- CoroutineScope(Dispatchers.IO).launch {
- callback.onLoginFailure(Exception(error))
- }
- } else if (token != null) {
- Log.d("this", "카카오계정으로 로그인 성공, accessToken: ${token.accessToken}")
- UserApiClient.instance.me { user, error ->
- if (error == null) {
- CoroutineScope(Dispatchers.IO).launch {
- sendToken(LoginType.KAKAO.type, token.accessToken)
- callback.onLoginSuccess()
- }
- } else {
- CoroutineScope(Dispatchers.IO).launch {
- callback.onLoginFailure(Exception(error))
- }
- }
- }
- }
- }
- }
-
-
- private suspend fun sendToken(type: String, accessToken: String) {
- accessTokenApi.accessTokenApi(TokenRequest(type, accessToken))
- .onSuccess {
+ override suspend fun postAccessToken(type: LoginType, accessToken: String): Result {
+ return accessTokenApi.postAccessToken(TokenRequest(type.name, accessToken)).fold(
+ onSuccess = {
Log.d(
"success", "${it.accessToken}\n" +
"${it.refreshToken}\n" +
@@ -97,13 +32,16 @@ class LoginRemoteDataSourceImpl @Inject constructor(
it.schoolInfoExist
)
saveUserInfo()
- }
- .onFailure {
+ Result.success(Unit)
+ },
+ onFailure = {
Log.d("failure", it.message.toString())
- //TODO
+ Result.failure(it)
}
+ )
}
+
private suspend fun saveUserInfo() {
userApi.getMyInfo()
.onSuccess {
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
index e2c33efe..553fbe42 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
@@ -1,22 +1,15 @@
package com.moneymong.moneymong.data.repository.login
-import android.content.Context
-import com.kakao.sdk.user.UserApiClient
import com.moneymong.moneymong.data.datasource.login.LoginRemoteDataSource
-import com.moneymong.moneymong.domain.util.LoginCallback
import com.moneymong.moneymong.domain.repository.LoginRepository
-import dagger.hilt.android.qualifiers.ApplicationContext
+import com.moneymong.moneymong.model.sign.LoginType
import javax.inject.Inject
class LoginRepositoryImpl @Inject constructor(
private val remoteDataSource: LoginRemoteDataSource,
- @ApplicationContext private val context: Context
) : LoginRepository {
- override suspend fun kakaoLogin(callback: LoginCallback) {
-// if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) {
-// remoteDataSource.loginWithKakaoTalk(callback)
-// } else {
- remoteDataSource.loginWithKakaoAccount(callback)
-// }
+
+ override suspend fun postAccessToken(type: LoginType, accessToken: String): Result {
+ return remoteDataSource.postAccessToken(type = type, accessToken = accessToken)
}
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/util/LoginType.kt b/data/src/main/java/com/moneymong/moneymong/data/util/LoginType.kt
deleted file mode 100644
index 568f14e9..00000000
--- a/data/src/main/java/com/moneymong/moneymong/data/util/LoginType.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.moneymong.moneymong.data.util
-
-enum class LoginType(val type : String) {
- KAKAO(type = "KAKAO")
-}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
index 9b40bd68..b85cff22 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
@@ -1,7 +1,7 @@
package com.moneymong.moneymong.domain.repository
-import com.moneymong.moneymong.domain.util.LoginCallback
+import com.moneymong.moneymong.model.sign.LoginType
interface LoginRepository {
- suspend fun kakaoLogin(callback: LoginCallback)
+ suspend fun postAccessToken(type: LoginType, accessToken: String): Result
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/LoginUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/LoginUseCase.kt
deleted file mode 100644
index 012dc699..00000000
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/LoginUseCase.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.moneymong.moneymong.domain.usecase.login
-
-import com.moneymong.moneymong.domain.util.LoginCallback
-import com.moneymong.moneymong.domain.repository.LoginRepository
-import javax.inject.Inject
-
-class LoginUseCase @Inject constructor(
- private val loginRepository: LoginRepository,
-) {
-
- suspend fun invoke(callback: LoginCallback) {
- loginRepository.kakaoLogin(callback)
- }
-
-}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
new file mode 100644
index 00000000..38bec613
--- /dev/null
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
@@ -0,0 +1,13 @@
+package com.moneymong.moneymong.domain.usecase.login
+
+import com.moneymong.moneymong.domain.repository.LoginRepository
+import com.moneymong.moneymong.model.sign.LoginType
+import javax.inject.Inject
+
+class PostAccessTokenUseCase @Inject constructor(
+ private val loginRepository: LoginRepository,
+) {
+ suspend operator fun invoke(type: LoginType, accessToken: String): Result {
+ return loginRepository.postAccessToken(type = type, accessToken = accessToken)
+ }
+}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt
index d640157a..43428995 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt
@@ -18,5 +18,4 @@ class TokenUseCase @Inject constructor(
suspend fun getSchoolInfo(): Result {
return tokenRepository.getSchoolInfo()
}
-
}
\ No newline at end of file
From d1d1727fa93b4bad4bc5b29557ac5ce38a9034fc Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 10 Jul 2024 11:28:25 +0900
Subject: [PATCH 096/157] =?UTF-8?q?moneymong-323=20feat:=20=EC=B9=B4?=
=?UTF-8?q?=EC=B9=B4=EC=98=A4=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B4=80?=
=?UTF-8?q?=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/feature/sign/util/KakaoLogin.kt | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/util/KakaoLogin.kt
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/util/KakaoLogin.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/util/KakaoLogin.kt
new file mode 100644
index 00000000..23b9728f
--- /dev/null
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/util/KakaoLogin.kt
@@ -0,0 +1,67 @@
+package com.moneymong.moneymong.feature.sign.util
+
+import android.content.Context
+import com.kakao.sdk.common.model.ClientError
+import com.kakao.sdk.common.model.ClientErrorCause
+import com.kakao.sdk.user.UserApiClient
+
+internal object KakaoLogin {
+ operator fun invoke(
+ context: Context,
+ onSuccess: (accessToken: String) -> Unit,
+ onFailure: (Throwable) -> Unit
+ ) {
+ if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) {
+ loginWithKakaoTalk(
+ context = context,
+ onSuccess = onSuccess,
+ onFailure = onFailure
+ )
+ } else {
+ loginWithKakaoAccount(
+ context = context,
+ onSuccess = onSuccess,
+ onFailure = onFailure
+ )
+ }
+ }
+
+ private fun loginWithKakaoTalk(
+ context: Context,
+ onSuccess: (accessToken: String) -> Unit,
+ onFailure: (Throwable) -> Unit
+ ) {
+ UserApiClient.instance.loginWithKakaoTalk(context) inner@{ token, error ->
+ if (error != null) {
+ // 사용자가 카카오톡 설치 후 디바이스 권한 요청 화면에서 로그인을 취소한 경우,
+ // 의도적인 로그인 취소로 보고 카카오계정으로 로그인 시도 없이 로그인 취소로 처리 (예: 뒤로 가기)
+ if (error is ClientError && error.reason == ClientErrorCause.Cancelled) {
+ onFailure(error)
+ return@inner
+ }
+ // 카카오톡에 연결된 카카오계정이 없는 경우, 카카오계정으로 로그인 시도
+ loginWithKakaoAccount(
+ context = context,
+ onSuccess = onSuccess,
+ onFailure = onFailure
+ )
+ } else if (token != null) {
+ onSuccess(token.accessToken)
+ }
+ }
+ }
+
+ private fun loginWithKakaoAccount(
+ context: Context,
+ onSuccess: (accessToken: String) -> Unit,
+ onFailure: (Throwable) -> Unit
+ ) {
+ UserApiClient.instance.loginWithKakaoAccount(context) { token, error ->
+ if (error != null) {
+ onFailure(error)
+ } else if (token != null) {
+ onSuccess(token.accessToken)
+ }
+ }
+ }
+}
\ No newline at end of file
From 1b7a1b7950e075f9be6b6523f145242d1f3d9255 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Wed, 10 Jul 2024 11:29:04 +0900
Subject: [PATCH 097/157] =?UTF-8?q?moneymong-323=20feat:=20=EC=B9=B4?=
=?UTF-8?q?=EC=B9=B4=EC=98=A4=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=A1=9C?=
=?UTF-8?q?=EC=A7=81=20view=20=EC=99=80=20=EC=97=B0=EA=B2=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/feature/sign/LoginScreen.kt | 24 +++--
.../feature/sign/view/KakaoLoginView.kt | 31 ++----
.../feature/sign/viewmodel/LoginViewModel.kt | 96 ++++++++++---------
3 files changed, 76 insertions(+), 75 deletions(-)
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
index a23d3f3c..89ce7860 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
@@ -11,14 +11,16 @@ import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment
-import com.moneymong.moneymong.design_system.R
import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
+import com.moneymong.moneymong.design_system.R
import com.moneymong.moneymong.design_system.error.ErrorScreen
import com.moneymong.moneymong.design_system.theme.Blue04
import com.moneymong.moneymong.design_system.theme.MMHorizontalSpacing
+import com.moneymong.moneymong.feature.sign.util.KakaoLogin
import com.moneymong.moneymong.feature.sign.view.KakaoLoginView
import com.moneymong.moneymong.feature.sign.view.TitleView
import com.moneymong.moneymong.feature.sign.viewmodel.LoginViewModel
@@ -29,10 +31,10 @@ fun LoginScreen(
navigateToSignup: () -> Unit,
navigateToLedger: () -> Unit,
navigateToLogin: () -> Unit,
- viewModel: LoginViewModel = hiltViewModel(),
-
- ) {
+ viewModel: LoginViewModel = hiltViewModel()
+) {
val state = viewModel.collectAsState().value
+ val context = LocalContext.current
LaunchedEffect(key1 = state.isSchoolInfoExist) {
if (state.isSchoolInfoExist == true) {
@@ -45,19 +47,19 @@ fun LoginScreen(
LaunchedEffect(key1 = state.isLoginRequired)
{
- if (state.isLoginRequired == true ) {
+ if (state.isLoginRequired == true) {
navigateToLogin()
viewModel.isLoginRequiredChanged(false)
}
}
- if (state.visibleError == true ) {
+ if (state.visibleError == true) {
ErrorScreen(
modifier = Modifier.fillMaxSize(),
message = state.errorMessage,
onRetry = { viewModel.visibleErrorChanged(false) }
)
- } else if(state.visibleError == false ){
+ } else if (state.visibleError == false) {
Column(
modifier = Modifier
.fillMaxSize()
@@ -86,7 +88,13 @@ fun LoginScreen(
) {
KakaoLoginView(
modifier = Modifier.fillMaxWidth(),
- onLoginButtonClicked = { viewModel.onLoginButtonClicked() }
+ loginByKaKao = {
+ KakaoLogin(
+ context = context,
+ onSuccess = viewModel::onKakaoLoginSuccess,
+ onFailure = viewModel::onKakaoLoginFailure
+ )
+ }
)
}
}
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/KakaoLoginView.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/KakaoLoginView.kt
index 4021d6b7..79768098 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/KakaoLoginView.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/KakaoLoginView.kt
@@ -2,35 +2,24 @@ package com.moneymong.moneymong.feature.sign.view
import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
-import androidx.compose.foundation.layout.Column
-import androidx.compose.foundation.layout.Spacer
-import androidx.compose.foundation.layout.fillMaxWidth
-import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
-import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.R
@Composable
fun KakaoLoginView(
modifier: Modifier = Modifier,
- onLoginButtonClicked: () -> Unit
+ loginByKaKao: () -> Unit
) {
- Column(
- modifier = modifier
- ) {
- Image(
- modifier = Modifier
- .fillMaxWidth()
- .clickable {
- onLoginButtonClicked()
- },
- painter = painterResource(id = R.drawable.img_kakao_login),
- contentDescription = null,
- contentScale = ContentScale.FillWidth,
- )
- }
-}
+ Image(
+ modifier = modifier.clickable {
+ loginByKaKao()
+ },
+ painter = painterResource(id = R.drawable.img_kakao_login),
+ contentDescription = "LoginByKakao",
+ contentScale = ContentScale.FillWidth,
+ )
+}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
index 2fab88ed..7061da93 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
@@ -1,68 +1,72 @@
package com.moneymong.moneymong.feature.sign.viewmodel
-import androidx.lifecycle.viewModelScope
import com.moneymong.moneymong.common.base.BaseViewModel
-import com.moneymong.moneymong.domain.util.LoginCallback
-import com.moneymong.moneymong.domain.usecase.login.LoginUseCase
+import com.moneymong.moneymong.domain.usecase.login.PostAccessTokenUseCase
import com.moneymong.moneymong.domain.usecase.login.TokenUseCase
-import dagger.hilt.android.lifecycle.HiltViewModel
import com.moneymong.moneymong.feature.sign.sideeffect.LoginSideEffect
import com.moneymong.moneymong.feature.sign.state.LoginState
+import com.moneymong.moneymong.model.sign.LoginType
import com.moneymong.moneymong.network.util.TokenCallback
-import kotlinx.coroutines.launch
+import dagger.hilt.android.lifecycle.HiltViewModel
import org.orbitmvi.orbit.syntax.simple.intent
import org.orbitmvi.orbit.syntax.simple.reduce
import javax.inject.Inject
@HiltViewModel
class LoginViewModel @Inject constructor(
- private val loginUseCase: LoginUseCase,
private val tokenUseCase: TokenUseCase,
+ private val postAccessTokenUseCase: PostAccessTokenUseCase
) : BaseViewModel(LoginState()), TokenCallback {
- fun onLoginButtonClicked() = intent {
- viewModelScope.launch {
- loginUseCase.invoke(object : LoginCallback {
- override suspend fun onLoginSuccess() {
- tokenUseCase.getSchoolInfo()
- .onSuccess {
- if(it) {
- reduce {
- state.copy(
- isSchoolInfoExist = true
- )
- }
- }
- else{
- reduce {
- state.copy(
- isSchoolInfoExist = false
- )
- }
- }
- }.onFailure {
- reduce {
- state.copy(
- visibleError = true,
- errorMessage = "문제가 발생했습니다.\n다시 시도해주세요"
- )
- }
- }
- }
+ fun onKakaoLoginSuccess(accessToken: String) = intent {
+ postAccessTokenUseCase(type = LoginType.KAKAO, accessToken = accessToken).onSuccess {
+ getSchoolInfo()
+ }.onFailure {
+ reduce {
+ state.copy(
+ visibleError = true,
+ errorMessage = "문제가 발생했습니다.\n다시 시도해주세요"
+ )
+ }
+ }
+ }
- override suspend fun onLoginFailure(exception: Exception) {
- // 로그인 실패
- reduce {
- state.copy(
- visibleError = true,
- errorMessage = "문제가 발생했습니다.\n다시 시도해주세요"
- )
- }
+ fun onKakaoLoginFailure(throwable: Throwable) = intent {
+ reduce {
+ state.copy(
+ visibleError = true,
+ errorMessage = "문제가 발생했습니다.\n다시 시도해주세요"
+ )
+ }
+ }
+
+
+ private fun getSchoolInfo() = intent {
+ tokenUseCase.getSchoolInfo().onSuccess { result ->
+ if (result) {
+ reduce {
+ state.copy(
+ isSchoolInfoExist = true
+ )
+ }
+ } else {
+ reduce {
+ state.copy(
+ isSchoolInfoExist = false
+ )
}
- })
+ }
+ }.onFailure {
+ reduce {
+ state.copy(
+ visibleError = true,
+ errorMessage = "문제가 발생했습니다.\n다시 시도해주세요"
+ )
+ }
}
}
+
override suspend fun onTokenFailure() {
intent {
reduce {
@@ -81,7 +85,7 @@ class LoginViewModel @Inject constructor(
}
}
- fun visibleErrorChanged(isVisibleError: Boolean) = intent{
+ fun visibleErrorChanged(isVisibleError: Boolean) = intent {
reduce {
state.copy(
visibleError = isVisibleError,
@@ -89,7 +93,7 @@ class LoginViewModel @Inject constructor(
}
}
- fun isSchoolInfoExistChanged(isSchoolInfoExist : Boolean?) = intent{
+ fun isSchoolInfoExistChanged(isSchoolInfoExist: Boolean?) = intent {
reduce {
state.copy(
isSchoolInfoExist = isSchoolInfoExist
From 9f37a712b8ebfb463205feae3bdfd0494281c2a7 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Fri, 12 Jul 2024 00:21:57 +0900
Subject: [PATCH 098/157] =?UTF-8?q?moneymong-323=20refactor:=20LoginRemote?=
=?UTF-8?q?DataSource=20=EB=82=B4=EB=B6=80=20=EB=A1=9C=EC=A7=81=20?=
=?UTF-8?q?=EB=B6=84=EB=A6=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
datasource 는 데이터 원천
repository 는 datasource 에서 가져온 데이터 활용
usecase 에서 repository 활용
---
.../datasource/login/LoginLocalDataSource.kt | 3 +-
.../login/LoginLocalDataSourceImpl.kt | 7 ++-
.../datasource/login/LoginRemoteDataSource.kt | 8 ---
.../login/LoginRemoteDataSourceImpl.kt | 55 -------------------
.../datasource/login/TokenRemoteDataSource.kt | 8 +++
.../login/TokenRemoteDataSourceImpl.kt | 12 +++-
.../repository/login/TokenRepositoryImpl.kt | 35 ++++++++----
.../repository/user/UserRepositoryImpl.kt | 12 ++++
.../domain/repository/TokenRepository.kt | 7 ++-
.../domain/repository/user/UserRepository.kt | 3 +-
.../usecase/login/PostAccessTokenUseCase.kt | 13 +++--
11 files changed, 79 insertions(+), 84 deletions(-)
delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
index 70399855..da25bd28 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
@@ -5,8 +5,9 @@ import com.moneymong.moneymong.model.sign.UserDataStoreInfoResponse
interface LoginLocalDataSource {
suspend fun getRefreshToken(): Result
suspend fun getAccessToken(): Result
- suspend fun getDataStoreInfo() : Result
+ suspend fun getDataStoreInfo(): Result
suspend fun deleteToken()
+ suspend fun setDataStore(aToken: String, rToken: String, success: Boolean, infoExist: Boolean)
suspend fun updateTokens(aToken: String, rToken: String)
suspend fun updateAccessToken(aToken: String)
suspend fun getSchoolInfo(): Result
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
index 4bcf1195..b4325d94 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
@@ -66,7 +66,12 @@ class LoginLocalDataSourceImpl @Inject constructor(
}
}
- suspend fun setDataStore(aToken: String, rToken: String, success: Boolean, infoExist: Boolean) {
+ override suspend fun setDataStore(
+ aToken: String,
+ rToken: String,
+ success: Boolean,
+ infoExist: Boolean
+ ) {
context.dataStore.edit { preferences ->
preferences[accessToken] = aToken
preferences[refreshToken] = rToken
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
deleted file mode 100644
index eaa0af16..00000000
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.moneymong.moneymong.data.datasource.login
-
-import com.moneymong.moneymong.model.sign.LoginType
-
-
-interface LoginRemoteDataSource {
- suspend fun postAccessToken(type: LoginType, accessToken: String): Result
-}
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
deleted file mode 100644
index d9ef2bbd..00000000
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.moneymong.moneymong.data.datasource.login
-
-import android.util.Log
-import com.moneymong.moneymong.data.datasource.user.UserLocalDataSource
-import com.moneymong.moneymong.model.sign.LoginType
-import com.moneymong.moneymong.model.sign.TokenRequest
-import com.moneymong.moneymong.network.api.AccessTokenApi
-import com.moneymong.moneymong.network.api.UserApi
-import javax.inject.Inject
-
-
-class LoginRemoteDataSourceImpl @Inject constructor(
- private val accessTokenApi: AccessTokenApi,
- private val userApi: UserApi,
- private val loginLocalDataSourceImpl: LoginLocalDataSourceImpl,
- private val userLocalDataSource: UserLocalDataSource,
-) : LoginRemoteDataSource {
-
- override suspend fun postAccessToken(type: LoginType, accessToken: String): Result {
- return accessTokenApi.postAccessToken(TokenRequest(type.name, accessToken)).fold(
- onSuccess = {
- Log.d(
- "success", "${it.accessToken}\n" +
- "${it.refreshToken}\n" +
- "${it.loginSuccess}\n" +
- "${it.schoolInfoExist}"
- )
- loginLocalDataSourceImpl.setDataStore(
- it.accessToken,
- it.refreshToken,
- it.loginSuccess,
- it.schoolInfoExist
- )
- saveUserInfo()
- Result.success(Unit)
- },
- onFailure = {
- Log.d("failure", it.message.toString())
- Result.failure(it)
- }
- )
- }
-
-
- private suspend fun saveUserInfo() {
- userApi.getMyInfo()
- .onSuccess {
- userLocalDataSource.saveUserId(it.id.toInt())
- userLocalDataSource.saveUserNickName(it.name)
- }.onFailure {
- userLocalDataSource.saveUserId(0)
- userLocalDataSource.saveUserNickName("에러가 발생했습니다.")
- }
- }
-}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSource.kt
index 9d3318dd..43d9a833 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSource.kt
@@ -1,9 +1,17 @@
package com.moneymong.moneymong.data.datasource.login
+import com.moneymong.moneymong.model.sign.LoginType
import com.moneymong.moneymong.model.sign.RefreshTokenRequest
import com.moneymong.moneymong.model.sign.RefreshTokenResponse
+import com.moneymong.moneymong.model.sign.TokenResponse
interface TokenRemoteDataSource {
+
+ suspend fun postAccessToken(
+ type: LoginType,
+ accessToken: String
+ ): Result
+
suspend fun getUpdateToken(refreshToken: String): Result
suspend fun deleteRefreshToken(body: RefreshTokenRequest)
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
index 24d2a1f7..319e2bc8 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
@@ -1,8 +1,11 @@
package com.moneymong.moneymong.data.datasource.login
-import com.moneymong.moneymong.network.api.AccessTokenApi
+import com.moneymong.moneymong.model.sign.LoginType
import com.moneymong.moneymong.model.sign.RefreshTokenRequest
import com.moneymong.moneymong.model.sign.RefreshTokenResponse
+import com.moneymong.moneymong.model.sign.TokenRequest
+import com.moneymong.moneymong.model.sign.TokenResponse
+import com.moneymong.moneymong.network.api.AccessTokenApi
import javax.inject.Inject
import javax.inject.Provider
@@ -11,6 +14,13 @@ class TokenRemoteDataSourceImpl @Inject constructor(
) : TokenRemoteDataSource {
private val accessTokenApi by lazy { accessTokenApiProvider.get() }
+ override suspend fun postAccessToken(
+ type: LoginType,
+ accessToken: String
+ ): Result {
+ return accessTokenApi.postAccessToken(TokenRequest(type.name, accessToken))
+ }
+
override suspend fun getUpdateToken(refreshToken: String): Result {
return accessTokenApi.refreshTokenApi(RefreshTokenRequest(refreshToken))
}
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt
index 67eb5d57..7d1d9df7 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt
@@ -3,15 +3,17 @@ package com.moneymong.moneymong.data.repository.login
import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSource
import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSource
import com.moneymong.moneymong.domain.repository.TokenRepository
+import com.moneymong.moneymong.model.sign.LoginType
import com.moneymong.moneymong.model.sign.RefreshTokenRequest
import com.moneymong.moneymong.model.sign.RefreshTokenResponse
+import com.moneymong.moneymong.model.sign.TokenResponse
import com.moneymong.moneymong.model.sign.UserDataStoreInfoResponse
import kotlinx.coroutines.flow.MutableSharedFlow
import javax.inject.Inject
class TokenRepositoryImpl @Inject constructor(
- private val localDataSource: LoginLocalDataSource,
- private val tokenRemoteDataSource: TokenRemoteDataSource
+ private val loginLocalDataSource: LoginLocalDataSource,
+ private val tokenRemoteDataSource: TokenRemoteDataSource,
) : TokenRepository {
override val tokenUpdateFailed = MutableSharedFlow(replay = 1)
@@ -20,15 +22,26 @@ class TokenRepositoryImpl @Inject constructor(
}
override suspend fun getRefreshToken(): Result {
- return localDataSource.getRefreshToken()
+ return loginLocalDataSource.getRefreshToken()
+ }
+
+ override suspend fun postAccessToken(type: LoginType, accessToken: String): Result {
+ return tokenRemoteDataSource.postAccessToken(type = type, accessToken = accessToken).onSuccess {
+ loginLocalDataSource.setDataStore(
+ it.accessToken,
+ it.refreshToken,
+ it.loginSuccess,
+ it.schoolInfoExist
+ )
+ }
}
override suspend fun getAccessToken(): Result {
- return localDataSource.getAccessToken()
+ return loginLocalDataSource.getAccessToken()
}
override suspend fun getDataStoreInfo(): Result {
- return localDataSource.getDataStoreInfo()
+ return loginLocalDataSource.getDataStoreInfo()
}
override suspend fun getUpdateToken(refreshToken: String): Result {
@@ -36,15 +49,15 @@ class TokenRepositoryImpl @Inject constructor(
}
override suspend fun deleteToken() {
- localDataSource.deleteToken()
+ loginLocalDataSource.deleteToken()
}
override suspend fun updateTokens(aToken: String, rToken: String) {
- localDataSource.updateTokens(aToken, rToken)
+ loginLocalDataSource.updateTokens(aToken, rToken)
}
override suspend fun updateAccessToken(aToken: String) {
- localDataSource.updateAccessToken(aToken)
+ loginLocalDataSource.updateAccessToken(aToken)
}
override suspend fun deleteRefreshToken(body: RefreshTokenRequest) {
@@ -52,11 +65,11 @@ class TokenRepositoryImpl @Inject constructor(
}
override suspend fun getSchoolInfo(): Result {
- return localDataSource.getSchoolInfo()
+ return loginLocalDataSource.getSchoolInfo()
}
- override suspend fun setSchoolInfoExist(infoExist : Boolean) {
- return localDataSource.setSchoolInfoExist(infoExist)
+ override suspend fun setSchoolInfoExist(infoExist: Boolean) {
+ return loginLocalDataSource.setSchoolInfoExist(infoExist)
}
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/user/UserRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/user/UserRepositoryImpl.kt
index d1d1e8d8..c95fbc37 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/user/UserRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/user/UserRepositoryImpl.kt
@@ -40,6 +40,18 @@ class UserRepositoryImpl @Inject constructor(
override suspend fun fetchUserId(): Int =
userLocalDataSource.fetchUserId()
+ override suspend fun saveUserInfo() {
+ userRemoteDataSource.getMyInfo()
+ .onSuccess {
+ userLocalDataSource.saveUserId(it.id.toInt())
+ userLocalDataSource.saveUserNickName(it.name)
+ }.onFailure {
+ userLocalDataSource.saveUserId(0)
+ userLocalDataSource.saveUserNickName("에러가 발생했습니다.")
+ }
+ }
+
+
override suspend fun saveUserNickName(nickname: String) =
userLocalDataSource.saveUserNickName(nickname = nickname)
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
index 7d920735..4260cea6 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
@@ -1,7 +1,9 @@
package com.moneymong.moneymong.domain.repository
+import com.moneymong.moneymong.model.sign.LoginType
import com.moneymong.moneymong.model.sign.RefreshTokenRequest
import com.moneymong.moneymong.model.sign.RefreshTokenResponse
+import com.moneymong.moneymong.model.sign.TokenResponse
import com.moneymong.moneymong.model.sign.UserDataStoreInfoResponse
import kotlinx.coroutines.flow.MutableSharedFlow
@@ -9,13 +11,14 @@ interface TokenRepository {
val tokenUpdateFailed: MutableSharedFlow
suspend fun notifyTokenUpdateFailed(failed: Boolean)
suspend fun getRefreshToken(): Result
+ suspend fun postAccessToken(type: LoginType, accessToken: String): Result
suspend fun getAccessToken(): Result
- suspend fun getDataStoreInfo() : Result
+ suspend fun getDataStoreInfo(): Result
suspend fun getUpdateToken(refreshToken: String): Result
suspend fun deleteToken()
suspend fun updateTokens(aToken: String, rToken: String)
suspend fun updateAccessToken(aToken: String)
suspend fun deleteRefreshToken(body: RefreshTokenRequest)
suspend fun getSchoolInfo(): Result
- suspend fun setSchoolInfoExist(infoExist : Boolean)
+ suspend fun setSchoolInfoExist(infoExist: Boolean)
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/user/UserRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/user/UserRepository.kt
index b46b4e0f..c2aa4812 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/user/UserRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/user/UserRepository.kt
@@ -4,7 +4,6 @@ import com.moneymong.moneymong.model.user.UserResponse
interface UserRepository {
-
suspend fun getMyInfo(): Result
@@ -16,6 +15,8 @@ interface UserRepository {
suspend fun fetchUserId(): Int
+ suspend fun saveUserInfo()
+
suspend fun saveUserNickName(nickname: String)
suspend fun fetchUserNickName(): String
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
index 38bec613..a2f85098 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
@@ -1,13 +1,18 @@
package com.moneymong.moneymong.domain.usecase.login
-import com.moneymong.moneymong.domain.repository.LoginRepository
+import com.moneymong.moneymong.domain.repository.TokenRepository
+import com.moneymong.moneymong.domain.repository.user.UserRepository
import com.moneymong.moneymong.model.sign.LoginType
+import com.moneymong.moneymong.model.sign.TokenResponse
import javax.inject.Inject
class PostAccessTokenUseCase @Inject constructor(
- private val loginRepository: LoginRepository,
+ private val tokenRepository: TokenRepository,
+ private val userRepository: UserRepository
) {
- suspend operator fun invoke(type: LoginType, accessToken: String): Result {
- return loginRepository.postAccessToken(type = type, accessToken = accessToken)
+ suspend operator fun invoke(type: LoginType, accessToken: String): Result {
+ return tokenRepository.postAccessToken(type = type, accessToken = accessToken).onSuccess {
+ userRepository.saveUserInfo()
+ }
}
}
\ No newline at end of file
From 2ef253adcf0366fc106036fbc49e967431bc58a7 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Sat, 13 Jul 2024 14:16:41 +0900
Subject: [PATCH 099/157] =?UTF-8?q?moneymong-323=20refactor:=20=EB=B6=88?=
=?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20=EC=BD=94=EB=93=9C=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C=20=EB=B0=8F=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EB=84=A4?=
=?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/network/util/AuthInterceptor.kt | 1 -
.../moneymong/data/di/DataSourceModule.kt | 19 ++++++-------------
.../moneymong/data/di/RepositoryModule.kt | 17 +++++------------
.../repository/login/LoginRepositoryImpl.kt | 15 ---------------
.../{login => token}/TokenRepositoryImpl.kt | 2 +-
.../domain/repository/LoginRepository.kt | 7 -------
.../PostAccessTokenUseCase.kt | 2 +-
.../usecase/{login => token}/TokenUseCase.kt | 2 +-
.../feature/sign/viewmodel/LoginViewModel.kt | 4 ++--
.../feature/sign/viewmodel/SplashViewModel.kt | 2 +-
10 files changed, 17 insertions(+), 54 deletions(-)
delete mode 100644 data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
rename data/src/main/java/com/moneymong/moneymong/data/repository/{login => token}/TokenRepositoryImpl.kt (98%)
delete mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
rename domain/src/main/java/com/moneymong/moneymong/domain/usecase/{login => token}/PostAccessTokenUseCase.kt (92%)
rename domain/src/main/java/com/moneymong/moneymong/domain/usecase/{login => token}/TokenUseCase.kt (91%)
diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/util/AuthInterceptor.kt b/core/network/src/main/java/com/moneymong/moneymong/network/util/AuthInterceptor.kt
index 16ceb716..924232e0 100644
--- a/core/network/src/main/java/com/moneymong/moneymong/network/util/AuthInterceptor.kt
+++ b/core/network/src/main/java/com/moneymong/moneymong/network/util/AuthInterceptor.kt
@@ -1,6 +1,5 @@
package com.moneymong.moneymong.network.util
-import com.moneymong.moneymong.domain.repository.LoginRepository
import com.moneymong.moneymong.domain.repository.TokenRepository
import com.moneymong.moneymong.network.BuildConfig
import kotlinx.coroutines.runBlocking
diff --git a/data/src/main/java/com/moneymong/moneymong/data/di/DataSourceModule.kt b/data/src/main/java/com/moneymong/moneymong/data/di/DataSourceModule.kt
index 84502359..65ac8784 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/di/DataSourceModule.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/di/DataSourceModule.kt
@@ -2,14 +2,6 @@ package com.moneymong.moneymong.data.di
import com.moneymong.moneymong.data.datasource.agency.AgencyLocalDataSource
import com.moneymong.moneymong.data.datasource.agency.AgencyLocalDataSourceImpl
-import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSource
-import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSourceImpl
-import com.moneymong.moneymong.data.datasource.login.LoginRemoteDataSource
-import com.moneymong.moneymong.data.datasource.login.LoginRemoteDataSourceImpl
-import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSource
-import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSourceImpl
-import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSource
-import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.agency.AgencyRemoteDataSource
import com.moneymong.moneymong.data.datasource.agency.AgencyRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.ledger.LedgerLocalDataSource
@@ -18,10 +10,16 @@ import com.moneymong.moneymong.data.datasource.ledger.LedgerRemoteDataSource
import com.moneymong.moneymong.data.datasource.ledger.LedgerRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.ledgerdetail.LedgerDetailRemoteDataSource
import com.moneymong.moneymong.data.datasource.ledgerdetail.LedgerDetailRemoteDataSourceImpl
+import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSource
+import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSourceImpl
+import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSource
+import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.member.MemberRemoteDataSource
import com.moneymong.moneymong.data.datasource.member.MemberRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.ocr.OCRRemoteDataSource
import com.moneymong.moneymong.data.datasource.ocr.OCRRemoteDataSourceImpl
+import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSource
+import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSourceImpl
import com.moneymong.moneymong.data.datasource.user.UserLocalDataSource
import com.moneymong.moneymong.data.datasource.user.UserLocalDataSourceImpl
import com.moneymong.moneymong.data.datasource.user.UserRemoteDataSource
@@ -35,11 +33,6 @@ import dagger.hilt.components.SingletonComponent
@InstallIn(SingletonComponent::class)
interface DataSourceModule {
- @Binds
- fun bindLoginDataSource(
- loginRemoteDataSourceImpl: LoginRemoteDataSourceImpl
- ): LoginRemoteDataSource
-
@Binds
fun bindUnivDataSource(
univRemoteDataSourceImpl: UnivRemoteDataSourceImpl
diff --git a/data/src/main/java/com/moneymong/moneymong/data/di/RepositoryModule.kt b/data/src/main/java/com/moneymong/moneymong/data/di/RepositoryModule.kt
index d231f318..911bffe9 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/di/RepositoryModule.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/di/RepositoryModule.kt
@@ -1,18 +1,16 @@
package com.moneymong.moneymong.data.di
-import com.moneymong.moneymong.data.repository.login.LoginRepositoryImpl
-import com.moneymong.moneymong.data.repository.login.TokenRepositoryImpl
-import com.moneymong.moneymong.data.repository.signup.UnivRepositoryImpl
-import com.moneymong.moneymong.domain.repository.LoginRepository
-import com.moneymong.moneymong.domain.repository.TokenRepository
-import com.moneymong.moneymong.domain.repository.UnivRepository
import com.moneymong.moneymong.data.repository.agency.AgencyRepositoryImpl
-import com.moneymong.moneymong.domain.repository.AgencyRepository
import com.moneymong.moneymong.data.repository.ledger.LedgerRepositoryImpl
import com.moneymong.moneymong.data.repository.ledgerdetail.LedgerDetailRepositoryImpl
import com.moneymong.moneymong.data.repository.member.MemberRepositoryImpl
import com.moneymong.moneymong.data.repository.ocr.OCRRepositoryImpl
+import com.moneymong.moneymong.data.repository.signup.UnivRepositoryImpl
+import com.moneymong.moneymong.data.repository.token.TokenRepositoryImpl
import com.moneymong.moneymong.data.repository.user.UserRepositoryImpl
+import com.moneymong.moneymong.domain.repository.AgencyRepository
+import com.moneymong.moneymong.domain.repository.TokenRepository
+import com.moneymong.moneymong.domain.repository.UnivRepository
import com.moneymong.moneymong.domain.repository.ledger.LedgerRepository
import com.moneymong.moneymong.domain.repository.ledgerdetail.LedgerDetailRepository
import com.moneymong.moneymong.domain.repository.member.MemberRepository
@@ -28,11 +26,6 @@ import javax.inject.Singleton
@InstallIn(SingletonComponent::class)
interface RepositoryModule {
- @Binds
- fun bindLoginRepository(
- loginRepositoryImpl: LoginRepositoryImpl
- ): LoginRepository
-
@Binds
fun bindUnivRepository(
univRepositoryImpl: UnivRepositoryImpl
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
deleted file mode 100644
index 553fbe42..00000000
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/login/LoginRepositoryImpl.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.moneymong.moneymong.data.repository.login
-
-import com.moneymong.moneymong.data.datasource.login.LoginRemoteDataSource
-import com.moneymong.moneymong.domain.repository.LoginRepository
-import com.moneymong.moneymong.model.sign.LoginType
-import javax.inject.Inject
-
-class LoginRepositoryImpl @Inject constructor(
- private val remoteDataSource: LoginRemoteDataSource,
-) : LoginRepository {
-
- override suspend fun postAccessToken(type: LoginType, accessToken: String): Result {
- return remoteDataSource.postAccessToken(type = type, accessToken = accessToken)
- }
-}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
similarity index 98%
rename from data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt
rename to data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
index 7d1d9df7..d2c01644 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/login/TokenRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
@@ -1,4 +1,4 @@
-package com.moneymong.moneymong.data.repository.login
+package com.moneymong.moneymong.data.repository.token
import com.moneymong.moneymong.data.datasource.login.LoginLocalDataSource
import com.moneymong.moneymong.data.datasource.login.TokenRemoteDataSource
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
deleted file mode 100644
index b85cff22..00000000
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/LoginRepository.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.moneymong.moneymong.domain.repository
-
-import com.moneymong.moneymong.model.sign.LoginType
-
-interface LoginRepository {
- suspend fun postAccessToken(type: LoginType, accessToken: String): Result
-}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt
similarity index 92%
rename from domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
rename to domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt
index a2f85098..a0955c18 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/PostAccessTokenUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt
@@ -1,4 +1,4 @@
-package com.moneymong.moneymong.domain.usecase.login
+package com.moneymong.moneymong.domain.usecase.token
import com.moneymong.moneymong.domain.repository.TokenRepository
import com.moneymong.moneymong.domain.repository.user.UserRepository
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt
similarity index 91%
rename from domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt
rename to domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt
index 43428995..7aafbe6d 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/login/TokenUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt
@@ -1,4 +1,4 @@
-package com.moneymong.moneymong.domain.usecase.login
+package com.moneymong.moneymong.domain.usecase.token
import com.moneymong.moneymong.domain.repository.TokenRepository
import com.moneymong.moneymong.model.sign.UserDataStoreInfoResponse
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
index 7061da93..522b86c5 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
@@ -1,8 +1,8 @@
package com.moneymong.moneymong.feature.sign.viewmodel
import com.moneymong.moneymong.common.base.BaseViewModel
-import com.moneymong.moneymong.domain.usecase.login.PostAccessTokenUseCase
-import com.moneymong.moneymong.domain.usecase.login.TokenUseCase
+import com.moneymong.moneymong.domain.usecase.token.PostAccessTokenUseCase
+import com.moneymong.moneymong.domain.usecase.token.TokenUseCase
import com.moneymong.moneymong.feature.sign.sideeffect.LoginSideEffect
import com.moneymong.moneymong.feature.sign.state.LoginState
import com.moneymong.moneymong.model.sign.LoginType
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
index 0cdc55f1..27159da2 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
@@ -2,7 +2,7 @@ package com.moneymong.moneymong.feature.sign.viewmodel
import android.util.Log
import com.moneymong.moneymong.common.base.BaseViewModel
-import com.moneymong.moneymong.domain.usecase.login.TokenUseCase
+import com.moneymong.moneymong.domain.usecase.token.TokenUseCase
import com.moneymong.moneymong.feature.sign.sideeffect.SplashSideEffect
import com.moneymong.moneymong.feature.sign.state.SplashState
import dagger.hilt.android.lifecycle.HiltViewModel
From a97e4dce7c099b89b5cb95fe30d1a44552ac6c52 Mon Sep 17 00:00:00 2001
From: jhg3410
Date: Sat, 13 Jul 2024 14:16:47 +0900
Subject: [PATCH 100/157] moneymong-323 chore: kakao sdk module version up
(2.5.0 -> 2.20.3)
---
gradle/libs.versions.toml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index a5becfeb..4bfe10cf 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -39,6 +39,8 @@ material = "1.10.0"
lifecycle-runtime-ktx = "2.6.2"
constraintlayout = "2.1.4"
paging = "3.2.1"
+kakao-sdk = "2.20.3"
+
[libraries]
accompanist-systemuicontroller = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanist" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" }
@@ -98,8 +100,7 @@ ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigation" }
navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigation" }
-kakao-kakaolink = { group = "com.kakao.sdk", name = "kakaolink", version = "1.30.5" }
-kakao-v2-user = { group = "com.kakao.sdk", name = "v2-user", version = "2.5.0" }
+kakao-v2-user = { group = "com.kakao.sdk", name = "v2-user", version.ref = "kakao-sdk" }
paging-runtime = { group = "androidx.paging", name = "paging-runtime", version.ref = "paging" }
paging-common = { group = "androidx.paging", name = "paging-common", version.ref = "paging" }
From 3461743ff212ed4a4f8743eb1a5b9ace26124261 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?=
<101038047+eunseo0105@users.noreply.github.com>
Date: Sun, 4 Aug 2024 21:54:54 +0900
Subject: [PATCH 101/157] =?UTF-8?q?Feat:=20=EB=8C=80=ED=95=99=20=EC=A0=95?=
=?UTF-8?q?=EB=B3=B4=20=EC=97=86=EC=9D=8C=20api=20=EC=97=B0=EB=8F=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/model/sign/TokenRequest.kt | 4 +-
.../moneymong/model/sign/TokenResponse.kt | 3 +-
.../moneymong/model/sign/UnivRequest.kt | 4 +-
.../login/TokenRemoteDataSourceImpl.kt | 2 +-
.../moneymong/feature/sign/SignUpScreen.kt | 2 +-
.../feature/sign/view/SignUpButtonView.kt | 38 +++++++++++++------
.../feature/sign/viewmodel/SignUpViewModel.kt | 2 +-
7 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenRequest.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenRequest.kt
index 298de768..8b48f005 100644
--- a/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenRequest.kt
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenRequest.kt
@@ -2,5 +2,7 @@ package com.moneymong.moneymong.model.sign
data class TokenRequest (
val provider : String,
- val accessToken : String
+ val accessToken : String,
+ val name: String,
+ val code: String
)
\ No newline at end of file
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenResponse.kt
index 470bac3c..a52d62a0 100644
--- a/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenResponse.kt
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/TokenResponse.kt
@@ -4,5 +4,6 @@ data class TokenResponse(
val accessToken : String,
val refreshToken : String,
val loginSuccess : Boolean,
- val schoolInfoExist : Boolean
+ val schoolInfoExist : Boolean,
+ val schoolInfoProvided: Boolean
)
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivRequest.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivRequest.kt
index 19fb0f42..c11c53de 100644
--- a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivRequest.kt
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UnivRequest.kt
@@ -1,6 +1,6 @@
package com.moneymong.moneymong.model.sign
data class UnivRequest(
- val universityName: String,
- val grade: Int
+ val universityName: String?,
+ val grade: Int?
)
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
index 319e2bc8..bbd096c3 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/TokenRemoteDataSourceImpl.kt
@@ -18,7 +18,7 @@ class TokenRemoteDataSourceImpl @Inject constructor(
type: LoginType,
accessToken: String
): Result {
- return accessTokenApi.postAccessToken(TokenRequest(type.name, accessToken))
+ return accessTokenApi.postAccessToken(TokenRequest(type.name, accessToken, "", ""))
}
override suspend fun getUpdateToken(refreshToken: String): Result {
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
index c4be6bd0..bb4d49c1 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
@@ -209,7 +209,7 @@ fun SignUpContent(
}
}
- Box(
+ Column(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.BottomCenter)
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
index 46bc3930..685a9633 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
@@ -4,33 +4,39 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
+import androidx.compose.material.Text
+import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.moneymong.moneymong.design_system.component.button.MDSButton
import com.moneymong.moneymong.design_system.component.button.MDSButtonSize
import com.moneymong.moneymong.design_system.component.button.MDSButtonType
import com.moneymong.moneymong.design_system.error.ErrorDialog
+import com.moneymong.moneymong.design_system.theme.Blue04
+import com.moneymong.moneymong.design_system.theme.Body3
+import com.moneymong.moneymong.feature.sign.sideeffect.SignUpSideEffect
@Composable
fun SignUpButtonView(
- modifier: Modifier = Modifier ,
- isEnabled : Boolean,
- visiblePopUpError : Boolean,
- popUpErrorMessage : String,
- visiblePopUpErrorChanged : (Boolean) -> Unit,
- onCreateUniversity : () -> Unit,
- storeSchoolInfoExist : (Boolean) -> Unit
+ modifier: Modifier = Modifier,
+ isEnabled: Boolean,
+ visiblePopUpError: Boolean,
+ popUpErrorMessage: String,
+ visiblePopUpErrorChanged: (Boolean) -> Unit,
+ onCreateUniversity: () -> Unit,
+ storeSchoolInfoExist: (Boolean) -> Unit
) {
- if(visiblePopUpError){
+ if (visiblePopUpError) {
ErrorDialog(
message = popUpErrorMessage,
onConfirm = {
visiblePopUpErrorChanged(false)
}
)
- }
- else{
+ } else {
Column(
modifier = modifier
) {
@@ -46,7 +52,17 @@ fun SignUpButtonView(
enabled = isEnabled
)
Spacer(modifier = Modifier.height(8.dp))
-
+ TextButton(
+ modifier = Modifier.align(Alignment.CenterHorizontally),
+ onClick = { onCreateUniversity() }
+ ){
+ Text(
+ textAlign = TextAlign.Center,
+ text = "입력할 대학 정보가 없어요",
+ color = Blue04,
+ style = Body3
+ )
+ }
}
}
}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
index 5ccca470..a1a3fd63 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
@@ -23,7 +23,7 @@ class SignUpViewModel @Inject constructor(
private val univUseCase: UnivUseCase,
private val schoolInfoUseCase : SchoolInfoUseCase,
) : BaseViewModel(SignUpState()) {
- fun createUniv(universityName: String, grade: Int) = intent {
+ fun createUniv(universityName: String?, grade: Int?) = intent {
val body = UnivRequest(universityName, grade)
univUseCase.createUniv(body)
.onSuccess {
From f8473ac016b7af34d039d7632361b8a95132b2c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?=
<101038047+eunseo0105@users.noreply.github.com>
Date: Mon, 5 Aug 2024 20:40:15 +0900
Subject: [PATCH 102/157] =?UTF-8?q?Feat:=20=EB=8C=80=ED=95=99=20=EC=A0=95?=
=?UTF-8?q?=EB=B3=B4=20=EC=97=86=EC=9D=84=20=EC=8B=9C=EC=97=90=EB=8F=84=20?=
=?UTF-8?q?schoolInfoExist=20true=EB=A1=9C=20=EC=84=A4=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../moneymong/feature/sign/SignUpScreen.kt | 1 -
.../feature/sign/view/SignUpButtonView.kt | 31 +++++++++----------
.../feature/sign/viewmodel/SignUpViewModel.kt | 1 +
3 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
index bb4d49c1..8cffaf31 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
@@ -231,7 +231,6 @@ fun SignUpContent(
)
)
},
- storeSchoolInfoExist = { viewModel.storeSchoolInfoExist(it) }
)
}
}
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
index 685a9633..f06a2d1d 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
@@ -5,19 +5,17 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material.Text
-import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
-import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
+import com.moneymong.moneymong.common.ui.noRippleClickable
import com.moneymong.moneymong.design_system.component.button.MDSButton
import com.moneymong.moneymong.design_system.component.button.MDSButtonSize
import com.moneymong.moneymong.design_system.component.button.MDSButtonType
import com.moneymong.moneymong.design_system.error.ErrorDialog
import com.moneymong.moneymong.design_system.theme.Blue04
import com.moneymong.moneymong.design_system.theme.Body3
-import com.moneymong.moneymong.feature.sign.sideeffect.SignUpSideEffect
@Composable
fun SignUpButtonView(
@@ -27,7 +25,6 @@ fun SignUpButtonView(
popUpErrorMessage: String,
visiblePopUpErrorChanged: (Boolean) -> Unit,
onCreateUniversity: () -> Unit,
- storeSchoolInfoExist: (Boolean) -> Unit
) {
if (visiblePopUpError) {
ErrorDialog(
@@ -44,25 +41,25 @@ fun SignUpButtonView(
modifier = Modifier.fillMaxWidth(),
onClick = {
onCreateUniversity()
- storeSchoolInfoExist(true)
},
text = "가입하기",
type = MDSButtonType.PRIMARY,
size = MDSButtonSize.LARGE,
enabled = isEnabled
)
- Spacer(modifier = Modifier.height(8.dp))
- TextButton(
- modifier = Modifier.align(Alignment.CenterHorizontally),
- onClick = { onCreateUniversity() }
- ){
- Text(
- textAlign = TextAlign.Center,
- text = "입력할 대학 정보가 없어요",
- color = Blue04,
- style = Body3
- )
- }
+ Spacer(modifier = Modifier.height(16.dp))
+ Text(
+ modifier = Modifier
+ .fillMaxWidth()
+ .noRippleClickable {
+ onCreateUniversity()
+ },
+ textAlign = TextAlign.Center,
+ text = "입력할 대학 정보가 없어요",
+ color = Blue04,
+ style = Body3
+ )
+
}
}
}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
index a1a3fd63..eb991ed8 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
@@ -27,6 +27,7 @@ class SignUpViewModel @Inject constructor(
val body = UnivRequest(universityName, grade)
univUseCase.createUniv(body)
.onSuccess {
+ storeSchoolInfoExist(true)
reduce {
state.copy(
isUnivCreated = true
From 5d0097c8e9c7769948dab55229f367b0e61bc658 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?=
<101038047+eunseo0105@users.noreply.github.com>
Date: Wed, 7 Aug 2024 22:36:58 +0900
Subject: [PATCH 103/157] =?UTF-8?q?Fix:=20schoolInfoExist=20->=20schoolInP?=
=?UTF-8?q?rovied=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../model/sign/UserDataStoreInfoResponse.kt | 2 +-
.../datasource/login/LoginLocalDataSource.kt | 2 +-
.../login/LoginLocalDataSourceImpl.kt | 17 ++++++++---------
.../repository/token/TokenRepositoryImpl.kt | 6 +++---
.../domain/repository/TokenRepository.kt | 2 +-
.../domain/usecase/signup/SchoolInfoUseCase.kt | 2 +-
.../moneymong/feature/sign/LoginScreen.kt | 8 ++++----
.../moneymong/feature/sign/state/LoginState.kt | 2 +-
.../feature/sign/viewmodel/LoginViewModel.kt | 8 ++++----
.../feature/sign/viewmodel/SignUpViewModel.kt | 4 ++--
.../feature/sign/viewmodel/SplashViewModel.kt | 4 ++--
11 files changed, 28 insertions(+), 29 deletions(-)
diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UserDataStoreInfoResponse.kt b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UserDataStoreInfoResponse.kt
index 75a46603..560cdcc8 100644
--- a/core/model/src/main/java/com/moneymong/moneymong/model/sign/UserDataStoreInfoResponse.kt
+++ b/core/model/src/main/java/com/moneymong/moneymong/model/sign/UserDataStoreInfoResponse.kt
@@ -2,5 +2,5 @@ package com.moneymong.moneymong.model.sign
data class UserDataStoreInfoResponse(
val accessToken : String,
- val schoolInfoExist : Boolean,
+ val schoolInfoProvided : Boolean,
)
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
index da25bd28..33410314 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSource.kt
@@ -11,5 +11,5 @@ interface LoginLocalDataSource {
suspend fun updateTokens(aToken: String, rToken: String)
suspend fun updateAccessToken(aToken: String)
suspend fun getSchoolInfo(): Result
- suspend fun setSchoolInfoExist(infoExist: Boolean)
+ suspend fun setSchoolInfoProvided(infoExist: Boolean)
}
\ No newline at end of file
diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
index b4325d94..7cf33267 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/login/LoginLocalDataSourceImpl.kt
@@ -19,7 +19,7 @@ class LoginLocalDataSourceImpl @Inject constructor(
private val accessToken = stringPreferencesKey("ACCESS_TOKEN")
private val refreshToken = stringPreferencesKey("REFRESH_TOKEN")
private val loginSuccess = booleanPreferencesKey("LOGIN_SUCCESS")
- private val schoolInfoExist = booleanPreferencesKey("SCHOOL_INFO_EXIST")
+ private val schoolInfoProvided = booleanPreferencesKey("SCHOOL_INFO_PROVIDED")
override suspend fun getRefreshToken(): Result {
val preferences = context.dataStore.data.first()
@@ -35,7 +35,7 @@ class LoginLocalDataSourceImpl @Inject constructor(
override suspend fun getDataStoreInfo(): Result {
val preferences = context.dataStore.data.first()
- return Result.success(UserDataStoreInfoResponse(preferences[accessToken] ?: "",preferences[schoolInfoExist] ?: false))
+ return Result.success(UserDataStoreInfoResponse(preferences[accessToken] ?: "",preferences[schoolInfoProvided] ?: false))
}
override suspend fun updateTokens(aToken: String, rToken: String) {
@@ -53,8 +53,8 @@ class LoginLocalDataSourceImpl @Inject constructor(
override suspend fun getSchoolInfo(): Result {
val preferences = context.dataStore.data.first()
- return preferences[schoolInfoExist]?.let { Result.success(it) }
- ?: Result.failure(Exception("schoolInfoExist is null"))
+ return preferences[schoolInfoProvided]?.let { Result.success(it) }
+ ?: Result.failure(Exception("schoolInfoProvided is null"))
}
override suspend fun deleteToken() {
@@ -62,7 +62,7 @@ class LoginLocalDataSourceImpl @Inject constructor(
preferences.remove(accessToken)
preferences.remove(refreshToken)
preferences.remove(loginSuccess)
- preferences.remove(schoolInfoExist)
+ preferences.remove(schoolInfoProvided)
}
}
@@ -76,14 +76,13 @@ class LoginLocalDataSourceImpl @Inject constructor(
preferences[accessToken] = aToken
preferences[refreshToken] = rToken
preferences[loginSuccess] = success
- preferences[schoolInfoExist] = infoExist
- Log.d("schoolInfoExist", preferences[schoolInfoExist]!!.toString())
+ preferences[schoolInfoProvided] = infoExist
}
}
- override suspend fun setSchoolInfoExist(infoExist: Boolean) {
+ override suspend fun setSchoolInfoProvided(infoExist: Boolean) {
context.dataStore.edit { preferences ->
- preferences[schoolInfoExist] = infoExist
+ preferences[schoolInfoProvided] = infoExist
}
}
diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
index d2c01644..2694d89f 100644
--- a/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
+++ b/data/src/main/java/com/moneymong/moneymong/data/repository/token/TokenRepositoryImpl.kt
@@ -31,7 +31,7 @@ class TokenRepositoryImpl @Inject constructor(
it.accessToken,
it.refreshToken,
it.loginSuccess,
- it.schoolInfoExist
+ it.schoolInfoProvided
)
}
}
@@ -68,8 +68,8 @@ class TokenRepositoryImpl @Inject constructor(
return loginLocalDataSource.getSchoolInfo()
}
- override suspend fun setSchoolInfoExist(infoExist: Boolean) {
- return loginLocalDataSource.setSchoolInfoExist(infoExist)
+ override suspend fun setSchoolInfoProvided(infoExist: Boolean) {
+ return loginLocalDataSource.setSchoolInfoProvided(infoExist)
}
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
index 4260cea6..ca1e7464 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt
@@ -20,5 +20,5 @@ interface TokenRepository {
suspend fun updateAccessToken(aToken: String)
suspend fun deleteRefreshToken(body: RefreshTokenRequest)
suspend fun getSchoolInfo(): Result
- suspend fun setSchoolInfoExist(infoExist: Boolean)
+ suspend fun setSchoolInfoProvided(infoExist: Boolean)
}
\ No newline at end of file
diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/SchoolInfoUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/SchoolInfoUseCase.kt
index 2ad72318..49c0c685 100644
--- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/SchoolInfoUseCase.kt
+++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/signup/SchoolInfoUseCase.kt
@@ -8,6 +8,6 @@ class SchoolInfoUseCase @Inject constructor(
) {
suspend operator fun invoke(infoExist: Boolean){
- tokenRepository.setSchoolInfoExist(infoExist)
+ tokenRepository.setSchoolInfoProvided(infoExist)
}
}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
index 89ce7860..d80b937b 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/LoginScreen.kt
@@ -36,12 +36,12 @@ fun LoginScreen(
val state = viewModel.collectAsState().value
val context = LocalContext.current
- LaunchedEffect(key1 = state.isSchoolInfoExist) {
- if (state.isSchoolInfoExist == true) {
+ LaunchedEffect(key1 = state.isSchoolInfoProvided) {
+ if (state.isSchoolInfoProvided == true) {
navigateToLedger()
- } else if (state.isSchoolInfoExist == false) {
+ } else if (state.isSchoolInfoProvided == false) {
navigateToSignup()
- viewModel.isSchoolInfoExistChanged(null)
+ viewModel.isSchoolInfoProvidedChanged(null)
}
}
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/state/LoginState.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/state/LoginState.kt
index a4d5a86f..ede8c01d 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/state/LoginState.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/state/LoginState.kt
@@ -4,7 +4,7 @@ import com.moneymong.moneymong.common.base.State
data class LoginState(
val isClickable: Boolean = false,
- val isSchoolInfoExist: Boolean? = null,
+ val isSchoolInfoProvided: Boolean? = null,
val isLoginRequired: Boolean? = null,
val visibleError : Boolean = false,
val errorMessage : String = ""
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
index 522b86c5..795dd167 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/LoginViewModel.kt
@@ -46,13 +46,13 @@ class LoginViewModel @Inject constructor(
if (result) {
reduce {
state.copy(
- isSchoolInfoExist = true
+ isSchoolInfoProvided = true
)
}
} else {
reduce {
state.copy(
- isSchoolInfoExist = false
+ isSchoolInfoProvided = false
)
}
}
@@ -93,10 +93,10 @@ class LoginViewModel @Inject constructor(
}
}
- fun isSchoolInfoExistChanged(isSchoolInfoExist: Boolean?) = intent {
+ fun isSchoolInfoProvidedChanged(isSchoolInfoProvided: Boolean?) = intent {
reduce {
state.copy(
- isSchoolInfoExist = isSchoolInfoExist
+ isSchoolInfoProvided = isSchoolInfoProvided
)
}
}
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
index eb991ed8..41d11b34 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
@@ -27,7 +27,7 @@ class SignUpViewModel @Inject constructor(
val body = UnivRequest(universityName, grade)
univUseCase.createUniv(body)
.onSuccess {
- storeSchoolInfoExist(true)
+ storeSchoolInfoProvided(true)
reduce {
state.copy(
isUnivCreated = true
@@ -62,7 +62,7 @@ class SignUpViewModel @Inject constructor(
}
}
- fun storeSchoolInfoExist(infoExist : Boolean ){
+ fun storeSchoolInfoProvided(infoExist : Boolean ){
CoroutineScope(Dispatchers.IO).launch {
schoolInfoUseCase.invoke(infoExist)
}
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
index 27159da2..1c0e0098 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SplashViewModel.kt
@@ -28,8 +28,8 @@ class SplashViewModel @Inject constructor(
fun checkTokenValidity() = intent {
tokenUseCase.getDataStoreInfo()
.onSuccess {
- Log.d("Splash", "${it.accessToken}, ${it.schoolInfoExist}")
- if (it.accessToken.isNotEmpty() && it.schoolInfoExist) {
+ Log.d("Splash", "${it.accessToken}, ${it.schoolInfoProvided}")
+ if (it.accessToken.isNotEmpty() && it.schoolInfoProvided) {
reduce {
state.copy(
isTokenValid = true
From 89325c01cbc9d590b1856e60e98735343d7c11f8 Mon Sep 17 00:00:00 2001
From: eunseo
Date: Sun, 11 Aug 2024 20:50:15 +0900
Subject: [PATCH 104/157] =?UTF-8?q?Fix:=20=ED=9D=AC=EC=A7=81=EB=8B=98=20?=
=?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt | 4 ++--
.../moneymong/moneymong/feature/sign/view/SignUpButtonView.kt | 3 +++
.../moneymong/feature/sign/viewmodel/SignUpViewModel.kt | 3 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
index 8cffaf31..b3e98d26 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SignUpScreen.kt
@@ -73,7 +73,7 @@ fun SignUpScreen(
modifier = Modifier
.fillMaxSize()
.background(White)
- .padding(MMHorizontalSpacing),
+ .padding(horizontal = MMHorizontalSpacing),
topBar = {
Row(
modifier = Modifier
@@ -209,7 +209,7 @@ fun SignUpContent(
}
}
- Column(
+ Box(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.BottomCenter)
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
index f06a2d1d..6b83058b 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/view/SignUpButtonView.kt
@@ -60,6 +60,9 @@ fun SignUpButtonView(
style = Body3
)
+ Spacer(modifier = Modifier.height(28.dp))
+
+
}
}
}
\ No newline at end of file
diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
index 41d11b34..aa236dd5 100644
--- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
+++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/viewmodel/SignUpViewModel.kt
@@ -1,6 +1,7 @@
package com.moneymong.moneymong.feature.sign.viewmodel
import androidx.compose.ui.text.input.TextFieldValue
+import androidx.lifecycle.viewModelScope
import com.moneymong.moneymong.common.base.BaseViewModel
import com.moneymong.moneymong.domain.usecase.signup.SchoolInfoUseCase
import com.moneymong.moneymong.domain.usecase.signup.UnivUseCase
@@ -63,7 +64,7 @@ class SignUpViewModel @Inject constructor(
}
fun storeSchoolInfoProvided(infoExist : Boolean ){
- CoroutineScope(Dispatchers.IO).launch {
+ viewModelScope.launch {
schoolInfoUseCase.invoke(infoExist)
}
}
From 45b2f9fa271ecbebb6f3c2814e21b4d8701793fb Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 01:22:24 +0900
Subject: [PATCH 105/157] INCREMENT VERSION CODE
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index de1dda7b..1e0370cb 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 13
+ versionCode = 14
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From 66d6c8a90c46dcadc4672200a43454dc3717e8aa Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 01:23:23 +0900
Subject: [PATCH 106/157] INCREMENT VERSION CODE
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 1e0370cb..9e6a11f5 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 14
+ versionCode = 15
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From fe6107c3c3b3bb3447bfeeaf589cf977b3a148f3 Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 01:34:49 +0900
Subject: [PATCH 107/157] INCREMENT VERSION CODE
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 9e6a11f5..44f1ea33 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 15
+ versionCode = 16
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From bcda67ec902ddb651b48e866da95ae46c8f4a5be Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 01:35:27 +0900
Subject: [PATCH 108/157] INCREMENT VERSION CODE
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 44f1ea33..b611b29c 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 16
+ versionCode = 18
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From cbfdd89dd55e599d56ea2772857a1479aff256a6 Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 02:02:59 +0900
Subject: [PATCH 109/157] chore: version code reset
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index b611b29c..de1dda7b 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 18
+ versionCode = 13
versionName = "1.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From 58fdc0108b2a1b2851fc4c997483b0ec6bb9c00f Mon Sep 17 00:00:00 2001
From: eunseo
Date: Tue, 13 Aug 2024 20:48:22 +0900
Subject: [PATCH 110/157] =?UTF-8?q?fix:=20onclickItem=20=EC=B6=94=EA=B0=80?=
=?UTF-8?q?=20(=EB=88=84=EB=9D=BD)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../member/src/main/java/com/example/member/MemberScreen.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/feature/member/src/main/java/com/example/member/MemberScreen.kt b/feature/member/src/main/java/com/example/member/MemberScreen.kt
index be6ce479..9dedc5fb 100644
--- a/feature/member/src/main/java/com/example/member/MemberScreen.kt
+++ b/feature/member/src/main/java/com/example/member/MemberScreen.kt
@@ -63,7 +63,7 @@ fun MemberScreen(
viewModel: MemberViewModel = hiltViewModel(),
agencyId: Int,
agencyList: List,
- changeAgency: (agencyId: Int) -> Unit,
+ onClickItem: (agencyId: Int) -> Unit,
changeAgencyList: (changeAgencyList: List) -> Unit
) {
val sheetState = rememberModalBottomSheetState(
@@ -213,7 +213,7 @@ fun MemberScreen(
viewModel.deleteAgency(
agencyId,
agencyList,
- changeAgency,
+ onClickItem,
changeAgencyList
)
}
From c96b7bf513743aab2b3dba6829650f05c94faa99 Mon Sep 17 00:00:00 2001
From: Heon
Date: Tue, 13 Aug 2024 21:58:24 +0900
Subject: [PATCH 111/157] chore: version up
---
.gitignore | 4 +++-
app/build.gradle.kts | 2 +-
fastlane/Fastfile | 6 ++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4960cd83..2aaba2fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,4 +18,6 @@ keystore.properties
# Keystore Files
*.jks
-*.keystore
\ No newline at end of file
+*.keystore
+
+*.json
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index de1dda7b..ce98c70e 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -22,7 +22,7 @@ android {
minSdk = 24
targetSdk = 34
versionCode = 13
- versionName = "1.1.0"
+ versionName = "1.2.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index e6d5a8c4..9b78da63 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -23,12 +23,10 @@ platform :android do
version_code: options[:new_version_code]
)
- git_add(
- path: ["./app/build.gradle.kts"]
- )
git_commit(
path: ["./app/build.gradle.kts"],
- message: "INCREMENT VERSION CODE"
+ message: "INCREMENT VERSION CODE",
+ allow_nothing_to_commit: true
)
push_to_git_remote
From 5d6ce847ffef939098b689a331affa288f880d6c Mon Sep 17 00:00:00 2001
From: Anka
Date: Tue, 13 Aug 2024 13:00:55 +0000
Subject: [PATCH 112/157] INCREMENT VERSION CODE
---
app/build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index ce98c70e..14585c04 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -21,7 +21,7 @@ android {
applicationId = "com.moneymong.moneymong"
minSdk = 24
targetSdk = 34
- versionCode = 13
+ versionCode = 14
versionName = "1.2.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
From 3f3a71f41e1eecf0979e3ef9e9a75015fc80908d Mon Sep 17 00:00:00 2001
From: Heon
Date: Thu, 15 Aug 2024 23:05:47 +0900
Subject: [PATCH 113/157] =?UTF-8?q?feat:=20=EB=A7=88=EC=9D=B4=EB=AA=BD=20?=
=?UTF-8?q?=ED=94=BC=EB=93=9C=EB=B0=B1=20ui=20=EA=B0=9C=EB=B0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/main/AndroidManifest.xml | 13 +--
.../main/res/drawable/img_kakao_feedback.png | Bin 0 -> 50502 bytes
.../feature/mymong/main/MyMongScreen.kt | 13 ++-
.../feature/mymong/main/MyMongSideEffect.kt | 1 +
.../feature/mymong/main/MyMongViewModel.kt | 2 +
.../mymong/main/view/MyMongFeedbackView.kt | 79 ++++++++++++++++++
.../mymong/main/view/MyMongSettingView.kt | 6 --
7 files changed, 101 insertions(+), 13 deletions(-)
create mode 100644 core/design-system/src/main/res/drawable/img_kakao_feedback.png
create mode 100644 feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongFeedbackView.kt
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index ffe80bf0..f72dfcdb 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,15 +24,15 @@
tools:targetApi="31">
+ android:value="@string/native_app_key" />
+ android:windowSoftInputMode="adjustResize">
@@ -40,14 +40,17 @@
-
+
-
diff --git a/core/design-system/src/main/res/drawable/img_kakao_feedback.png b/core/design-system/src/main/res/drawable/img_kakao_feedback.png
new file mode 100644
index 0000000000000000000000000000000000000000..405006c8ebd832a56be42d2d5491ba0a9e18edb0
GIT binary patch
literal 50502
zcmeEtg;yL)^yWYyKp?ogOK=G;!Cev{5S#>ecM0xJfZEAmp}8Xj;b
z9VkCdrCneAkFL?UImUbGg=Prh;P7x`@*>bI^gbbKOwr0<#?agSp%=qR0mzJRGy_f*
z_0;ks21A-je!)>&;lepC1REzvW19U)t+0QxU(+p~6mUK6I8F1MS(|x!I@norPx;$=
zbKQPf;jE&G1@|h;|NQ<3f&W3^|3Sb=b^wczxHxksW!z9v_8~I1l9WsnD!A;avmNnU
z?IHcMO*0h#zGp9vibEu|>k{tjY^PI_JNegj+?)c`BE;FHqU=CsA>aB1Vz}xA4^UFv
z$6TZjEJQ8U?4c9OD#+9eh?K2HjsL%ouL6(*n8+-~vEllx%-vhU)-EMVrim#ity4L91v0dL-m%
z_~NHRF~MLdpOs5Ez&NgOi2q88xCx;8DWH28c{^~>3Wz8{4H(yuq2dB8K7TS|Os60X
zM+KO@i5ceKQ;PFH2G}rAa!@mY;kV&`F7+O)V%-bF0UA*;2@^Pm5S?C?HTBR51F4r-l406nDcGM*@fWz7m&llm25P+8Qjh*AK
zGQtfbz{sVTJWKNRLC!KnnN-n5Z@~}%pe}nk$&)v<5}rfYtfAXM3XBZ^)Uyz+1aBY!
zLI=w62!S4*Vu<-N0Ki*Sb83P&Kesrn5oLUL%y9q!6Uu+@nGt1h%m=D90H5IECXoP=
z#$Vq>*Ti5F0Dg9|^t2NKY=r8#rM3^y;8(`mvoQV$I1^x{k_SWIpds;vf=mH6%ylY8
zJScj|acD7!sBx4WBHGo+8v|1ZAV&niBE4BwcdA%eEIkJgZ1DjFp$N%)6&isM8eE*u
znU3(&_QyO5nxVK6TG9i=pSYKH=I5QOhspVA95sjV{vU4mZeGp@gwUX4=hX4Ex^Q%_
zZf0a9)-d5)TZGUtWI-B$4Nje^5oQlWzyzl2g%8p9=IWlsL?CY`=qtWR4afLtYy8@O
z7)1=Ew`%CPf9j)FTj4tG8?~+65wZr8Lt{;?(iYM3-~rV^fB?8g<{nCFI4l6bjH1r%
zqvk(z+eVC%2#zI$b}1d^_Yz2&k9J`NUnKco~nNG
ze&b0(LETe7yI)`8U`F2VHO-ES&R1>Os-;5+g-3XG3x5&;5&ET#M!c4Ncmi@?hv#b-
zGTh>hpiL|GxBsVMu$FF{+KKD`+{$2IFp=6mKjMc+0fY%9;o;u^0Nv3v;Zg7FTVQ%N
zHAdPO1tibbL;<#D=>Irz+&?*(!Ee)@BWc`cWr&3e*BdlxB)*dmI>E0X{3`=lB98s-
zASipa*6XraM}uVr6Wn-ayj*Tevums;Wt8!+{MC|Y$$~DN^IinR;<*fC#DOJKlo&sd
zDUts9_j>Rv2zLoOdcm2IsK*OTg=zd@$QK-;fPee9RMw^`z{fS8rri#&zFp#l|5r^N
zbtJLhpxrta4`pPVkN*N&B+&7T2N9uaB+34^YOGpxWd1);b#^Rgq+N%<$k27jeklXpd_1{LEr^h+TX=nJv;0n5O=FjhVY!(!@cYVt%F{UPR$d!B
z-mvz2`;Q2_Lj?@^Z)Zz&)NEz`Q$(ivqbH%bo)6?%l|QL_s)zA)=>l*Ey75Hla-K6k
zHeeF0U?8LY(-wYo5s?M1%96byS2b$;Po}|53zNHB^SjrXaKb1+@Eq#=`*vlLsE`b8
z*XZ?~R8Eb0#}*QcWuLmx5f^-dhE#2t$s9fVkekmJKPHlQpJ6G8hz*It`np|gxjITM
zzU(^UGq@iAu<$rx=R6uaBqa)AN3jZ@NszWr}Dh0yrRyF;(=2$Yd`VRh^_A=0emjR)Tax%I&I-b-mb6aN~E
zBmZ`^$KT0-mHTR$cC5If8F@V{tL&g=(Ml#rwr}J7!r7Aef9rWZ7ewJdDXi0$Q9Ob4
zYCN&D#%xq4alP5x_*~orV1^3y8~N;4vCU{X6P)j3ahFU_dIkGA75ZMsiLRkn)(TW#
zy>psb_#fWrrk&YU3Vw`$hy#5K&SRB0{~h$*COfMzG*gz`yOrb_PTYT&pr7&uWapfj
zrh5)W5+ohPX12A)JzTqtN%nJaZ?=P}KoFK}T@4431baQ%DUWi3paFVnS%X=hXHQnH%I5(lmuq&_A|Y#bBme;STlLJlWe%C7-qfyy
zB1~koYDp}qfj22^#S9`x-v!(Ka@c|!gBP5$JydqqZjWw&r6MFl;x+&Pnq5=W*ZUR2
z#!UJjC4cjo^y3iV-<)6~7@zmc8mxMt(a)&Yd_({aMyZI_Ep=|UavzRb11*F}0RYUF
zWO`G!=!Ct0;j>ged-r$_N}2i*ch3k34|WS9@cvlYZpTG`_6DG2y&vO~%p04fnB8c2
z@jE}R)t602TpfA82QZV!vAvUNo~2MFvU5xJRnKCv%n>w(VRs?(>T0H7(&yG3`79go
z>&VXy!p*i)2xr2|0Qq=x!1CaUjh-p@!;^#A!HKH
zUJMDSnsk3qskotjCAy;bs$RPTG1Z$1MBHhZ_b4~S{kXwz0ZC)-(98TS*9lypi@e{i
zXTz+vcwfNc<-7TO7_s^5A&F&vQJyR|;&B2y*eDCD9(
zky}bo7GffyhFwky0SPLju9tkD`laNhf}7MF_5Em+N<74}tgmW_9x`s%8lK1RAvC&9
z%1;GfCs(A9#9a9JOhqXCSH>pG+g=#dQ?=!qv70EZCRCmr>hJ}fbV!V{}i
z+ZbmXirTfScD(Xr3ka5R5tLYZlSYT8wnGpV#Ji)xg-f3WQX1p$XyIKSGN
z%oic3`h)QZ#&_-R#@|Nb|M(01hjaNe0)OIE*ttsZjnS>D*wfXzx#%TPM2s2@rd&s{
z@780^^HuR_{fvrYXxF-(Xc*VUWnYb27aO}52cs9q7i9W(3Hx6?4BP389C&O`YY1p;
zE<2dwAlKjo>e2C3K@Gl$5Z
zK6|M{&c!dl)kcy`E9ujpFkzIz{bQ+Zn@ir^ci3BBU~Iw8al#jJIlsikr4Rx?A+NAt
z_JVcf3Lt7S&7$qS=AFFl7rc%{0aNH%J6NM2Djb;CSpy64Eh)a-y}`AoqjwleakQoj
zk1btK6jo>r_9A_J5L}~>xL)u&|Dso~#twnc2^R~h7~Ep}{>!u^gUHG8zL45#j{c6t
zT>?_)mSYdV*}zP<5}X+}cn1DXy-^$jhZ^zeOzo`mpyH3|*zcAO*z(xIO67V{^#nMK
zEC16JRK`T={LhUL{`+?J^|+a(V!hDTg?-VWDI=&-u(NW}6ZF7+;dZ&9ZjUN4xOgW{
z|KK;yqSa;(Ut2hwb5Vry^I=6Qf3N;nD8x4|1uV
zi@h=L6JsMzED>BX`?pb%YU5e%>r3suZkV{O$}P>CTz%JR!*cNS^+9<6^qOQEHN9x=d^jgq9XH)Vw)<&jGi%
zmKFBx^VW)-Xh)O)^4UghnAn0;Y@w=WChcdIK*??JCn;^791U%$ewix2s_nbGWPCCj
zVqu&^$t$#iDH&Em;us6fCs2L6HO`Wx0*Ear|vz;u#5Y{J8w9q33F0{z2<!zL6SBLdN
z#UsR(-D6Kx%Q1qJC$XKBl={3=ShrLKL9@@y^6$5)dVuOuDeDpE$w&sm>LCARd5ybo
zZR1M*_JaMNsEqJKs+9G`ZT|v$x@MB&o_uO%{gNG+{N2Ok(0u}0VQb0r#-97y8AIFx
zRotiBapPD@dKZC>`(-dWm;WT&5QN8la^~nFc4u22^_}hG(rv9ne8zOn-g4z|JTG|R
zFZZk{t3<19l<6#RXQ&|soIWu(7^i>M=x#_Z!6FLb6h+6B@$d@fr$mO=Fq9xk7FnEi%{z>gylZYaSi5E7Lg8n)$R5y*e#}K4mm*OJ
zbI7^~TU&|Ld7P7K7L-}w#F&0F*5!Bjqw57y)dfLH@xNS%a{u-i2KKY`Q+YBd74IGdP7D~WpX~mmuVs=d$X_D_xL&yBi7lsj$k~uxj?|ri_n|fi
zx=>lIkhW=o7&3dTEWm`(%R
z)}pl0uUV6Sl@oE(a(D182CGx#e&%C;r14tMCureDL3>Z@8JK%EBHRB-x4O;xm<}pv2_{F7LV72M200?layLt`7vzAwA@P+4U&18~4uVmNoM8
zVOg<;)47+B`VNOTiEaNwTEMs67~zBd8I4Xbc;OpP7;hm
zY%XB^ohRv=id@rc2p?4vM{+~u)3Pkh#`iXkLo27h;^>2C;_Cym&Rbpn*_F?G1?=!G
z`ZZK>r#1WGz!_A%#yH|GzF(o*g9eSNf%$Iax11;`w?~nNkDIAtcemafwYNR8BHO0U
z`{TY$A;x*%i0HTSNpe6jjq+KEpQbwo2Lnb02x@I90@vs@Lwz|~GyV3CxddMFy{n9e
z=#Kf;ZqDzbZaSmQ`R1URRk=-&{InL-$_X<}YPc1p193?`C02I9J5O$U4eBgE3L1pH
z%L_b3h&SQz<_O!xoXuy2PKSbCT2NAtM1h~k)v(o}>qf_85Qgt!O;_2#!11xKj$S`%
z61dyliGsg9fyA0suKu8!Z^I`~5A#f5iAEiKfEm7~<#xVnYKjqg;Z(pn$h-qg6*FIN
zvRL~|(Q*2VU5Mr*3u@YxF65UEaIpONZ1Oct*v*S2K@(SDXk>+QM_7E?T~>uoz6BCV
zxp7V6*L3N&CK>U>Kdkpqu#U