Skip to content

Commit

Permalink
Weekly/10: Weekly 브랜치의 10주차 개발 내용을 Master 브랜치에 병합
Browse files Browse the repository at this point in the history
Merge pull request #120 from kakao-tech-campus-2nd-step3/Develop
  • Loading branch information
ksc1008 authored Nov 8, 2024
2 parents 54b0e22 + 8c71a08 commit fe492d2
Show file tree
Hide file tree
Showing 223 changed files with 3,829 additions and 1,009 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
}

dependencies {
implementation("androidx.datastore:datastore-preferences:1.1.1")
implementation("androidx.security:security-crypto-ktx:1.1.0-alpha06")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.activity:activity:1.9.2")
Expand All @@ -63,6 +63,7 @@ dependencies {
implementation(project(":ui:camera"))
implementation(project(":ui:addexpense"))
implementation(project(":ui:data"))
implementation(project(":ui:sendmessage"))
implementation(project(":domain:common-user"))
implementation(project(":domain:group"))
implementation(project(":domain:expense"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class JeongsanApplication : Application() {
}

companion object {
const val DATASTORE_NAME = "JeongsanDatastore"
const val ENCRYPTED_SHARED_PREFERENCES_NAME = "JeongsanEncryptedSharedPreferences"
}
}
9 changes: 4 additions & 5 deletions app/src/main/java/com/kappzzang/jeongsan/StartActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.kappzzang.jeongsan.intentcontract.StartContract
import com.kappzzang.jeongsan.navigation.AppNavigator
import com.kappzzang.jeongsan.navigation.LoginNavigator
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class StartActivity : AppCompatActivity() {
@Inject
lateinit var appNavigator: AppNavigator
lateinit var appNavigator: LoginNavigator

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -36,15 +36,14 @@ class StartActivity : AppCompatActivity() {
// 초대링크를 클릭해서 옴
inviteGroup != null -> {
Log.d(TAG, inviteGroup)
appNavigator.navigateToLogin(this).also {
it.data = Uri.parse(inviteGroup)
appNavigator.loginAndEnterGroup(this, Uri.parse(inviteGroup)).also {
startActivity(it)
finish()
}
}
// 그냥 옴
else -> {
appNavigator.navigateToLogin(this).also {
appNavigator.login(this).also {
startActivity(it)
finish()
}
Expand Down
25 changes: 0 additions & 25 deletions app/src/main/java/com/kappzzang/jeongsan/di/DatastoreModule.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.kappzzang.jeongsan.di

import android.content.Context
import android.content.SharedPreferences
import androidx.security.crypto.EncryptedSharedPreferences
import androidx.security.crypto.MasterKey
import com.kappzzang.jeongsan.JeongsanApplication.Companion.ENCRYPTED_SHARED_PREFERENCES_NAME
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object EncryptedSharedPreferencesModule {

@Provides
@Singleton
fun provideEncryptedSharedPreferences(@ApplicationContext context: Context): SharedPreferences {
val masterKey = MasterKey.Builder(context)
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
.build()

return EncryptedSharedPreferences.create(
context,
ENCRYPTED_SHARED_PREFERENCES_NAME,
masterKey,
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
)
}
}
18 changes: 0 additions & 18 deletions app/src/main/java/com/kappzzang/jeongsan/di/NavigatorModule.kt

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/java/com/kappzzang/jeongsan/di/RoomModule.kt

This file was deleted.

24 changes: 0 additions & 24 deletions app/src/main/java/com/kappzzang/jeongsan/di/UseCaseModule.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.kappzzang.jeongsan.data

data class AuthData(
data class KakaoAuthData(
val kakaoAccessToken: String,
val accessTokenExpirationTime: Long,
val kakaoRefreshToken: String,
val jwt: String?
val kakaoRefreshToken: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.kappzzang.jeongsan.data

data class ServerAuthData(val accessToken: String, val refreshToken: String)
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
package com.kappzzang.jeongsan.util

import com.kappzzang.jeongsan.data.AuthData
import kotlinx.coroutines.flow.Flow
import com.kappzzang.jeongsan.data.KakaoAuthData
import com.kappzzang.jeongsan.data.ServerAuthData

interface AuthenticationRepository {
fun getAuthData(): Flow<AuthData>
fun getKakaoAuthData(): KakaoAuthData

suspend fun updateAuthData(newData: AuthData)
fun getServerAuthData(): ServerAuthData

suspend fun removeAuthData()
fun updateKakaoAuthData(newData: KakaoAuthData)

fun updateServerAuthData(newData: ServerAuthData)

fun removeKakaoAuthData()

fun removeServerAuthData()

suspend fun refreshJwtFromServer(authData: ServerAuthData): Result<ServerAuthData>
}
1 change: 1 addition & 0 deletions common/dispatcher/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
17 changes: 17 additions & 0 deletions common/dispatcher/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jlleitschuh.gradle.ktlint")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
}

android {
namespace = "com.kappzzang.jeongsan"
}

dependencies {
implementation("com.google.dagger:hilt-android:2.48.1")
kapt("com.google.dagger:hilt-compiler:2.48.1")
implementation("androidx.core:core-ktx:1.13.1")
}
21 changes: 21 additions & 0 deletions common/dispatcher/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

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

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

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

import dagger.Module
import dagger.Provides
Expand Down
1 change: 1 addition & 0 deletions common/navigation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation(project(":domain:ocr"))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.kappzzang.jeongsan.navigation

import android.content.Context
import android.content.Intent
import android.net.Uri
import com.kappzzang.jeongsan.model.OcrResultResponse

interface AddExpenseNavigator {
fun navigateToAddExpenseWithImage(
packageContext: Context,
ocrResponse: OcrResultResponse.OcrSuccess,
image: Uri,
groupId: String
): Intent

fun navigateToAddExpenseManually(packageContext: Context, groupId: String): Intent
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kappzzang.jeongsan.navigation

import android.content.Context
import android.content.Intent

interface CameraNavigator {
fun navigateToCamera(packageContext: Context): Intent
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kappzzang.jeongsan.navigation

import android.content.Context
import android.content.Intent

interface CreateGroupNavigator {
fun navigateToCreateGroup(packageContext: Context): Intent
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.kappzzang.jeongsan.navigation

import android.content.Context
import android.content.Intent

interface ExpenseDetailNavigator {
fun navigateToExpenseDetail(
packageContext: Context,
expenseId: String,
groupId: String,
editable: Boolean
): Intent
}
Loading

0 comments on commit fe492d2

Please sign in to comment.