Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/#9: week4 xml 과제 구현 #10

Open
wants to merge 65 commits into
base: develop-xml
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
c254cc9
move/#9: presentation 패키지로 이동
youjin09222 May 3, 2024
af3798c
mod/#9: selfDescription에서 phone으로 변경
youjin09222 May 3, 2024
7e4f1b9
chore/#9: 인터넷 권한 추가
youjin09222 May 3, 2024
57a3172
chore/#9: retrofit2 라이브러리 추가
youjin09222 May 3, 2024
5863d8b
chore/#9: BASE_URL 숨기기
youjin09222 May 3, 2024
bd8a756
chore/#9: Gson 추가
youjin09222 May 3, 2024
6ce5e5f
add/#9: RequestSignUpDto 추가
youjin09222 May 3, 2024
04ce825
add/#9: RequestLoginDto 추가
youjin09222 May 3, 2024
edcad07
add/#9: ResponseAuthDto 추가
youjin09222 May 3, 2024
905ac81
feat/#9: signUp, login 인터페이스 추가
youjin09222 May 3, 2024
02cbded
feat/#9: ApiFactory 추가
youjin09222 May 3, 2024
d635e6f
feat/#9: 회원가입 서버 통신 구현
youjin09222 May 3, 2024
956772d
feat/#9: 사용자 아이디 저장
youjin09222 May 3, 2024
5a2fd43
feat/#9: 로그인 서버 통신 구현
youjin09222 May 3, 2024
0a346e6
add/#9: ResponseUserInfoDto 추가
youjin09222 May 3, 2024
ad0d55f
add/#9: Interceptor 추가
youjin09222 May 3, 2024
1e0e58d
feat/#9: 회원 정보 조회 서버 통신 구현
youjin09222 May 3, 2024
242824b
feat/#9: 홈 화면에 회원 정보 적용
youjin09222 May 3, 2024
461b231
feat/#9: coil 라이브러리 추가
youjin09222 May 8, 2024
191999e
chore/#9: FRIEND_BASE_URL 숨기기
youjin09222 May 8, 2024
4391afa
add/#9: ResponseFriendDto 추가
youjin09222 May 8, 2024
a3964d5
mod/#9: Friend Data 수정
youjin09222 May 8, 2024
96abc70
feat/#9: FriendService 추가
youjin09222 May 8, 2024
64997a1
feat/#9: friendRetrofit 추가
youjin09222 May 8, 2024
9f920a0
feat/#9: 친구 정보 조회 서버 통신
youjin09222 May 8, 2024
acc6952
feat/#9: companion object로 상수 정의
youjin09222 May 9, 2024
99a5f8a
mod/#9: ResponseUserInfoDto에 UserInfo 종속
youjin09222 May 9, 2024
4e42346
mod/#9: 필요없는 부분 삭제
youjin09222 May 9, 2024
3728f57
mod/#9: takeIf 사용
youjin09222 May 9, 2024
13f0499
mod/#9: 필요 없는 함수 제거
youjin09222 May 9, 2024
0491d05
refactor/#9: UserInfoViewModel에서 init 사용
youjin09222 May 9, 2024
06f8258
del/#9: BaseViewHolder 삭제
youjin09222 May 10, 2024
07f388f
feat/#9: FriendAdapter 예외 처리
youjin09222 May 10, 2024
9e8fb05
refactor/#9: LoginViewModel에서 userPreference 초기화
youjin09222 May 10, 2024
d50abcc
rename/#9: 함수명 변경
youjin09222 May 10, 2024
f92c796
refactor/#9: init 사용
youjin09222 May 10, 2024
f395ff8
#13 [ADD] : dataBinding 추가
youjin09222 May 24, 2024
b0c1f35
add/#9: dataBinding 추가
youjin09222 May 24, 2024
2844a8d
add/#9: timber 추가
youjin09222 May 24, 2024
3d274e2
feat/#9: Context에 showToast 추가
youjin09222 May 24, 2024
4781a17
feat/#9: UiState 추가
youjin09222 May 24, 2024
ae98201
refactor/#9: sharedPreferences 수정
youjin09222 May 24, 2024
ef411de
refactor/#9: LoginLiveData Backing Property
youjin09222 May 24, 2024
2a37968
refactor/#9: 함수 및 변수명 변경 (LoginActivity)
youjin09222 May 24, 2024
d4cec71
refactor/#9: postSignUp 코루틴으로 변경
youjin09222 May 24, 2024
8ca5997
refactor/#9: SignUpViewModel 코루틴으로 변경
youjin09222 May 24, 2024
387f741
refactor/#9: initPostSignUpObserver 수정
youjin09222 May 24, 2024
80ce0cb
refactor/#9: getUserInfo 코루틴으로 변경
youjin09222 May 24, 2024
9873cc6
refactor/#9: UserInfoViewModel 코루틴으로 변경
youjin09222 May 24, 2024
54bbdf7
refactor/#9: initGetUserInfoObserver 수정
youjin09222 May 24, 2024
2afe198
Merge pull request #14 from NOW-SOPT-ANDROID/feat/week6_xml
youjin09222 Jun 6, 2024
8f97d65
chore/#9 : 패키지 구조 변경
youjin09222 Jun 6, 2024
45e0c2e
add/#9 : showToast 확장 함수 추가
youjin09222 Jun 6, 2024
a0154ee
refactor/#9 : AuthService에서 로그인 API 호출을 suspend 함수로 변경
youjin09222 Jun 6, 2024
d7e4a53
refactor/#9 : LoginViewModel에 코루틴 및 UiState 적용
youjin09222 Jun 6, 2024
f70f2c5
refactor/#9 : LoginActivity에 UiState 적용
youjin09222 Jun 6, 2024
707250d
mod/#9 : 로그 메시지 추출하여 적용
youjin09222 Jun 6, 2024
4ea0fb5
del/#9 : 필요없는 파일 삭제
youjin09222 Jun 6, 2024
9a0ead4
refactor/#9 : getFriendInfo를 suspend 함수로 변경
youjin09222 Jun 6, 2024
794ae60
refactor/#9 : UserProfileViewModel로 통합
youjin09222 Jun 6, 2024
bc4e974
rename/#9 : ProfileViewHolder 이름 변경
youjin09222 Jun 6, 2024
758e5ab
mod/#9 : 로그 메시지 추출하여 적용 (MyPageFragment)
youjin09222 Jun 6, 2024
cf8a14b
refactor/#9 : HomeFragment에서 뷰모델 1개만 호출 및 UiState 적용
youjin09222 Jun 6, 2024
6a84ee4
Merge branch 'feat/week4_xml' of https://github.com/NOW-SOPT-ANDROID/…
youjin09222 Jun 6, 2024
8466a7b
del/#9 : 필요없는 코드 삭제
youjin09222 Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.0'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

android {
namespace 'com.sopt.now'
compileSdk 34
Expand All @@ -16,6 +20,8 @@ android {
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "AUTH_BASE_URL", properties["auth.base.url"]
buildConfigField "String", "FRIEND_BASE_URL", properties["friend.base.url"]
}

buildTypes {
Expand All @@ -34,6 +40,8 @@ android {

buildFeatures {
viewBinding true
buildConfig true
dataBinding true
}
}

Expand All @@ -54,4 +62,25 @@ dependencies {

implementation "androidx.fragment:fragment-ktx:1.6.1"
implementation "androidx.activity:activity-ktx:1.8.0"

//Gson
implementation "com.google.code.gson:gson:2.8.9"

// Network
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1'
implementation 'com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0'

// define a BOM and its version
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))

// define any required OkHttp artifacts without version
implementation("com.squareup.okhttp3:okhttp")
implementation("com.squareup.okhttp3:logging-interceptor")

// coil
implementation("io.coil-kt:coil:0.10.0")

// timber
implementation("com.jakewharton.timber:timber:4.7.1")
}
14 changes: 8 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
Expand All @@ -11,13 +13,13 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.NOWSOPTAndroid"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="false">
</activity>
android:name=".test.presentation.MainActivity"
android:exported="false"></activity>
<activity
android:name=".LoginActivity"
android:name=".test.presentation.login.LoginActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -26,7 +28,7 @@
</intent-filter>
</activity>
<activity
android:name=".SignUpActivity"
android:exported="false"/>
android:name=".test.presentation.signup.SignUpActivity"
android:exported="false" />
</application>
</manifest>
87 changes: 0 additions & 87 deletions app/src/main/java/com/sopt/now/LoginActivity.kt

This file was deleted.

75 changes: 0 additions & 75 deletions app/src/main/java/com/sopt/now/SignUpActivity.kt

This file was deleted.

70 changes: 0 additions & 70 deletions app/src/main/java/com/sopt/now/test/HomeFragment.kt

This file was deleted.

50 changes: 0 additions & 50 deletions app/src/main/java/com/sopt/now/test/MyPageFragment.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.sopt.now.test.core.util.context

import android.content.Context
import android.widget.Toast

fun Context.showToast(message: String) {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
}
Loading