From 0ebb8fc2a9b46e0e8b413ec1d0dcefa323fa41a2 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Thu, 5 Dec 2024 00:39:49 +0900 Subject: [PATCH 01/26] chore #13: move component to presentation layer --- .../org/sopt/and/{ => feature}/component/AuthTextField.kt | 2 +- .../org/sopt/and/{ => feature}/component/EventContent.kt | 2 +- .../org/sopt/and/{ => feature}/component/ExpandedButton.kt | 2 +- .../org/sopt/and/{ => feature}/component/HistoryContent.kt | 2 +- .../org/sopt/and/{ => feature}/component/HomeContent.kt | 2 +- .../org/sopt/and/{ => feature}/component/RoundedButton.kt | 2 +- .../java/org/sopt/and/{ => feature}/component/TopBar.kt | 2 +- app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt | 4 ++-- app/src/main/java/org/sopt/and/feature/my/MyRoute.kt | 4 ++-- .../main/java/org/sopt/and/feature/signin/SignInRoute.kt | 6 +++--- .../main/java/org/sopt/and/feature/signup/SignUpRoute.kt | 6 +++--- 11 files changed, 17 insertions(+), 17 deletions(-) rename app/src/main/java/org/sopt/and/{ => feature}/component/AuthTextField.kt (98%) rename app/src/main/java/org/sopt/and/{ => feature}/component/EventContent.kt (98%) rename app/src/main/java/org/sopt/and/{ => feature}/component/ExpandedButton.kt (97%) rename app/src/main/java/org/sopt/and/{ => feature}/component/HistoryContent.kt (98%) rename app/src/main/java/org/sopt/and/{ => feature}/component/HomeContent.kt (99%) rename app/src/main/java/org/sopt/and/{ => feature}/component/RoundedButton.kt (97%) rename app/src/main/java/org/sopt/and/{ => feature}/component/TopBar.kt (97%) diff --git a/app/src/main/java/org/sopt/and/component/AuthTextField.kt b/app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt similarity index 98% rename from app/src/main/java/org/sopt/and/component/AuthTextField.kt rename to app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt index 790e103..bb78032 100644 --- a/app/src/main/java/org/sopt/and/component/AuthTextField.kt +++ b/app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/app/src/main/java/org/sopt/and/component/EventContent.kt b/app/src/main/java/org/sopt/and/feature/component/EventContent.kt similarity index 98% rename from app/src/main/java/org/sopt/and/component/EventContent.kt rename to app/src/main/java/org/sopt/and/feature/component/EventContent.kt index 2d806da..7ff9e1e 100644 --- a/app/src/main/java/org/sopt/and/component/EventContent.kt +++ b/app/src/main/java/org/sopt/and/feature/component/EventContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column diff --git a/app/src/main/java/org/sopt/and/component/ExpandedButton.kt b/app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt similarity index 97% rename from app/src/main/java/org/sopt/and/component/ExpandedButton.kt rename to app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt index 56aca03..db06796 100644 --- a/app/src/main/java/org/sopt/and/component/ExpandedButton.kt +++ b/app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.background import androidx.compose.foundation.clickable diff --git a/app/src/main/java/org/sopt/and/component/HistoryContent.kt b/app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt similarity index 98% rename from app/src/main/java/org/sopt/and/component/HistoryContent.kt rename to app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt index 485d3e0..ef26b10 100644 --- a/app/src/main/java/org/sopt/and/component/HistoryContent.kt +++ b/app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth diff --git a/app/src/main/java/org/sopt/and/component/HomeContent.kt b/app/src/main/java/org/sopt/and/feature/component/HomeContent.kt similarity index 99% rename from app/src/main/java/org/sopt/and/component/HomeContent.kt rename to app/src/main/java/org/sopt/and/feature/component/HomeContent.kt index d67c2cf..ed467ca 100644 --- a/app/src/main/java/org/sopt/and/component/HomeContent.kt +++ b/app/src/main/java/org/sopt/and/feature/component/HomeContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement diff --git a/app/src/main/java/org/sopt/and/component/RoundedButton.kt b/app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt similarity index 97% rename from app/src/main/java/org/sopt/and/component/RoundedButton.kt rename to app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt index 93246d4..aa37335 100644 --- a/app/src/main/java/org/sopt/and/component/RoundedButton.kt +++ b/app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.background import androidx.compose.foundation.clickable diff --git a/app/src/main/java/org/sopt/and/component/TopBar.kt b/app/src/main/java/org/sopt/and/feature/component/TopBar.kt similarity index 97% rename from app/src/main/java/org/sopt/and/component/TopBar.kt rename to app/src/main/java/org/sopt/and/feature/component/TopBar.kt index b2a38cc..1d10474 100644 --- a/app/src/main/java/org/sopt/and/component/TopBar.kt +++ b/app/src/main/java/org/sopt/and/feature/component/TopBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.feature.component import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt index 127af7d..d2a0cab 100644 --- a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt @@ -33,8 +33,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.persistentListOf import org.sopt.and.R -import org.sopt.and.component.HomeContent -import org.sopt.and.component.TopBar +import org.sopt.and.feature.component.HomeContent +import org.sopt.and.feature.component.TopBar import org.sopt.and.feature.home.model.ContentModel import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black diff --git a/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt b/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt index ab0a44c..3c4ecc1 100644 --- a/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt @@ -33,8 +33,8 @@ import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.sopt.and.R -import org.sopt.and.component.EventContent -import org.sopt.and.component.HistoryContent +import org.sopt.and.feature.component.EventContent +import org.sopt.and.feature.component.HistoryContent import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black import org.sopt.and.ui.theme.Blue diff --git a/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt b/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt index 8d1bce0..45b023a 100644 --- a/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt @@ -37,9 +37,9 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import org.sopt.and.R -import org.sopt.and.component.RoundedButton -import org.sopt.and.component.AuthTextField -import org.sopt.and.component.TopBar +import org.sopt.and.feature.component.RoundedButton +import org.sopt.and.feature.component.AuthTextField +import org.sopt.and.feature.component.TopBar import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black import org.sopt.and.ui.theme.LightGray diff --git a/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt b/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt index f2a7271..ae4c4d0 100644 --- a/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt @@ -31,9 +31,9 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import org.sopt.and.R -import org.sopt.and.component.ExpandedButton -import org.sopt.and.component.AuthTextField -import org.sopt.and.component.TopBar +import org.sopt.and.feature.component.ExpandedButton +import org.sopt.and.feature.component.AuthTextField +import org.sopt.and.feature.component.TopBar import org.sopt.and.showToast import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black From f512b3513da4f1673474cf48205023c24b8cf056 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Thu, 5 Dec 2024 00:50:24 +0900 Subject: [PATCH 02/26] add #13: add core package --- .../sopt/and/{feature => core}/component/AuthTextField.kt | 2 +- .../and/{feature => core}/component/ExpandedButton.kt | 2 +- .../sopt/and/{feature => core}/component/RoundedButton.kt | 2 +- .../org/sopt/and/{feature => core}/component/TopBar.kt | 2 +- .../{Extension.kt => core/extension/ContextExtension.kt} | 2 +- .../and/{feature/main => core/navigation}/MainRoute.kt | 2 +- .../main/java/org/sopt/and/feature/home/HomeNavigation.kt | 2 +- app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt | 2 +- .../main/java/org/sopt/and/feature/main/MainBottomTab.kt | 2 ++ .../main/java/org/sopt/and/feature/main/MainNavigation.kt | 1 + app/src/main/java/org/sopt/and/feature/my/MyNavigation.kt | 2 +- .../java/org/sopt/and/feature/search/SearchNavigation.kt | 2 +- .../java/org/sopt/and/feature/signin/SignInNavigation.kt | 2 +- .../main/java/org/sopt/and/feature/signin/SignInRoute.kt | 7 +++---- .../java/org/sopt/and/feature/signup/SignUpNavigation.kt | 2 +- .../main/java/org/sopt/and/feature/signup/SignUpRoute.kt | 8 ++++---- 16 files changed, 22 insertions(+), 20 deletions(-) rename app/src/main/java/org/sopt/and/{feature => core}/component/AuthTextField.kt (98%) rename app/src/main/java/org/sopt/and/{feature => core}/component/ExpandedButton.kt (97%) rename app/src/main/java/org/sopt/and/{feature => core}/component/RoundedButton.kt (97%) rename app/src/main/java/org/sopt/and/{feature => core}/component/TopBar.kt (97%) rename app/src/main/java/org/sopt/and/{Extension.kt => core/extension/ContextExtension.kt} (85%) rename app/src/main/java/org/sopt/and/{feature/main => core/navigation}/MainRoute.kt (60%) diff --git a/app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt b/app/src/main/java/org/sopt/and/core/component/AuthTextField.kt similarity index 98% rename from app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt rename to app/src/main/java/org/sopt/and/core/component/AuthTextField.kt index bb78032..ab52fc0 100644 --- a/app/src/main/java/org/sopt/and/feature/component/AuthTextField.kt +++ b/app/src/main/java/org/sopt/and/core/component/AuthTextField.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.core.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt b/app/src/main/java/org/sopt/and/core/component/ExpandedButton.kt similarity index 97% rename from app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt rename to app/src/main/java/org/sopt/and/core/component/ExpandedButton.kt index db06796..88f8f8f 100644 --- a/app/src/main/java/org/sopt/and/feature/component/ExpandedButton.kt +++ b/app/src/main/java/org/sopt/and/core/component/ExpandedButton.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.core.component import androidx.compose.foundation.background import androidx.compose.foundation.clickable diff --git a/app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt b/app/src/main/java/org/sopt/and/core/component/RoundedButton.kt similarity index 97% rename from app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt rename to app/src/main/java/org/sopt/and/core/component/RoundedButton.kt index aa37335..516a840 100644 --- a/app/src/main/java/org/sopt/and/feature/component/RoundedButton.kt +++ b/app/src/main/java/org/sopt/and/core/component/RoundedButton.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.core.component import androidx.compose.foundation.background import androidx.compose.foundation.clickable diff --git a/app/src/main/java/org/sopt/and/feature/component/TopBar.kt b/app/src/main/java/org/sopt/and/core/component/TopBar.kt similarity index 97% rename from app/src/main/java/org/sopt/and/feature/component/TopBar.kt rename to app/src/main/java/org/sopt/and/core/component/TopBar.kt index 1d10474..003d626 100644 --- a/app/src/main/java/org/sopt/and/feature/component/TopBar.kt +++ b/app/src/main/java/org/sopt/and/core/component/TopBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.core.component import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/app/src/main/java/org/sopt/and/Extension.kt b/app/src/main/java/org/sopt/and/core/extension/ContextExtension.kt similarity index 85% rename from app/src/main/java/org/sopt/and/Extension.kt rename to app/src/main/java/org/sopt/and/core/extension/ContextExtension.kt index 3b765c4..9fe2a89 100644 --- a/app/src/main/java/org/sopt/and/Extension.kt +++ b/app/src/main/java/org/sopt/and/core/extension/ContextExtension.kt @@ -1,4 +1,4 @@ -package org.sopt.and +package org.sopt.and.core.extension import android.content.Context import android.widget.Toast diff --git a/app/src/main/java/org/sopt/and/feature/main/MainRoute.kt b/app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt similarity index 60% rename from app/src/main/java/org/sopt/and/feature/main/MainRoute.kt rename to app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt index 65c9692..b0fcfc1 100644 --- a/app/src/main/java/org/sopt/and/feature/main/MainRoute.kt +++ b/app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.main +package org.sopt.and.core.navigation interface MainRoute diff --git a/app/src/main/java/org/sopt/and/feature/home/HomeNavigation.kt b/app/src/main/java/org/sopt/and/feature/home/HomeNavigation.kt index d7cab1a..f3aa396 100644 --- a/app/src/main/java/org/sopt/and/feature/home/HomeNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/home/HomeNavigation.kt @@ -6,7 +6,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import kotlinx.serialization.Serializable -import org.sopt.and.feature.main.MainTabRoute +import org.sopt.and.core.navigation.MainTabRoute fun NavController.navigateHome( navOptions: NavOptions diff --git a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt index d2a0cab..bea864f 100644 --- a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt @@ -34,7 +34,7 @@ import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.persistentListOf import org.sopt.and.R import org.sopt.and.feature.component.HomeContent -import org.sopt.and.feature.component.TopBar +import org.sopt.and.core.component.TopBar import org.sopt.and.feature.home.model.ContentModel import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black diff --git a/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt b/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt index bf219b2..ac3b9ad 100644 --- a/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt +++ b/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt @@ -6,6 +6,8 @@ import androidx.compose.material.icons.outlined.Home import androidx.compose.material.icons.outlined.Search import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector +import org.sopt.and.core.navigation.MainRoute +import org.sopt.and.core.navigation.MainTabRoute enum class MainBottomTab( val icon: ImageVector, diff --git a/app/src/main/java/org/sopt/and/feature/main/MainNavigation.kt b/app/src/main/java/org/sopt/and/feature/main/MainNavigation.kt index ccdaf6e..c53206e 100644 --- a/app/src/main/java/org/sopt/and/feature/main/MainNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/main/MainNavigation.kt @@ -8,6 +8,7 @@ import androidx.navigation.NavHostController import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navOptions +import org.sopt.and.core.navigation.MainTabRoute import org.sopt.and.feature.home.Home import org.sopt.and.feature.home.navigateHome import org.sopt.and.feature.my.navigateMy diff --git a/app/src/main/java/org/sopt/and/feature/my/MyNavigation.kt b/app/src/main/java/org/sopt/and/feature/my/MyNavigation.kt index 15739a3..797ecd7 100644 --- a/app/src/main/java/org/sopt/and/feature/my/MyNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/my/MyNavigation.kt @@ -6,7 +6,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import kotlinx.serialization.Serializable -import org.sopt.and.feature.main.MainTabRoute +import org.sopt.and.core.navigation.MainTabRoute fun NavController.navigateMy( navOptions: NavOptions diff --git a/app/src/main/java/org/sopt/and/feature/search/SearchNavigation.kt b/app/src/main/java/org/sopt/and/feature/search/SearchNavigation.kt index 594b14d..1a4f53a 100644 --- a/app/src/main/java/org/sopt/and/feature/search/SearchNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/search/SearchNavigation.kt @@ -6,7 +6,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import kotlinx.serialization.Serializable -import org.sopt.and.feature.main.MainTabRoute +import org.sopt.and.core.navigation.MainTabRoute fun NavController.navigateSearch( navOptions: NavOptions diff --git a/app/src/main/java/org/sopt/and/feature/signin/SignInNavigation.kt b/app/src/main/java/org/sopt/and/feature/signin/SignInNavigation.kt index d827541..c9bb2a5 100644 --- a/app/src/main/java/org/sopt/and/feature/signin/SignInNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/signin/SignInNavigation.kt @@ -4,7 +4,7 @@ import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import kotlinx.serialization.Serializable -import org.sopt.and.feature.main.MainTabRoute +import org.sopt.and.core.navigation.MainTabRoute fun NavController.navigateSignIn() { navigate(SignIn) diff --git a/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt b/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt index 45b023a..949a70d 100644 --- a/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/signin/SignInRoute.kt @@ -25,7 +25,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.TextStyle @@ -37,9 +36,9 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import org.sopt.and.R -import org.sopt.and.feature.component.RoundedButton -import org.sopt.and.feature.component.AuthTextField -import org.sopt.and.feature.component.TopBar +import org.sopt.and.core.component.RoundedButton +import org.sopt.and.core.component.AuthTextField +import org.sopt.and.core.component.TopBar import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black import org.sopt.and.ui.theme.LightGray diff --git a/app/src/main/java/org/sopt/and/feature/signup/SignUpNavigation.kt b/app/src/main/java/org/sopt/and/feature/signup/SignUpNavigation.kt index a97bcca..b473226 100644 --- a/app/src/main/java/org/sopt/and/feature/signup/SignUpNavigation.kt +++ b/app/src/main/java/org/sopt/and/feature/signup/SignUpNavigation.kt @@ -4,7 +4,7 @@ import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import kotlinx.serialization.Serializable -import org.sopt.and.feature.main.MainTabRoute +import org.sopt.and.core.navigation.MainTabRoute fun NavController.navigateSignUp() { navigate(SignUp) diff --git a/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt b/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt index ae4c4d0..21eefe1 100644 --- a/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/signup/SignUpRoute.kt @@ -31,10 +31,10 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import org.sopt.and.R -import org.sopt.and.feature.component.ExpandedButton -import org.sopt.and.feature.component.AuthTextField -import org.sopt.and.feature.component.TopBar -import org.sopt.and.showToast +import org.sopt.and.core.component.ExpandedButton +import org.sopt.and.core.component.AuthTextField +import org.sopt.and.core.component.TopBar +import org.sopt.and.core.extension.showToast import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black import org.sopt.and.ui.theme.LightGray From 1248207d26d436047c8e2180485a4750c68a6d8b Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Thu, 5 Dec 2024 00:59:57 +0900 Subject: [PATCH 03/26] chore #13: add Route and edit navigation package --- app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt | 5 ----- .../main/java/org/sopt/and/core/navigation/MainTabRoute.kt | 3 +++ app/src/main/java/org/sopt/and/core/navigation/Route.kt | 3 +++ app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt | 3 +-- 4 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt create mode 100644 app/src/main/java/org/sopt/and/core/navigation/MainTabRoute.kt create mode 100644 app/src/main/java/org/sopt/and/core/navigation/Route.kt diff --git a/app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt b/app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt deleted file mode 100644 index b0fcfc1..0000000 --- a/app/src/main/java/org/sopt/and/core/navigation/MainRoute.kt +++ /dev/null @@ -1,5 +0,0 @@ -package org.sopt.and.core.navigation - -interface MainRoute - -interface MainTabRoute : MainRoute diff --git a/app/src/main/java/org/sopt/and/core/navigation/MainTabRoute.kt b/app/src/main/java/org/sopt/and/core/navigation/MainTabRoute.kt new file mode 100644 index 0000000..98b4ab3 --- /dev/null +++ b/app/src/main/java/org/sopt/and/core/navigation/MainTabRoute.kt @@ -0,0 +1,3 @@ +package org.sopt.and.core.navigation + +interface MainTabRoute : Route diff --git a/app/src/main/java/org/sopt/and/core/navigation/Route.kt b/app/src/main/java/org/sopt/and/core/navigation/Route.kt new file mode 100644 index 0000000..292dd41 --- /dev/null +++ b/app/src/main/java/org/sopt/and/core/navigation/Route.kt @@ -0,0 +1,3 @@ +package org.sopt.and.core.navigation + +interface Route diff --git a/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt b/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt index ac3b9ad..97c99f3 100644 --- a/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt +++ b/app/src/main/java/org/sopt/and/feature/main/MainBottomTab.kt @@ -6,7 +6,6 @@ import androidx.compose.material.icons.outlined.Home import androidx.compose.material.icons.outlined.Search import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.vector.ImageVector -import org.sopt.and.core.navigation.MainRoute import org.sopt.and.core.navigation.MainTabRoute enum class MainBottomTab( @@ -37,7 +36,7 @@ enum class MainBottomTab( } @Composable - fun contains(predicate: @Composable (MainRoute) -> Boolean): Boolean { + fun contains(predicate: @Composable (MainTabRoute) -> Boolean): Boolean { return entries.map { it.route }.any { predicate(it) } } } From 0f51c4fc62212137d1049ddb8ca9ad3df4a8cd62 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Thu, 5 Dec 2024 01:11:03 +0900 Subject: [PATCH 04/26] chore #13: divide component to each package --- app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt | 2 +- .../org/sopt/and/feature/{ => home}/component/HomeContent.kt | 2 +- app/src/main/java/org/sopt/and/feature/my/MyRoute.kt | 4 ++-- .../org/sopt/and/feature/{ => my}/component/EventContent.kt | 2 +- .../org/sopt/and/feature/{ => my}/component/HistoryContent.kt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename app/src/main/java/org/sopt/and/feature/{ => home}/component/HomeContent.kt (99%) rename app/src/main/java/org/sopt/and/feature/{ => my}/component/EventContent.kt (98%) rename app/src/main/java/org/sopt/and/feature/{ => my}/component/HistoryContent.kt (98%) diff --git a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt index bea864f..6ea690a 100644 --- a/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/home/HomeRoute.kt @@ -33,8 +33,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.persistentListOf import org.sopt.and.R -import org.sopt.and.feature.component.HomeContent import org.sopt.and.core.component.TopBar +import org.sopt.and.feature.home.component.HomeContent import org.sopt.and.feature.home.model.ContentModel import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black diff --git a/app/src/main/java/org/sopt/and/feature/component/HomeContent.kt b/app/src/main/java/org/sopt/and/feature/home/component/HomeContent.kt similarity index 99% rename from app/src/main/java/org/sopt/and/feature/component/HomeContent.kt rename to app/src/main/java/org/sopt/and/feature/home/component/HomeContent.kt index ed467ca..277fcff 100644 --- a/app/src/main/java/org/sopt/and/feature/component/HomeContent.kt +++ b/app/src/main/java/org/sopt/and/feature/home/component/HomeContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.feature.home.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement diff --git a/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt b/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt index 3c4ecc1..075aca1 100644 --- a/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt +++ b/app/src/main/java/org/sopt/and/feature/my/MyRoute.kt @@ -33,8 +33,8 @@ import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import org.sopt.and.R -import org.sopt.and.feature.component.EventContent -import org.sopt.and.feature.component.HistoryContent +import org.sopt.and.feature.my.component.EventContent +import org.sopt.and.feature.my.component.HistoryContent import org.sopt.and.ui.theme.ANDANDROIDTheme import org.sopt.and.ui.theme.Black import org.sopt.and.ui.theme.Blue diff --git a/app/src/main/java/org/sopt/and/feature/component/EventContent.kt b/app/src/main/java/org/sopt/and/feature/my/component/EventContent.kt similarity index 98% rename from app/src/main/java/org/sopt/and/feature/component/EventContent.kt rename to app/src/main/java/org/sopt/and/feature/my/component/EventContent.kt index 7ff9e1e..6c96fb6 100644 --- a/app/src/main/java/org/sopt/and/feature/component/EventContent.kt +++ b/app/src/main/java/org/sopt/and/feature/my/component/EventContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.feature.my.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column diff --git a/app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt b/app/src/main/java/org/sopt/and/feature/my/component/HistoryContent.kt similarity index 98% rename from app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt rename to app/src/main/java/org/sopt/and/feature/my/component/HistoryContent.kt index ef26b10..e0d3a6c 100644 --- a/app/src/main/java/org/sopt/and/feature/component/HistoryContent.kt +++ b/app/src/main/java/org/sopt/and/feature/my/component/HistoryContent.kt @@ -1,4 +1,4 @@ -package org.sopt.and.feature.component +package org.sopt.and.feature.my.component import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth From 0a6499fbe74c348073112794a8c2bd19b3bf4a63 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:15:04 +0900 Subject: [PATCH 05/26] feature #13: MyUseCase --- .../java/org/sopt/and/domain/usecase/MyUseCase.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt diff --git a/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt new file mode 100644 index 0000000..4f0246a --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt @@ -0,0 +1,12 @@ +package org.sopt.and.domain.usecase + +import org.sopt.and.domain.entity.response.ResponseHobbyEntity +import org.sopt.and.domain.repository.WavveRepository +import javax.inject.Inject + +class MyUseCase @Inject constructor( + private val myRepository: WavveRepository +) { + suspend operator fun invoke(): Result = + myRepository.getHobby() +} From 13738ee12672643558b11732917cb3743a4d4c9d Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:15:15 +0900 Subject: [PATCH 06/26] chore #13: apply MyUseCase --- app/src/main/java/org/sopt/and/feature/my/MyViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/sopt/and/feature/my/MyViewModel.kt b/app/src/main/java/org/sopt/and/feature/my/MyViewModel.kt index abe8514..312ba2d 100644 --- a/app/src/main/java/org/sopt/and/feature/my/MyViewModel.kt +++ b/app/src/main/java/org/sopt/and/feature/my/MyViewModel.kt @@ -11,12 +11,12 @@ import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch import org.sopt.and.R -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.usecase.MyUseCase import javax.inject.Inject @HiltViewModel class MyViewModel @Inject constructor( - private val wavveRepository: WavveRepository + private val getHobbyUseCase : MyUseCase ) : ViewModel() { private val _state = MutableStateFlow(MyState()) val state: StateFlow @@ -28,7 +28,7 @@ class MyViewModel @Inject constructor( fun getUserHobby() { viewModelScope.launch { - wavveRepository.getHobby().onSuccess { hobbyEntity -> + getHobbyUseCase.invoke().onSuccess { hobbyEntity -> _state.value = _state.value.copy( hobby = hobbyEntity.hobby ) From e8cc88b632792557a71fc5a3e06d4d82efb5c777 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:15:25 +0900 Subject: [PATCH 07/26] feature #13: SignInUseCase --- .../org/sopt/and/domain/usecase/SignInUseCase.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt diff --git a/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt new file mode 100644 index 0000000..0416fcc --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt @@ -0,0 +1,13 @@ +package org.sopt.and.domain.usecase + +import org.sopt.and.domain.entity.request.RequestSignInEntity +import org.sopt.and.domain.entity.response.ResponseSignInEntity +import org.sopt.and.domain.repository.WavveRepository +import javax.inject.Inject + +class SignInUseCase @Inject constructor( + private val signInRepository: WavveRepository +) { + suspend operator fun invoke(signInEntity: RequestSignInEntity): Result = + signInRepository.signIn(signInEntity) +} From e4170ab58249459ff4545bf99e8ce569d895fb5d Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:16:20 +0900 Subject: [PATCH 08/26] chore #13: apply SignInUseCase --- .../java/org/sopt/and/feature/signin/SignInViewModel.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/sopt/and/feature/signin/SignInViewModel.kt b/app/src/main/java/org/sopt/and/feature/signin/SignInViewModel.kt index d976b19..24d73ae 100644 --- a/app/src/main/java/org/sopt/and/feature/signin/SignInViewModel.kt +++ b/app/src/main/java/org/sopt/and/feature/signin/SignInViewModel.kt @@ -11,14 +11,14 @@ import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch import org.sopt.and.domain.entity.request.RequestSignInEntity -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.usecase.SignInUseCase import org.sopt.and.sharedpreference.User import javax.inject.Inject @HiltViewModel class SignInViewModel @Inject constructor( - private val user:User, - private val wavveRepository: WavveRepository + private val user: User, + private val signInUseCase: SignInUseCase ) : ViewModel() { private val _state = MutableStateFlow(SignInState()) val state: StateFlow @@ -49,7 +49,7 @@ class SignInViewModel @Inject constructor( fun isSignInValid() { viewModelScope.launch { var toastMessage: String = "" - wavveRepository.signIn( + signInUseCase.invoke( RequestSignInEntity( username = _state.value.username, password = _state.value.password From 833364c8f016f1427c1b06979f8e3fa0542c8fa7 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:16:33 +0900 Subject: [PATCH 09/26] feature #13: SignUpUseCase --- .../org/sopt/and/domain/usecase/SignUpUseCase.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt diff --git a/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt new file mode 100644 index 0000000..0699404 --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt @@ -0,0 +1,13 @@ +package org.sopt.and.domain.usecase + +import org.sopt.and.domain.entity.request.RequestSignUpEntity +import org.sopt.and.domain.entity.response.ResponseSignUpEntity +import org.sopt.and.domain.repository.WavveRepository +import javax.inject.Inject + +class SignUpUseCase @Inject constructor( + private val signUpRepository: WavveRepository +) { + suspend operator fun invoke(signUpEntity: RequestSignUpEntity): Result = + signUpRepository.signUp(signUpEntity) +} From 8383beede810fe4639ad89538ca86e18defab2f8 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:16:45 +0900 Subject: [PATCH 10/26] chore #13: apply SignUpUseCase --- .../java/org/sopt/and/feature/signup/SignUpViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/sopt/and/feature/signup/SignUpViewModel.kt b/app/src/main/java/org/sopt/and/feature/signup/SignUpViewModel.kt index 09c27d2..777e059 100644 --- a/app/src/main/java/org/sopt/and/feature/signup/SignUpViewModel.kt +++ b/app/src/main/java/org/sopt/and/feature/signup/SignUpViewModel.kt @@ -12,13 +12,13 @@ import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch import org.sopt.and.R import org.sopt.and.domain.entity.request.RequestSignUpEntity -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.usecase.SignUpUseCase import java.util.regex.Pattern import javax.inject.Inject @HiltViewModel class SignUpViewModel @Inject constructor( - private val wavveRepository: WavveRepository + private val signUpUseCase: SignUpUseCase ) : ViewModel() { private val _state = MutableStateFlow(SignUpState()) @@ -50,7 +50,7 @@ class SignUpViewModel @Inject constructor( fun isSignUpValid() { viewModelScope.launch { if (isUsernameValid() && isPasswordValid() && isHobbyValid()) { - wavveRepository.signUp( + signUpUseCase.invoke( RequestSignUpEntity( username = _state.value.username, password = _state.value.password, From 094db33a95464ca1175ed36cd3c54b08016f03d2 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:44:31 +0900 Subject: [PATCH 11/26] feature #13: SignInRepositoryImpl --- .../repositoryimpl/SignInRepositoryImpl.kt | 17 ++++++++++++ .../repositoryimpl/WavveRepositoryImpl.kt | 27 ------------------- 2 files changed, 17 insertions(+), 27 deletions(-) create mode 100644 app/src/main/java/org/sopt/and/data/repositoryimpl/SignInRepositoryImpl.kt delete mode 100644 app/src/main/java/org/sopt/and/data/repositoryimpl/WavveRepositoryImpl.kt diff --git a/app/src/main/java/org/sopt/and/data/repositoryimpl/SignInRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/repositoryimpl/SignInRepositoryImpl.kt new file mode 100644 index 0000000..4a5ed3f --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/repositoryimpl/SignInRepositoryImpl.kt @@ -0,0 +1,17 @@ +package org.sopt.and.data.repositoryimpl + +import org.sopt.and.data.datasource.AuthDataSource +import org.sopt.and.data.dto.request.toDto +import org.sopt.and.domain.entity.request.RequestSignInEntity +import org.sopt.and.domain.entity.response.ResponseSignInEntity +import org.sopt.and.domain.repository.SignInRepository +import javax.inject.Inject + +class SignInRepositoryImpl @Inject constructor( + private val authDataSource: AuthDataSource +) : SignInRepository { + override suspend fun signIn(body: RequestSignInEntity): Result = + runCatching { + authDataSource.postSignIn(body.toDto()).result.toEntity() + } +} diff --git a/app/src/main/java/org/sopt/and/data/repositoryimpl/WavveRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/repositoryimpl/WavveRepositoryImpl.kt deleted file mode 100644 index 90169c6..0000000 --- a/app/src/main/java/org/sopt/and/data/repositoryimpl/WavveRepositoryImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.sopt.and.data.repositoryimpl - -import org.sopt.and.data.datasource.WavveDataSource -import org.sopt.and.data.dto.request.toDto -import org.sopt.and.domain.entity.request.RequestSignInEntity -import org.sopt.and.domain.entity.request.RequestSignUpEntity -import org.sopt.and.domain.entity.response.ResponseHobbyEntity -import org.sopt.and.domain.entity.response.ResponseSignInEntity -import org.sopt.and.domain.entity.response.ResponseSignUpEntity -import org.sopt.and.domain.repository.WavveRepository -import javax.inject.Inject - -class WavveRepositoryImpl @Inject constructor( - private val wavveDataSource: WavveDataSource -) : WavveRepository { - override suspend fun signUp(body: RequestSignUpEntity): Result = runCatching { - wavveDataSource.postSignUp(body.toDto()).result.toEntity() - } - - override suspend fun signIn(body: RequestSignInEntity): Result = runCatching { - wavveDataSource.postSignIn(body.toDto()).result.toEntity() - } - - override suspend fun getHobby(): Result = runCatching { - wavveDataSource.getUserHobby().result.toEntity() - } -} From fdf48875762a94164d7b9644e8afff3acf98329a Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:44:40 +0900 Subject: [PATCH 12/26] feature #13: SignUpRepositoryImpl --- .../data/repositoryimpl/SignUpRepositoryImpl.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/repositoryimpl/SignUpRepositoryImpl.kt diff --git a/app/src/main/java/org/sopt/and/data/repositoryimpl/SignUpRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/repositoryimpl/SignUpRepositoryImpl.kt new file mode 100644 index 0000000..ffb3bd5 --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/repositoryimpl/SignUpRepositoryImpl.kt @@ -0,0 +1,17 @@ +package org.sopt.and.data.repositoryimpl + +import org.sopt.and.data.datasource.AuthDataSource +import org.sopt.and.data.dto.request.toDto +import org.sopt.and.domain.entity.request.RequestSignUpEntity +import org.sopt.and.domain.entity.response.ResponseSignUpEntity +import org.sopt.and.domain.repository.SignUpRepository +import javax.inject.Inject + +class SignUpRepositoryImpl @Inject constructor( + private val authDataSource: AuthDataSource +) : SignUpRepository { + override suspend fun signUp(body: RequestSignUpEntity): Result = + runCatching { + authDataSource.postSignUp(body.toDto()).result.toEntity() + } +} From 7cb7dc712c37be482f1b8c7a26f442b00dcc058a Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:44:48 +0900 Subject: [PATCH 13/26] feature #13: MyRepositoryImpl --- .../and/data/repositoryimpl/MyRepositoryImpl.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt diff --git a/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt b/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt new file mode 100644 index 0000000..681c3ae --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/repositoryimpl/MyRepositoryImpl.kt @@ -0,0 +1,14 @@ +package org.sopt.and.data.repositoryimpl + +import org.sopt.and.data.datasource.MyDataSource +import org.sopt.and.domain.entity.response.ResponseHobbyEntity +import org.sopt.and.domain.repository.MyRepository +import javax.inject.Inject + +class MyRepositoryImpl @Inject constructor( + private val myDataSource: MyDataSource +) : MyRepository { + override suspend fun getHobby(): Result = runCatching { + myDataSource.getUserHobby().result.toEntity() + } +} From f228e2f5ac1ab4f6284a845aca6df2201a9f2f95 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:45:48 +0900 Subject: [PATCH 14/26] feature #13: MyRepository --- .../java/org/sopt/and/domain/repository/MyRepository.kt | 7 +++++++ app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/sopt/and/domain/repository/MyRepository.kt diff --git a/app/src/main/java/org/sopt/and/domain/repository/MyRepository.kt b/app/src/main/java/org/sopt/and/domain/repository/MyRepository.kt new file mode 100644 index 0000000..708122c --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/repository/MyRepository.kt @@ -0,0 +1,7 @@ +package org.sopt.and.domain.repository + +import org.sopt.and.domain.entity.response.ResponseHobbyEntity + +interface MyRepository { + suspend fun getHobby(): Result +} diff --git a/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt index 4f0246a..224b23f 100644 --- a/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt +++ b/app/src/main/java/org/sopt/and/domain/usecase/MyUseCase.kt @@ -1,11 +1,11 @@ package org.sopt.and.domain.usecase import org.sopt.and.domain.entity.response.ResponseHobbyEntity -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.repository.MyRepository import javax.inject.Inject class MyUseCase @Inject constructor( - private val myRepository: WavveRepository + private val myRepository: MyRepository ) { suspend operator fun invoke(): Result = myRepository.getHobby() From a7ba5971a1434108a05b4a0f6ce2b632bb9d2d4c Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:46:02 +0900 Subject: [PATCH 15/26] feature #13: SignInRepository --- .../sopt/and/domain/repository/SignInRepository.kt | 8 ++++++++ .../sopt/and/domain/repository/WavveRepository.kt | 13 ------------- .../org/sopt/and/domain/usecase/SignInUseCase.kt | 4 ++-- 3 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 app/src/main/java/org/sopt/and/domain/repository/SignInRepository.kt delete mode 100644 app/src/main/java/org/sopt/and/domain/repository/WavveRepository.kt diff --git a/app/src/main/java/org/sopt/and/domain/repository/SignInRepository.kt b/app/src/main/java/org/sopt/and/domain/repository/SignInRepository.kt new file mode 100644 index 0000000..853a70f --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/repository/SignInRepository.kt @@ -0,0 +1,8 @@ +package org.sopt.and.domain.repository + +import org.sopt.and.domain.entity.request.RequestSignInEntity +import org.sopt.and.domain.entity.response.ResponseSignInEntity + +interface SignInRepository { + suspend fun signIn(body: RequestSignInEntity): Result +} diff --git a/app/src/main/java/org/sopt/and/domain/repository/WavveRepository.kt b/app/src/main/java/org/sopt/and/domain/repository/WavveRepository.kt deleted file mode 100644 index 6900eab..0000000 --- a/app/src/main/java/org/sopt/and/domain/repository/WavveRepository.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.sopt.and.domain.repository - -import org.sopt.and.domain.entity.request.RequestSignInEntity -import org.sopt.and.domain.entity.request.RequestSignUpEntity -import org.sopt.and.domain.entity.response.ResponseHobbyEntity -import org.sopt.and.domain.entity.response.ResponseSignInEntity -import org.sopt.and.domain.entity.response.ResponseSignUpEntity - -interface WavveRepository { - suspend fun signUp(body: RequestSignUpEntity): Result - suspend fun signIn(body:RequestSignInEntity): Result - suspend fun getHobby(): Result -} diff --git a/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt index 0416fcc..3fb75ff 100644 --- a/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt +++ b/app/src/main/java/org/sopt/and/domain/usecase/SignInUseCase.kt @@ -2,11 +2,11 @@ package org.sopt.and.domain.usecase import org.sopt.and.domain.entity.request.RequestSignInEntity import org.sopt.and.domain.entity.response.ResponseSignInEntity -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.repository.SignInRepository import javax.inject.Inject class SignInUseCase @Inject constructor( - private val signInRepository: WavveRepository + private val signInRepository: SignInRepository ) { suspend operator fun invoke(signInEntity: RequestSignInEntity): Result = signInRepository.signIn(signInEntity) From 859d8e8af3e3e7639878ef50f99cb8bac8f9cff6 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:46:10 +0900 Subject: [PATCH 16/26] feature #13: SignUpRepository --- .../org/sopt/and/domain/repository/SignUpRepository.kt | 8 ++++++++ .../java/org/sopt/and/domain/usecase/SignUpUseCase.kt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/sopt/and/domain/repository/SignUpRepository.kt diff --git a/app/src/main/java/org/sopt/and/domain/repository/SignUpRepository.kt b/app/src/main/java/org/sopt/and/domain/repository/SignUpRepository.kt new file mode 100644 index 0000000..d6dccaf --- /dev/null +++ b/app/src/main/java/org/sopt/and/domain/repository/SignUpRepository.kt @@ -0,0 +1,8 @@ +package org.sopt.and.domain.repository + +import org.sopt.and.domain.entity.request.RequestSignUpEntity +import org.sopt.and.domain.entity.response.ResponseSignUpEntity + +interface SignUpRepository { + suspend fun signUp(body: RequestSignUpEntity): Result +} diff --git a/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt b/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt index 0699404..ba10919 100644 --- a/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt +++ b/app/src/main/java/org/sopt/and/domain/usecase/SignUpUseCase.kt @@ -2,11 +2,11 @@ package org.sopt.and.domain.usecase import org.sopt.and.domain.entity.request.RequestSignUpEntity import org.sopt.and.domain.entity.response.ResponseSignUpEntity -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.domain.repository.SignUpRepository import javax.inject.Inject class SignUpUseCase @Inject constructor( - private val signUpRepository: WavveRepository + private val signUpRepository: SignUpRepository ) { suspend operator fun invoke(signUpEntity: RequestSignUpEntity): Result = signUpRepository.signUp(signUpEntity) From ad24c45eb73a339a15f8ad2956b659826c11ff85 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:46:24 +0900 Subject: [PATCH 17/26] feature #13: AuthService --- .../and/data/service/{WavveService.kt => AuthService.kt} | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) rename app/src/main/java/org/sopt/and/data/service/{WavveService.kt => AuthService.kt} (74%) diff --git a/app/src/main/java/org/sopt/and/data/service/WavveService.kt b/app/src/main/java/org/sopt/and/data/service/AuthService.kt similarity index 74% rename from app/src/main/java/org/sopt/and/data/service/WavveService.kt rename to app/src/main/java/org/sopt/and/data/service/AuthService.kt index 79a306f..afd81d0 100644 --- a/app/src/main/java/org/sopt/and/data/service/WavveService.kt +++ b/app/src/main/java/org/sopt/and/data/service/AuthService.kt @@ -3,14 +3,12 @@ package org.sopt.and.data.service import org.sopt.and.data.dto.request.RequestSignInDto import org.sopt.and.data.dto.request.RequestSignUpDto import org.sopt.and.data.dto.response.BaseResponse -import org.sopt.and.data.dto.response.ResponseUserHobbyDto import org.sopt.and.data.dto.response.ResponseSignInDto import org.sopt.and.data.dto.response.ResponseSignUpDto import retrofit2.http.Body -import retrofit2.http.GET import retrofit2.http.POST -interface WavveService { +interface AuthService { @POST("/user") suspend fun postSignUp( @Body body: RequestSignUpDto @@ -20,7 +18,4 @@ interface WavveService { suspend fun postSignIn( @Body body: RequestSignInDto ): BaseResponse - - @GET("/user/my-hobby") - suspend fun getUserHobby(): BaseResponse } From 0ca0bed269455e4227c71cbfc57c1d2999f89922 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:46:33 +0900 Subject: [PATCH 18/26] feature #13: MyService --- .../main/java/org/sopt/and/data/service/MyService.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/service/MyService.kt diff --git a/app/src/main/java/org/sopt/and/data/service/MyService.kt b/app/src/main/java/org/sopt/and/data/service/MyService.kt new file mode 100644 index 0000000..806a278 --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/service/MyService.kt @@ -0,0 +1,10 @@ +package org.sopt.and.data.service + +import org.sopt.and.data.dto.response.BaseResponse +import org.sopt.and.data.dto.response.ResponseUserHobbyDto +import retrofit2.http.GET + +interface MyService { + @GET("/user/my-hobby") + suspend fun getUserHobby(): BaseResponse +} From 0b0d469a9c15a6b42448bd9eaea94ae2d1cf10b3 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:46:52 +0900 Subject: [PATCH 19/26] feature #13: MyDataSourceImpl --- .../and/data/datasourceimpl/MyDataSourceImpl.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/datasourceimpl/MyDataSourceImpl.kt diff --git a/app/src/main/java/org/sopt/and/data/datasourceimpl/MyDataSourceImpl.kt b/app/src/main/java/org/sopt/and/data/datasourceimpl/MyDataSourceImpl.kt new file mode 100644 index 0000000..fcaf119 --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/datasourceimpl/MyDataSourceImpl.kt @@ -0,0 +1,14 @@ +package org.sopt.and.data.datasourceimpl + +import org.sopt.and.data.datasource.MyDataSource +import org.sopt.and.data.dto.response.BaseResponse +import org.sopt.and.data.dto.response.ResponseUserHobbyDto +import org.sopt.and.data.service.MyService +import javax.inject.Inject + +class MyDataSourceImpl @Inject constructor( + private val myService: MyService +) : MyDataSource { + override suspend fun getUserHobby(): BaseResponse = + myService.getUserHobby() +} From bcba10b7a070d46c7aa3e343d9216133284f5894 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:11 +0900 Subject: [PATCH 20/26] feature #13: AuthDataSourceImpl --- ...ataSourceImpl.kt => AuthDataSourceImpl.kt} | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) rename app/src/main/java/org/sopt/and/data/datasourceimpl/{WavveDataSourceImpl.kt => AuthDataSourceImpl.kt} (53%) diff --git a/app/src/main/java/org/sopt/and/data/datasourceimpl/WavveDataSourceImpl.kt b/app/src/main/java/org/sopt/and/data/datasourceimpl/AuthDataSourceImpl.kt similarity index 53% rename from app/src/main/java/org/sopt/and/data/datasourceimpl/WavveDataSourceImpl.kt rename to app/src/main/java/org/sopt/and/data/datasourceimpl/AuthDataSourceImpl.kt index db581fa..3ec8307 100644 --- a/app/src/main/java/org/sopt/and/data/datasourceimpl/WavveDataSourceImpl.kt +++ b/app/src/main/java/org/sopt/and/data/datasourceimpl/AuthDataSourceImpl.kt @@ -1,25 +1,20 @@ package org.sopt.and.data.datasourceimpl -import org.sopt.and.data.datasource.WavveDataSource +import org.sopt.and.data.datasource.AuthDataSource import org.sopt.and.data.dto.request.RequestSignInDto import org.sopt.and.data.dto.request.RequestSignUpDto import org.sopt.and.data.dto.response.BaseResponse -import org.sopt.and.data.dto.response.ResponseUserHobbyDto import org.sopt.and.data.dto.response.ResponseSignInDto import org.sopt.and.data.dto.response.ResponseSignUpDto -import org.sopt.and.data.service.WavveService +import org.sopt.and.data.service.AuthService import javax.inject.Inject -class WavveDataSourceImpl @Inject constructor( - private val wavveService: WavveService -) : WavveDataSource { +class AuthDataSourceImpl @Inject constructor( + private val authService: AuthService +) : AuthDataSource { override suspend fun postSignUp(requestSignUpDto: RequestSignUpDto): BaseResponse = - wavveService.postSignUp(requestSignUpDto) + authService.postSignUp(requestSignUpDto) override suspend fun postSignIn(requestSignInDto: RequestSignInDto): BaseResponse = - wavveService.postSignIn(requestSignInDto) - - override suspend fun getUserHobby(): BaseResponse = - wavveService.getUserHobby() - + authService.postSignIn(requestSignInDto) } From 9f0cd0e08df015ff80b6467fbbfbfa6f4a3b5817 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:18 +0900 Subject: [PATCH 21/26] feature #13: AuthDataSource --- .../data/datasource/{WavveDataSource.kt => AuthDataSource.kt} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename app/src/main/java/org/sopt/and/data/datasource/{WavveDataSource.kt => AuthDataSource.kt} (76%) diff --git a/app/src/main/java/org/sopt/and/data/datasource/WavveDataSource.kt b/app/src/main/java/org/sopt/and/data/datasource/AuthDataSource.kt similarity index 76% rename from app/src/main/java/org/sopt/and/data/datasource/WavveDataSource.kt rename to app/src/main/java/org/sopt/and/data/datasource/AuthDataSource.kt index 6477aad..4abdf08 100644 --- a/app/src/main/java/org/sopt/and/data/datasource/WavveDataSource.kt +++ b/app/src/main/java/org/sopt/and/data/datasource/AuthDataSource.kt @@ -3,12 +3,10 @@ package org.sopt.and.data.datasource import org.sopt.and.data.dto.request.RequestSignInDto import org.sopt.and.data.dto.request.RequestSignUpDto import org.sopt.and.data.dto.response.BaseResponse -import org.sopt.and.data.dto.response.ResponseUserHobbyDto import org.sopt.and.data.dto.response.ResponseSignInDto import org.sopt.and.data.dto.response.ResponseSignUpDto -interface WavveDataSource { +interface AuthDataSource { suspend fun postSignUp(requestSignUpDto: RequestSignUpDto): BaseResponse suspend fun postSignIn(requestSignInDto: RequestSignInDto): BaseResponse - suspend fun getUserHobby(): BaseResponse } From 66fa970b2fc4a37db1b4b2ddd276f74f64d18d20 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:25 +0900 Subject: [PATCH 22/26] feature #13: MyDataSource --- .../java/org/sopt/and/data/datasource/MyDataSource.kt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/src/main/java/org/sopt/and/data/datasource/MyDataSource.kt diff --git a/app/src/main/java/org/sopt/and/data/datasource/MyDataSource.kt b/app/src/main/java/org/sopt/and/data/datasource/MyDataSource.kt new file mode 100644 index 0000000..821fba6 --- /dev/null +++ b/app/src/main/java/org/sopt/and/data/datasource/MyDataSource.kt @@ -0,0 +1,8 @@ +package org.sopt.and.data.datasource + +import org.sopt.and.data.dto.response.BaseResponse +import org.sopt.and.data.dto.response.ResponseUserHobbyDto + +interface MyDataSource { + suspend fun getUserHobby(): BaseResponse +} From 92f4d7866773d00be2189a4dceca1c74df772c7a Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:39 +0900 Subject: [PATCH 23/26] chore #13: DataSourceModule --- .../java/org/sopt/and/data/di/DataSourceModule.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt b/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt index 62ef271..9f8309c 100644 --- a/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt +++ b/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt @@ -4,8 +4,10 @@ import dagger.Binds import dagger.Module import dagger.hilt.InstallIn import dagger.hilt.components.SingletonComponent -import org.sopt.and.data.datasource.WavveDataSource -import org.sopt.and.data.datasourceimpl.WavveDataSourceImpl +import org.sopt.and.data.datasource.AuthDataSource +import org.sopt.and.data.datasource.MyDataSource +import org.sopt.and.data.datasourceimpl.AuthDataSourceImpl +import org.sopt.and.data.datasourceimpl.MyDataSourceImpl import javax.inject.Singleton @Module @@ -13,6 +15,10 @@ import javax.inject.Singleton internal abstract class DataSourceModule { @Binds @Singleton - abstract fun bindsDataSource(myDataSourceImpl: WavveDataSourceImpl): WavveDataSource + abstract fun bindsDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource + + @Binds + @Singleton + abstract fun myDataSource(MyDataSourceImpl: MyDataSourceImpl): MyDataSource } From 2bf2804910b2b8f98ebb3c40284b0c0b6950f7cc Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:48 +0900 Subject: [PATCH 24/26] chore #13: RepositoryModule --- .../org/sopt/and/data/di/RepositoryModule.kt | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/sopt/and/data/di/RepositoryModule.kt b/app/src/main/java/org/sopt/and/data/di/RepositoryModule.kt index fe12ba9..16d6588 100644 --- a/app/src/main/java/org/sopt/and/data/di/RepositoryModule.kt +++ b/app/src/main/java/org/sopt/and/data/di/RepositoryModule.kt @@ -4,8 +4,12 @@ import dagger.Binds import dagger.Module import dagger.hilt.InstallIn import dagger.hilt.components.SingletonComponent -import org.sopt.and.data.repositoryimpl.WavveRepositoryImpl -import org.sopt.and.domain.repository.WavveRepository +import org.sopt.and.data.repositoryimpl.MyRepositoryImpl +import org.sopt.and.data.repositoryimpl.SignInRepositoryImpl +import org.sopt.and.data.repositoryimpl.SignUpRepositoryImpl +import org.sopt.and.domain.repository.MyRepository +import org.sopt.and.domain.repository.SignInRepository +import org.sopt.and.domain.repository.SignUpRepository import javax.inject.Singleton @Module @@ -13,7 +17,19 @@ import javax.inject.Singleton internal abstract class RepositoryModule { @Binds @Singleton - abstract fun bindsRepository( - myRepositoryImpl: WavveRepositoryImpl - ): WavveRepository + abstract fun bindsSignInRepository( + signInRepositoryImpl: SignInRepositoryImpl + ): SignInRepository + + @Binds + @Singleton + abstract fun bindsSignUpRepository( + signUpRepositoryImpl: SignUpRepositoryImpl + ): SignUpRepository + + @Binds + @Singleton + abstract fun bindsMyRepository( + myRepositoryImpl: MyRepositoryImpl + ): MyRepository } From ce45e9e681b7c9cb0dce314f4f9bc6e765fd0bc8 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:47:59 +0900 Subject: [PATCH 25/26] chore #13: ServiceModule --- .../main/java/org/sopt/and/data/di/ServiceModule.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/sopt/and/data/di/ServiceModule.kt b/app/src/main/java/org/sopt/and/data/di/ServiceModule.kt index 3933554..2a72638 100644 --- a/app/src/main/java/org/sopt/and/data/di/ServiceModule.kt +++ b/app/src/main/java/org/sopt/and/data/di/ServiceModule.kt @@ -4,7 +4,8 @@ import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.components.SingletonComponent -import org.sopt.and.data.service.WavveService +import org.sopt.and.data.service.AuthService +import org.sopt.and.data.service.MyService import retrofit2.Retrofit import javax.inject.Singleton @@ -13,6 +14,11 @@ import javax.inject.Singleton object ServiceModule { @Provides @Singleton - fun providerService(retrofit: Retrofit): WavveService = - retrofit.create(WavveService::class.java) + fun providerAuthService(retrofit: Retrofit): AuthService = + retrofit.create(AuthService::class.java) + + @Provides + @Singleton + fun providerMyService(retrofit: Retrofit): MyService = + retrofit.create(MyService::class.java) } From 374274f11b83c3cfe1859228e6666922ce9a3185 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Fri, 6 Dec 2024 22:48:48 +0900 Subject: [PATCH 26/26] chore #13: edit DataSourceModule function naming --- app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt b/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt index 9f8309c..84ae88c 100644 --- a/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt +++ b/app/src/main/java/org/sopt/and/data/di/DataSourceModule.kt @@ -15,10 +15,10 @@ import javax.inject.Singleton internal abstract class DataSourceModule { @Binds @Singleton - abstract fun bindsDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource + abstract fun bindsAuthDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource @Binds @Singleton - abstract fun myDataSource(MyDataSourceImpl: MyDataSourceImpl): MyDataSource + abstract fun bindsMyDataSource(MyDataSourceImpl: MyDataSourceImpl): MyDataSource }