From 5e01c4ffa39eaabb875ce0df1341dedde0b47fad Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Tue, 8 Oct 2024 17:22:03 +0900 Subject: [PATCH 1/7] =?UTF-8?q?MONEYMONG-511=20feature:=20update=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84(?= =?UTF-8?q?=EC=B5=9C=EC=86=8C=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84(GET)=20Mock)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/moneymong/moneymong/MainState.kt | 2 +- .../com/moneymong/moneymong/MainViewModel.kt | 23 ++++++++++++++++++- .../FetchMinimumUpdateVersionUseCase.kt | 10 ++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt diff --git a/app/src/main/java/com/moneymong/moneymong/MainState.kt b/app/src/main/java/com/moneymong/moneymong/MainState.kt index 9bf31b26..e52687e3 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainState.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainState.kt @@ -3,5 +3,5 @@ package com.moneymong.moneymong import com.moneymong.moneymong.common.base.State data class MainState( - val something: Any? = null // TODO + val shouldUpdate: Boolean = false ): State diff --git a/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt b/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt index 2ca3d14b..9f50fdcb 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt @@ -1,9 +1,30 @@ package com.moneymong.moneymong import com.moneymong.moneymong.common.base.BaseViewModel +import com.moneymong.moneymong.domain.usecase.version.FetchMinimumUpdateVersionUseCase 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 MainViewModel @Inject constructor() : BaseViewModel(MainState()) { +class MainViewModel @Inject constructor( + val fetchMinimumUpdateVersionUseCase: FetchMinimumUpdateVersionUseCase +) : BaseViewModel(MainState()) { + + fun checkShouldUpdate(currentVersion: KotlinVersion) = intent { + fetchMinimumUpdateVersionUseCase().onSuccess { + val minVersion = it.split(".").map { element -> element.toInt() } + val shouldUpdate = + currentVersion.isAtLeast( + major = minVersion[0], + minor = minVersion[1], + patch = minVersion[2] + ).not() + + reduce { + state.copy(shouldUpdate = shouldUpdate) + } + } + } } \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt new file mode 100644 index 00000000..083dd834 --- /dev/null +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt @@ -0,0 +1,10 @@ +package com.moneymong.moneymong.domain.usecase.version + +import javax.inject.Inject + +class FetchMinimumUpdateVersionUseCase @Inject constructor() { + + suspend operator fun invoke(): Result { + return Result.success("1.1.0") + } +} \ No newline at end of file From 858c07e6919ecae46d709030b674f598931f67e8 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Tue, 8 Oct 2024 17:24:30 +0900 Subject: [PATCH 2/7] =?UTF-8?q?MONEYMONG-511=20feature:=20OnStart=20?= =?UTF-8?q?=EC=83=9D=EB=AA=85=EC=A3=BC=EA=B8=B0=20=EA=B8=B0=EC=A4=80?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20Update=20=ED=99=95=EC=9D=B8=20=EB=A1=9C?= =?UTF-8?q?=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 --- app/build.gradle.kts | 7 ++- .../com/moneymong/moneymong/MainActivity.kt | 45 ++++++++++--------- .../moneymong/feature/sign/SplashScreen.kt | 5 +-- gradle/libs.versions.toml | 8 ++-- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4ae50412..e0cf4361 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,4 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties -import java.io.FileInputStream -import java.util.Properties @Suppress("DSL_SCOPE_VIOLATION") plugins { @@ -30,7 +28,7 @@ android { } buildConfigField("String", "NATIVE_APP_KEY", getApiKey("native_app_key")) } - buildFeatures{ + buildFeatures { buildConfig = true } @@ -74,6 +72,7 @@ dependencies { implementation(libs.androidx.activity.compose) implementation(libs.androidx.compose.material3) + implementation(libs.lifecycle.runtime.compose) implementation(libs.orbit.core) implementation(libs.orbit.compose) implementation(libs.orbit.viewModel) @@ -85,6 +84,6 @@ dependencies { androidTestImplementation(libs.androidx.test.espresso.core) } -fun getApiKey(propertyKey : String): String { +fun getApiKey(propertyKey: String): String { return gradleLocalProperties(rootDir).getProperty(propertyKey) } diff --git a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt index c9a08ade..4c904eac 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt @@ -1,33 +1,28 @@ package com.moneymong.moneymong import android.os.Bundle -import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState +import androidx.activity.viewModels +import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf -import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.lifecycle.compose.LifecycleStartEffect import com.moneymong.moneymong.common.event.EventTracker -import dagger.hilt.android.AndroidEntryPoint +import com.moneymong.moneymong.common.packageinfo.getVersionName import com.moneymong.moneymong.design_system.theme.MMTheme import com.moneymong.moneymong.domain.repository.TokenRepository -import com.moneymong.moneymong.domain.repository.user.UserRepository -import com.moneymong.moneymong.feature.sign.LoginScreen -import com.moneymong.moneymong.feature.sign.SignUpScreen -import com.moneymong.moneymong.ocr.OCRScreen import com.moneymong.moneymong.ui.MoneyMongApp -import kotlinx.coroutines.CoroutineDispatcher +import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.launch +import org.orbitmvi.orbit.compose.collectAsState import javax.inject.Inject -import kotlin.coroutines.CoroutineContext @AndroidEntryPoint class MainActivity : ComponentActivity() { + private val viewModel: MainViewModel by viewModels() @Inject lateinit var tokenRepository: TokenRepository @@ -41,6 +36,22 @@ class MainActivity : ComponentActivity() { eventTracker.initialize() setContent { + val context = LocalContext.current + val state by viewModel.collectAsState() + val shouldUpdate = state.shouldUpdate + val currentVersion = + with(getVersionName(context).split(".").map { element -> element.toInt() }) { + KotlinVersion( + major = this[0], + minor = this[1], + patch = this[2] + ) + } + LifecycleStartEffect(key1 = Unit) { + viewModel.checkShouldUpdate(currentVersion = currentVersion) + onStopOrDispose {} + } + MMTheme { MoneyMongApp(expired.value) { expired.value = false @@ -54,12 +65,4 @@ class MainActivity : ComponentActivity() { } } } -} - -@Composable -fun Greeting(name: String, modifier: Modifier = Modifier) { - Text( - text = "Hello $name!", - modifier = modifier - ) } \ No newline at end of file diff --git a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SplashScreen.kt b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SplashScreen.kt index 00b9bb2b..d6bc8f4c 100644 --- a/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SplashScreen.kt +++ b/feature/sign/src/main/java/com/moneymong/moneymong/feature/sign/SplashScreen.kt @@ -1,6 +1,5 @@ package com.moneymong.moneymong.feature.sign -import android.util.Log import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.tween import androidx.compose.foundation.Image @@ -34,9 +33,9 @@ fun SplashScreen( val state = viewModel.collectAsState().value LaunchedEffect(key1 = state.isTokenValid) { - if (state.isTokenValid == true ) { + if (state.isTokenValid == true) { navigateToLedger() - } else if(state.isTokenValid == false ) { + } else if (state.isTokenValid == false) { navigateToLogin() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4bfe10cf..cf73830e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,6 @@ androidxActivity = "1.8.0" androidxFragment = "1.5.5" androidxKtx = "1.9.0" androidxRuntimeKtx = "2.6.1" -androidxLifecycle = "2.6.1" androidxComposeBom = "2023.10.01" androidxComposeCompiler = "1.5.3" androidxComposeMaterial = "1.3.1" @@ -36,7 +35,7 @@ retrofit = "2.9.0" secretsGradlePlugin = "2.0.1" appcompat = "1.6.1" material = "1.10.0" -lifecycle-runtime-ktx = "2.6.2" +lifecycle = "2.8.6" constraintlayout = "2.1.4" paging = "3.2.1" kakao-sdk = "2.20.3" @@ -62,7 +61,7 @@ androidx-core-fragment = { group = "androidx.fragment", name = "fragment-ktx", v androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxKtx" } androidx-datastore = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDatastore" } androidx-datastore-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "androidxDatastore" } -androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "androidxLifecycle" } +androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycle" } androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" } androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidxEspresso" } chucker-debug = { group = "com.github.chuckerteam.chucker", name = "library", version.ref = "chucker-android" } @@ -94,7 +93,8 @@ ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devto androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxJunit" } appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } -lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" } +lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" } +lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycle" } ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } From bde4df670dbc620d12981ab04df0d9d3c94cd2fd Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 20 Oct 2024 21:25:24 +0900 Subject: [PATCH 3/7] =?UTF-8?q?MONEYMONG-511=20feature:=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=EA=B0=80=20=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EA=B2=BD=EC=9A=B0=20dialog=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EC=99=80=20=ED=95=A8=EA=BB=98=20play=20store=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=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 --- .../com/moneymong/moneymong/MainActivity.kt | 35 ++++++++++++------- .../com/moneymong/moneymong/MainViewModel.kt | 22 ++++-------- .../design_system/error/ErrorDialog.kt | 5 +-- .../version/CheckVersionUpdateUseCase.kt | 11 ++++++ .../FetchMinimumUpdateVersionUseCase.kt | 10 ------ 5 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt delete mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt diff --git a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt index 4c904eac..1eb767fd 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt @@ -1,5 +1,7 @@ package com.moneymong.moneymong +import android.content.Intent +import android.net.Uri import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent @@ -9,7 +11,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.ui.platform.LocalContext import androidx.lifecycle.compose.LifecycleStartEffect import com.moneymong.moneymong.common.event.EventTracker -import com.moneymong.moneymong.common.packageinfo.getVersionName +import com.moneymong.moneymong.design_system.error.ErrorDialog import com.moneymong.moneymong.design_system.theme.MMTheme import com.moneymong.moneymong.domain.repository.TokenRepository import com.moneymong.moneymong.ui.MoneyMongApp @@ -38,21 +40,30 @@ class MainActivity : ComponentActivity() { setContent { val context = LocalContext.current val state by viewModel.collectAsState() + val shouldUpdate = state.shouldUpdate - val currentVersion = - with(getVersionName(context).split(".").map { element -> element.toInt() }) { - KotlinVersion( - major = this[0], - minor = this[1], - patch = this[2] + LifecycleStartEffect(key1 = Unit, effects = { + viewModel.checkShouldUpdate(version = BuildConfig.VERSION_NAME) + onStopOrDispose { } + }) + + MMTheme { + if (shouldUpdate) { + ErrorDialog( + message = "안정적인 머니몽 사용을 위해\n최신 버전으로 업데이트가 필요해요!", + confirmText = "업데이트", + onConfirm = { + val playStoreUrl = + "https://play.google.com/store/apps/details?id=${BuildConfig.APPLICATION_ID}" + val intent = Intent(Intent.ACTION_VIEW).apply { + data = Uri.parse(playStoreUrl) + setPackage("com.android.vending") + } + context.startActivity(intent) + } ) } - LifecycleStartEffect(key1 = Unit) { - viewModel.checkShouldUpdate(currentVersion = currentVersion) - onStopOrDispose {} - } - MMTheme { MoneyMongApp(expired.value) { expired.value = false } diff --git a/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt b/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt index 9f50fdcb..98c163c6 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainViewModel.kt @@ -1,7 +1,7 @@ package com.moneymong.moneymong import com.moneymong.moneymong.common.base.BaseViewModel -import com.moneymong.moneymong.domain.usecase.version.FetchMinimumUpdateVersionUseCase +import com.moneymong.moneymong.domain.usecase.version.CheckVersionUpdateUseCase import dagger.hilt.android.lifecycle.HiltViewModel import org.orbitmvi.orbit.syntax.simple.intent import org.orbitmvi.orbit.syntax.simple.reduce @@ -9,22 +9,14 @@ import javax.inject.Inject @HiltViewModel class MainViewModel @Inject constructor( - val fetchMinimumUpdateVersionUseCase: FetchMinimumUpdateVersionUseCase + val checkVersionUpdateUseCase: CheckVersionUpdateUseCase ) : BaseViewModel(MainState()) { - fun checkShouldUpdate(currentVersion: KotlinVersion) = intent { - fetchMinimumUpdateVersionUseCase().onSuccess { - val minVersion = it.split(".").map { element -> element.toInt() } - val shouldUpdate = - currentVersion.isAtLeast( - major = minVersion[0], - minor = minVersion[1], - patch = minVersion[2] - ).not() - - reduce { - state.copy(shouldUpdate = shouldUpdate) - } + fun checkShouldUpdate(version: String) = intent { + val shouldUpdate = + checkVersionUpdateUseCase(version = version).isFailure + reduce { + state.copy(shouldUpdate = shouldUpdate) } } } \ No newline at end of file diff --git a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/error/ErrorDialog.kt b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/error/ErrorDialog.kt index 57300d88..67de4534 100644 --- a/core/design-system/src/main/java/com/moneymong/moneymong/design_system/error/ErrorDialog.kt +++ b/core/design-system/src/main/java/com/moneymong/moneymong/design_system/error/ErrorDialog.kt @@ -44,7 +44,8 @@ fun ErrorDialog( modifier: Modifier = Modifier, message: String, description: String = "", - onConfirm: () -> Unit + confirmText: String = "확인", + onConfirm: () -> Unit, ) { val horizontalPadding = 22.dp val buttonWidth = 276.dp @@ -93,7 +94,7 @@ fun ErrorDialog( MDSButton( modifier = Modifier.width(buttonWidth), onClick = onConfirm, - text = "확인", + text = confirmText, type = MDSButtonType.PRIMARY, size = MDSButtonSize.LARGE, ) diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt new file mode 100644 index 00000000..7184d42d --- /dev/null +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt @@ -0,0 +1,11 @@ +package com.moneymong.moneymong.domain.usecase.version + +import javax.inject.Inject + +class CheckVersionUpdateUseCase @Inject constructor() { + + suspend operator fun invoke(version: String): Result { +// return Result.success("1.1.0") + return Result.failure(Throwable("1.1.0")) + } +} \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt deleted file mode 100644 index 083dd834..00000000 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/FetchMinimumUpdateVersionUseCase.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.moneymong.moneymong.domain.usecase.version - -import javax.inject.Inject - -class FetchMinimumUpdateVersionUseCase @Inject constructor() { - - suspend operator fun invoke(): Result { - return Result.success("1.1.0") - } -} \ No newline at end of file From 5647bb0eb2bff17bc407e27ce3642e92e19d4f88 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Sun, 20 Oct 2024 22:30:46 +0900 Subject: [PATCH 4/7] =?UTF-8?q?MONEYMONG-511=20feature:=20VersionUpdate=20?= =?UTF-8?q?domain,=20data=20Layer=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/moneymong/moneymong/MainActivity.kt | 2 +- .../moneymong/network/api/VersionApi.kt | 12 +++++++++++ .../moneymong/network/di/NetworkModule.kt | 5 +++++ .../moneymong/network/util/AuthInterceptor.kt | 2 +- .../util/MoneyMongTokenAuthenticator.kt | 2 +- .../version/VersionRemoteDataSource.kt | 6 ++++++ .../version/VersionRemoteDataSourceImpl.kt | 12 +++++++++++ .../moneymong/data/di/DataSourceModule.kt | 7 +++++++ .../moneymong/data/di/RepositoryModule.kt | 21 ++++++++++++------- .../repository/agency/AgencyRepositoryImpl.kt | 2 +- .../repository/signup/UnivRepositoryImpl.kt | 2 +- .../repository/token/TokenRepositoryImpl.kt | 2 +- .../version/VersionRepositoryImpl.kt | 14 +++++++++++++ .../{ => agency}/AgencyRepository.kt | 2 +- .../repository/{ => token}/TokenRepository.kt | 2 +- .../repository/{ => univ}/UnivRepository.kt | 2 +- .../repository/version/VersionRepository.kt | 5 +++++ .../usecase/agency/AgencyJoinUseCase.kt | 2 +- .../usecase/agency/FetchAgencyIdUseCase.kt | 2 +- .../agency/FetchMyAgencyListUseCase.kt | 2 +- .../usecase/agency/GetAgenciesUseCase.kt | 2 +- .../usecase/agency/RegisterAgencyUseCase.kt | 2 +- .../usecase/agency/SaveAgencyIdUseCase.kt | 2 +- .../usecase/signup/SchoolInfoUseCase.kt | 2 +- .../usecase/token/PostAccessTokenUseCase.kt | 2 +- .../domain/usecase/token/TokenUseCase.kt | 2 +- .../university/CreateUniveristyUseCase.kt | 2 +- .../university/FetchMyUniversityUseCase.kt | 2 +- .../university/SearchUniversityUseCase.kt | 2 +- .../version/CheckVersionUpdateUseCase.kt | 8 ++++--- 30 files changed, 101 insertions(+), 31 deletions(-) create mode 100644 core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt create mode 100644 data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt create mode 100644 data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt create mode 100644 data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt rename domain/src/main/java/com/moneymong/moneymong/domain/repository/{ => agency}/AgencyRepository.kt (93%) rename domain/src/main/java/com/moneymong/moneymong/domain/repository/{ => token}/TokenRepository.kt (95%) rename domain/src/main/java/com/moneymong/moneymong/domain/repository/{ => univ}/UnivRepository.kt (89%) create mode 100644 domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt diff --git a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt index 1eb767fd..5691b777 100644 --- a/app/src/main/java/com/moneymong/moneymong/MainActivity.kt +++ b/app/src/main/java/com/moneymong/moneymong/MainActivity.kt @@ -13,7 +13,7 @@ import androidx.lifecycle.compose.LifecycleStartEffect import com.moneymong.moneymong.common.event.EventTracker import com.moneymong.moneymong.design_system.error.ErrorDialog import com.moneymong.moneymong.design_system.theme.MMTheme -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import com.moneymong.moneymong.ui.MoneyMongApp import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt new file mode 100644 index 00000000..5d94c270 --- /dev/null +++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt @@ -0,0 +1,12 @@ +package com.moneymong.moneymong.network.api + +import retrofit2.http.Body +import retrofit2.http.POST + +interface VersionApi { + + @POST("api/v1/version") + suspend fun checkUpdate( + @Body version: String + ): Result +} \ 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 683c179a..b73dc026 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 @@ -17,6 +17,7 @@ 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.api.VersionApi import com.moneymong.moneymong.network.util.AuthInterceptor import com.moneymong.moneymong.network.util.MoneyMongTokenAuthenticator import dagger.Module @@ -143,6 +144,10 @@ object NetworkModule { fun provideMemberApi(@MoneyMongRetrofit retrofit: Retrofit): MemberApi = retrofit.create(MemberApi::class.java) + @Provides + fun provideVersionApi(@MoneyMongRetrofit retrofit: Retrofit): VersionApi = + retrofit.create(VersionApi::class.java) + @Provides fun provideClovaApi(@ClovaRetrofit retrofit: Retrofit): ClovaApi = retrofit.create(ClovaApi::class.java) 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 924232e0..bfc94d2d 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,6 @@ package com.moneymong.moneymong.network.util -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import com.moneymong.moneymong.network.BuildConfig import kotlinx.coroutines.runBlocking import okhttp3.Interceptor diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/util/MoneyMongTokenAuthenticator.kt b/core/network/src/main/java/com/moneymong/moneymong/network/util/MoneyMongTokenAuthenticator.kt index ed06a406..24123b6e 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/util/MoneyMongTokenAuthenticator.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/util/MoneyMongTokenAuthenticator.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.network.util -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import com.moneymong.moneymong.network.BuildConfig import kotlinx.coroutines.runBlocking import okhttp3.Authenticator diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt new file mode 100644 index 00000000..cf6e4225 --- /dev/null +++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt @@ -0,0 +1,6 @@ +package com.moneymong.moneymong.data.datasource.version + +interface VersionRemoteDataSource { + + suspend fun checkUpdate(version: String): Result +} \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt new file mode 100644 index 00000000..1cc89b19 --- /dev/null +++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt @@ -0,0 +1,12 @@ +package com.moneymong.moneymong.data.datasource.version + +import com.moneymong.moneymong.network.api.VersionApi +import javax.inject.Inject + +class VersionRemoteDataSourceImpl @Inject constructor( + private val versionApi: VersionApi +) : VersionRemoteDataSource { + override suspend fun checkUpdate(version: String): Result { + return versionApi.checkUpdate(version) + } +} \ No newline at end of file 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 65ac8784..958c058d 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 @@ -24,6 +24,8 @@ import com.moneymong.moneymong.data.datasource.user.UserLocalDataSource import com.moneymong.moneymong.data.datasource.user.UserLocalDataSourceImpl import com.moneymong.moneymong.data.datasource.user.UserRemoteDataSource import com.moneymong.moneymong.data.datasource.user.UserRemoteDataSourceImpl +import com.moneymong.moneymong.data.datasource.version.VersionRemoteDataSource +import com.moneymong.moneymong.data.datasource.version.VersionRemoteDataSourceImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -92,4 +94,9 @@ interface DataSourceModule { fun bindLedgerDetailRemoteDataSource( ledgerDetailRemoteDataSourceImpl: LedgerDetailRemoteDataSourceImpl ): LedgerDetailRemoteDataSource + + @Binds + fun bindVersionRemoteDataSource( + versionRemoteDataSourceImpl: VersionRemoteDataSourceImpl + ): VersionRemoteDataSource } \ No newline at end of file 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 911bffe9..512fcdcd 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 @@ -8,14 +8,16 @@ 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.data.repository.version.VersionRepositoryImpl +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.domain.repository.ledger.LedgerRepository import com.moneymong.moneymong.domain.repository.ledgerdetail.LedgerDetailRepository import com.moneymong.moneymong.domain.repository.member.MemberRepository import com.moneymong.moneymong.domain.repository.ocr.OCRRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository +import com.moneymong.moneymong.domain.repository.univ.UnivRepository import com.moneymong.moneymong.domain.repository.user.UserRepository +import com.moneymong.moneymong.domain.repository.version.VersionRepository import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -48,22 +50,27 @@ interface RepositoryModule { ): UserRepository @Binds - fun provideOCRRepository( + fun bindOCRRepository( ocrRepositoryImpl: OCRRepositoryImpl ): OCRRepository @Binds - fun provideLedgerRepository( + fun bindLedgerRepository( ledgerRepositoryImpl: LedgerRepositoryImpl ): LedgerRepository @Binds - fun provideLedgerDetailRepository( + fun bindLedgerDetailRepository( ledgerDetailRepositoryImpl: LedgerDetailRepositoryImpl ): LedgerDetailRepository @Binds - fun provideMemberRepository( + fun bindMemberRepository( memberRepositoryImpl: MemberRepositoryImpl ): MemberRepository + + @Binds + fun bindVersionRepository( + versionRepositoryImpl: VersionRepositoryImpl + ): VersionRepository } \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/agency/AgencyRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/agency/AgencyRepositoryImpl.kt index d350b5dd..225ea34b 100644 --- a/data/src/main/java/com/moneymong/moneymong/data/repository/agency/AgencyRepositoryImpl.kt +++ b/data/src/main/java/com/moneymong/moneymong/data/repository/agency/AgencyRepositoryImpl.kt @@ -6,7 +6,7 @@ import androidx.paging.PagingData import com.moneymong.moneymong.data.datasource.agency.AgencyLocalDataSource import com.moneymong.moneymong.data.datasource.agency.AgencyRemoteDataSource import com.moneymong.moneymong.data.pagingsource.AgencyPagingSource -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.model.agency.AgencyGetResponse import com.moneymong.moneymong.model.agency.AgencyJoinRequest import com.moneymong.moneymong.model.agency.AgencyJoinResponse 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 7c5fb33d..7c885b53 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 @@ -1,7 +1,7 @@ package com.moneymong.moneymong.data.repository.signup import com.moneymong.moneymong.data.datasource.signup.UnivRemoteDataSource -import com.moneymong.moneymong.domain.repository.UnivRepository +import com.moneymong.moneymong.domain.repository.univ.UnivRepository import com.moneymong.moneymong.model.sign.SearchQueryRequest import com.moneymong.moneymong.model.sign.UnivRequest import com.moneymong.moneymong.model.sign.UnivResponse 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 2694d89f..56f222ff 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 @@ -2,7 +2,7 @@ package com.moneymong.moneymong.data.repository.token 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.domain.repository.token.TokenRepository import com.moneymong.moneymong.model.sign.LoginType import com.moneymong.moneymong.model.sign.RefreshTokenRequest import com.moneymong.moneymong.model.sign.RefreshTokenResponse diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt new file mode 100644 index 00000000..dbd5b275 --- /dev/null +++ b/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt @@ -0,0 +1,14 @@ +package com.moneymong.moneymong.data.repository.version + +import com.moneymong.moneymong.data.datasource.version.VersionRemoteDataSource +import com.moneymong.moneymong.domain.repository.version.VersionRepository +import javax.inject.Inject + +class VersionRepositoryImpl @Inject constructor( + private val versionRemoteDataSource: VersionRemoteDataSource +) : VersionRepository { + + override suspend fun checkUpdate(version: String): Result { + return versionRemoteDataSource.checkUpdate(version = version) + } +} \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/AgencyRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/agency/AgencyRepository.kt similarity index 93% rename from domain/src/main/java/com/moneymong/moneymong/domain/repository/AgencyRepository.kt rename to domain/src/main/java/com/moneymong/moneymong/domain/repository/agency/AgencyRepository.kt index 9812c479..1515676b 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/AgencyRepository.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/agency/AgencyRepository.kt @@ -1,4 +1,4 @@ -package com.moneymong.moneymong.domain.repository +package com.moneymong.moneymong.domain.repository.agency import androidx.paging.PagingData import com.moneymong.moneymong.model.agency.AgencyGetResponse diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/token/TokenRepository.kt similarity index 95% rename from domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt rename to domain/src/main/java/com/moneymong/moneymong/domain/repository/token/TokenRepository.kt index ca1e7464..2dec49e2 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/TokenRepository.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/token/TokenRepository.kt @@ -1,4 +1,4 @@ -package com.moneymong.moneymong.domain.repository +package com.moneymong.moneymong.domain.repository.token import com.moneymong.moneymong.model.sign.LoginType import com.moneymong.moneymong.model.sign.RefreshTokenRequest diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/univ/UnivRepository.kt similarity index 89% rename from domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt rename to domain/src/main/java/com/moneymong/moneymong/domain/repository/univ/UnivRepository.kt index fadba50c..2e94a323 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/UnivRepository.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/univ/UnivRepository.kt @@ -1,4 +1,4 @@ -package com.moneymong.moneymong.domain.repository +package com.moneymong.moneymong.domain.repository.univ import com.moneymong.moneymong.model.sign.SearchQueryRequest import com.moneymong.moneymong.model.sign.UnivRequest diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt new file mode 100644 index 00000000..73498e36 --- /dev/null +++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt @@ -0,0 +1,5 @@ +package com.moneymong.moneymong.domain.repository.version + +interface VersionRepository { + suspend fun checkUpdate(version: String): Result +} \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/AgencyJoinUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/AgencyJoinUseCase.kt index eec9217c..3fab295c 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/AgencyJoinUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/AgencyJoinUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.agency -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.model.agency.AgencyJoinRequest import com.moneymong.moneymong.model.agency.AgencyJoinResponse import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchAgencyIdUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchAgencyIdUseCase.kt index 820eccb8..e6ea9313 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchAgencyIdUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchAgencyIdUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.agency -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import javax.inject.Inject class FetchAgencyIdUseCase @Inject constructor( diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchMyAgencyListUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchMyAgencyListUseCase.kt index c4970f9b..4ffe07f5 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchMyAgencyListUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/FetchMyAgencyListUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.agency -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.model.agency.MyAgencyResponse import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/GetAgenciesUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/GetAgenciesUseCase.kt index c704a206..ef420be5 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/GetAgenciesUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/GetAgenciesUseCase.kt @@ -1,7 +1,7 @@ package com.moneymong.moneymong.domain.usecase.agency import androidx.paging.PagingData -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.model.agency.AgencyGetResponse import kotlinx.coroutines.flow.Flow import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/RegisterAgencyUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/RegisterAgencyUseCase.kt index 7da92b1a..d8161cab 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/RegisterAgencyUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/RegisterAgencyUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.agency -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import com.moneymong.moneymong.model.agency.AgencyRegisterRequest import com.moneymong.moneymong.model.agency.RegisterAgencyResponse import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/SaveAgencyIdUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/SaveAgencyIdUseCase.kt index b2d30f30..28821b98 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/SaveAgencyIdUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/agency/SaveAgencyIdUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.agency -import com.moneymong.moneymong.domain.repository.AgencyRepository +import com.moneymong.moneymong.domain.repository.agency.AgencyRepository import javax.inject.Inject class SaveAgencyIdUseCase @Inject constructor( 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 49c0c685..1f0956e1 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 @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.signup -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import javax.inject.Inject class SchoolInfoUseCase @Inject constructor( diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt index a0955c18..23ebbe7a 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/PostAccessTokenUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.token -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import com.moneymong.moneymong.domain.repository.user.UserRepository import com.moneymong.moneymong.model.sign.LoginType import com.moneymong.moneymong.model.sign.TokenResponse diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt index 7aafbe6d..4a2009a8 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/token/TokenUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.token -import com.moneymong.moneymong.domain.repository.TokenRepository +import com.moneymong.moneymong.domain.repository.token.TokenRepository import com.moneymong.moneymong.model.sign.UserDataStoreInfoResponse import javax.inject.Inject 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 index 6e474301..16560051 100644 --- 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 @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.university -import com.moneymong.moneymong.domain.repository.UnivRepository +import com.moneymong.moneymong.domain.repository.univ.UnivRepository import com.moneymong.moneymong.model.sign.UnivRequest import javax.inject.Inject 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 index e4145337..deec9d28 100644 --- 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 @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.university -import com.moneymong.moneymong.domain.repository.UnivRepository +import com.moneymong.moneymong.domain.repository.univ.UnivRepository import com.moneymong.moneymong.model.sign.UnivResponse import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt index 2247bc43..5089a1a3 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/university/SearchUniversityUseCase.kt @@ -1,6 +1,6 @@ package com.moneymong.moneymong.domain.usecase.university -import com.moneymong.moneymong.domain.repository.UnivRepository +import com.moneymong.moneymong.domain.repository.univ.UnivRepository import com.moneymong.moneymong.model.sign.SearchQueryRequest import com.moneymong.moneymong.model.sign.UniversitiesResponse import javax.inject.Inject diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt index 7184d42d..5cddf435 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt @@ -1,11 +1,13 @@ package com.moneymong.moneymong.domain.usecase.version +import com.moneymong.moneymong.domain.repository.version.VersionRepository import javax.inject.Inject -class CheckVersionUpdateUseCase @Inject constructor() { +class CheckVersionUpdateUseCase @Inject constructor( + private val versionRepository: VersionRepository +) { suspend operator fun invoke(version: String): Result { -// return Result.success("1.1.0") - return Result.failure(Throwable("1.1.0")) + return versionRepository.checkUpdate(version = version) } } \ No newline at end of file From 9efe6de849126652f7dbaf98dc0068084c93f2a1 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Tue, 22 Oct 2024 21:46:09 +0900 Subject: [PATCH 5/7] =?UTF-8?q?MONEYMONG-511=20feature:=20Compose=20Versio?= =?UTF-8?q?n=20Up,=20Authorization=20accessToken=20null=20=EC=9D=BC=20?= =?UTF-8?q?=EB=95=8C=20value=20=EA=B0=92=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneymong/model/version/VersionRequest.kt | 5 +++++ .../moneymong/network/api/MoneyMongApi.kt | 2 +- .../moneymong/network/api/VersionApi.kt | 3 ++- .../moneymong/network/util/AuthInterceptor.kt | 8 +++++--- .../moneymong/moneymong/ui/RippleEffect.kt | 19 ------------------- .../version/VersionRemoteDataSourceImpl.kt | 3 ++- .../ledger/view/LedgerAgencyEmptyView.kt | 6 +++++- .../onboarding/LedgerOnboardingAddPage.kt | 7 ++++--- gradle/libs.versions.toml | 2 +- 9 files changed, 25 insertions(+), 30 deletions(-) create mode 100644 core/model/src/main/java/com/moneymong/moneymong/model/version/VersionRequest.kt delete mode 100644 core/ui/src/main/java/com/moneymong/moneymong/ui/RippleEffect.kt diff --git a/core/model/src/main/java/com/moneymong/moneymong/model/version/VersionRequest.kt b/core/model/src/main/java/com/moneymong/moneymong/model/version/VersionRequest.kt new file mode 100644 index 00000000..db626795 --- /dev/null +++ b/core/model/src/main/java/com/moneymong/moneymong/model/version/VersionRequest.kt @@ -0,0 +1,5 @@ +package com.moneymong.moneymong.model.version + +data class VersionRequest( + val version: String +) \ No newline at end of file diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/MoneyMongApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/MoneyMongApi.kt index ff7f9798..e6519991 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/api/MoneyMongApi.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/MoneyMongApi.kt @@ -3,8 +3,8 @@ package com.moneymong.moneymong.network.api import com.moneymong.moneymong.model.ocr.FileUploadResponse import okhttp3.MultipartBody import retrofit2.http.Multipart -import retrofit2.http.Part import retrofit2.http.POST +import retrofit2.http.Part interface MoneyMongApi { diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt index 5d94c270..488b305c 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt @@ -1,5 +1,6 @@ package com.moneymong.moneymong.network.api +import com.moneymong.moneymong.model.version.VersionRequest import retrofit2.http.Body import retrofit2.http.POST @@ -7,6 +8,6 @@ interface VersionApi { @POST("api/v1/version") suspend fun checkUpdate( - @Body version: String + @Body version: VersionRequest ): Result } \ No newline at end of file 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 bfc94d2d..06193943 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 @@ -24,9 +24,11 @@ class AuthInterceptor @Inject constructor( tokenRepository.getAccessToken() } - val newRequest = originalRequest.newBuilder() - .addHeader("Authorization", "Bearer ${accessToken.getOrNull()}") - .build() + val newRequest = originalRequest.newBuilder().apply { + accessToken.getOrNull()?.let { + addHeader("Authorization", "Bearer $it") + } ?: addHeader("Authorization", "null") + }.build() return chain.proceed(newRequest) } diff --git a/core/ui/src/main/java/com/moneymong/moneymong/ui/RippleEffect.kt b/core/ui/src/main/java/com/moneymong/moneymong/ui/RippleEffect.kt deleted file mode 100644 index 39161fb8..00000000 --- a/core/ui/src/main/java/com/moneymong/moneymong/ui/RippleEffect.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.moneymong.moneymong.ui - -import androidx.compose.material.ripple.RippleAlpha -import androidx.compose.material.ripple.RippleTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -object NoRippleTheme : RippleTheme { - @Composable - override fun defaultColor() = Color.Unspecified - - @Composable - override fun rippleAlpha(): RippleAlpha = RippleAlpha( - draggedAlpha = 0.0f, - focusedAlpha = 0.0f, - hoveredAlpha = 0.0f, - pressedAlpha = 0.0f - ) -} \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt index 1cc89b19..084d4c60 100644 --- a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt @@ -1,5 +1,6 @@ package com.moneymong.moneymong.data.datasource.version +import com.moneymong.moneymong.model.version.VersionRequest import com.moneymong.moneymong.network.api.VersionApi import javax.inject.Inject @@ -7,6 +8,6 @@ class VersionRemoteDataSourceImpl @Inject constructor( private val versionApi: VersionApi ) : VersionRemoteDataSource { override suspend fun checkUpdate(version: String): Result { - return versionApi.checkUpdate(version) + return versionApi.checkUpdate(VersionRequest(version = version)) } } \ No newline at end of file diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/LedgerAgencyEmptyView.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/LedgerAgencyEmptyView.kt index c9298ef1..32c3f681 100644 --- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/LedgerAgencyEmptyView.kt +++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/LedgerAgencyEmptyView.kt @@ -1,6 +1,7 @@ package com.moneymong.moneymong.ledger.view 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.Spacer @@ -20,6 +21,7 @@ import com.moneymong.moneymong.design_system.component.button.MDSButtonSize import com.moneymong.moneymong.design_system.component.button.MDSButtonType import com.moneymong.moneymong.design_system.theme.Body4 import com.moneymong.moneymong.design_system.theme.Gray08 +import com.moneymong.moneymong.design_system.theme.White import com.moneymong.moneymong.ledger.R @Composable @@ -28,7 +30,9 @@ fun LedgerAgencyEmptyView( onClickFindAgency: () -> Unit ) { Column( - modifier = modifier.fillMaxSize(), + modifier = modifier + .fillMaxSize() + .background(color = White), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { diff --git a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboardingAddPage.kt b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboardingAddPage.kt index 0e548d0c..e7e93b12 100644 --- a/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboardingAddPage.kt +++ b/feature/ledger/src/main/java/com/moneymong/moneymong/ledger/view/onboarding/LedgerOnboardingAddPage.kt @@ -7,7 +7,8 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.ripple.LocalRippleTheme +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.LocalRippleConfiguration import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Alignment @@ -18,9 +19,9 @@ import androidx.compose.ui.unit.dp import com.moneymong.moneymong.design_system.R import com.moneymong.moneymong.design_system.component.button.MDSFloatingActionButton import com.moneymong.moneymong.design_system.theme.Mint03 -import com.moneymong.moneymong.ui.NoRippleTheme import com.moneymong.moneymong.ui.pxToDp +@OptIn(ExperimentalMaterial3Api::class) @Composable internal fun LedgerOnboardingAddPage( modifier: Modifier = Modifier, @@ -48,7 +49,7 @@ internal fun LedgerOnboardingAddPage( horizontalArrowPosition = HorizontalArrowPosition.END ) - CompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) { + CompositionLocalProvider(LocalRippleConfiguration provides null) { MDSFloatingActionButton( modifier = Modifier .size( diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cf73830e..0843f6f5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ androidxActivity = "1.8.0" androidxFragment = "1.5.5" androidxKtx = "1.9.0" androidxRuntimeKtx = "2.6.1" -androidxComposeBom = "2023.10.01" +androidxComposeBom = "2024.10.00" androidxComposeCompiler = "1.5.3" androidxComposeMaterial = "1.3.1" androidxComposeMaterial3 = "1.1.0-alpha07" From 5b22f1850c6436bf261be91dc8d9b825f1e7d283 Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Tue, 22 Oct 2024 22:37:13 +0900 Subject: [PATCH 6/7] =?UTF-8?q?MONEYMONG-511=20feature:=20ResultCallAdapte?= =?UTF-8?q?r=20=EC=97=90=EC=84=9C=20=EC=98=88=EC=83=81=EC=B9=98=20?= =?UTF-8?q?=EB=AA=BB=ED=95=9C=20=EC=97=90=EB=9F=AC=20=EC=8A=A4=ED=8E=99?= =?UTF-8?q?=EC=9D=BC=20=EB=95=8C=EB=A5=BC=20=EB=8C=80=EB=B9=84=ED=95=B4?= =?UTF-8?q?=EC=84=9C=20try=20catch=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../network/adapter/ResultCallAdapter.kt | 16 ++++++++++------ .../moneymong/network/response/ErrorResponse.kt | 1 - 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/adapter/ResultCallAdapter.kt b/core/network/src/main/java/com/moneymong/moneymong/network/adapter/ResultCallAdapter.kt index 0bd65743..eaf09456 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/adapter/ResultCallAdapter.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/adapter/ResultCallAdapter.kt @@ -48,12 +48,16 @@ private class ResultCall( return Result.failure(MoneyMongError.UnExpectedError) } - val errorResponse = fromJsonToErrorResponse(errorBody) - val httpError = getErrorByStatusCode( - statusCode = errorResponse.status, - message = errorResponse.message - ) - return Result.failure(httpError) + return try { + val errorResponse = fromJsonToErrorResponse(errorBody) + val httpError = getErrorByStatusCode( + statusCode = errorResponse.status, + message = errorResponse.message + ) + Result.failure(httpError) + } catch (e: Exception) { + Result.failure(MoneyMongError.UnExpectedError) + } } override fun onFailure(call: Call, t: Throwable) { diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/response/ErrorResponse.kt b/core/network/src/main/java/com/moneymong/moneymong/network/response/ErrorResponse.kt index 0e070acb..51b304fd 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/response/ErrorResponse.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/response/ErrorResponse.kt @@ -1,7 +1,6 @@ package com.moneymong.moneymong.network.response import com.google.gson.Gson -import com.google.gson.annotations.SerializedName data class ErrorResponse( val status: Int, From 964c26e67e47bd9e79588204721acc467dd9739a Mon Sep 17 00:00:00 2001 From: jhg3410 Date: Tue, 22 Oct 2024 23:01:56 +0900 Subject: [PATCH 7/7] =?UTF-8?q?MONEYMONG-511=20feature:=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20API=20=EB=B0=98=ED=99=98=EA=B0=92=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD(String=20->=20Unit)=20=EC=84=B1=EA=B3=B5,=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=EB=A1=9C=20=EB=82=98=EB=89=98=EC=96=B4=EC=84=9C=20?= =?UTF-8?q?=EB=AC=B4=EC=9D=98=EB=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/moneymong/moneymong/network/api/VersionApi.kt | 2 +- .../data/datasource/version/VersionRemoteDataSource.kt | 2 +- .../data/datasource/version/VersionRemoteDataSourceImpl.kt | 2 +- .../moneymong/data/repository/version/VersionRepositoryImpl.kt | 2 +- .../moneymong/domain/repository/version/VersionRepository.kt | 2 +- .../domain/usecase/version/CheckVersionUpdateUseCase.kt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt index 488b305c..b709d84a 100644 --- a/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt +++ b/core/network/src/main/java/com/moneymong/moneymong/network/api/VersionApi.kt @@ -9,5 +9,5 @@ interface VersionApi { @POST("api/v1/version") suspend fun checkUpdate( @Body version: VersionRequest - ): Result + ): Result } \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt index cf6e4225..ebc32476 100644 --- a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt +++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSource.kt @@ -2,5 +2,5 @@ package com.moneymong.moneymong.data.datasource.version interface VersionRemoteDataSource { - suspend fun checkUpdate(version: String): Result + suspend fun checkUpdate(version: String): Result } \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt index 084d4c60..847feef0 100644 --- a/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/moneymong/moneymong/data/datasource/version/VersionRemoteDataSourceImpl.kt @@ -7,7 +7,7 @@ import javax.inject.Inject class VersionRemoteDataSourceImpl @Inject constructor( private val versionApi: VersionApi ) : VersionRemoteDataSource { - override suspend fun checkUpdate(version: String): Result { + override suspend fun checkUpdate(version: String): Result { return versionApi.checkUpdate(VersionRequest(version = version)) } } \ No newline at end of file diff --git a/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt b/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt index dbd5b275..c052a8ac 100644 --- a/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt +++ b/data/src/main/java/com/moneymong/moneymong/data/repository/version/VersionRepositoryImpl.kt @@ -8,7 +8,7 @@ class VersionRepositoryImpl @Inject constructor( private val versionRemoteDataSource: VersionRemoteDataSource ) : VersionRepository { - override suspend fun checkUpdate(version: String): Result { + override suspend fun checkUpdate(version: String): Result { return versionRemoteDataSource.checkUpdate(version = version) } } \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt b/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt index 73498e36..bae12785 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/repository/version/VersionRepository.kt @@ -1,5 +1,5 @@ package com.moneymong.moneymong.domain.repository.version interface VersionRepository { - suspend fun checkUpdate(version: String): Result + suspend fun checkUpdate(version: String): Result } \ No newline at end of file diff --git a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt index 5cddf435..f2f96b75 100644 --- a/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt +++ b/domain/src/main/java/com/moneymong/moneymong/domain/usecase/version/CheckVersionUpdateUseCase.kt @@ -7,7 +7,7 @@ class CheckVersionUpdateUseCase @Inject constructor( private val versionRepository: VersionRepository ) { - suspend operator fun invoke(version: String): Result { + suspend operator fun invoke(version: String): Result { return versionRepository.checkUpdate(version = version) } } \ No newline at end of file