From a470f4194c488d9597b34c6ce63ddcc9ad449dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=AE=E1=86=AB?= Date: Mon, 15 Jan 2024 13:52:21 +0900 Subject: [PATCH 1/5] chore :: compose navigation --- app/build.gradle.kts | 3 ++- gradle/libs.versions.toml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0fe65fe0a..092e3d733 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,7 +9,7 @@ android { defaultConfig { applicationId = "team.retum.jobisandroidv2" - minSdk = 26 + minSdk = 28 targetSdk = 34 versionCode = 1 versionName = "1.0" @@ -56,6 +56,7 @@ dependencies { implementation(libs.androidx.activity.compose) implementation(platform(libs.androidx.compose.bom)) implementation(libs.team.`return`.design.system) + implementation(libs.androidx.navigation.compose) api(libs.androidx.compose.ui) api(libs.androidx.compose.ui.graphics) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 043d9a663..92fe728b2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,8 @@ lifecycle-runtime-ktx = "2.7.0" gradle = "8.2.1" kotlin = "1.9.0" compose-bom = "2023.08.00" -design-system = "8ac6011a32" +design-system = "v1.0.0" +navigation-compose = "2.7.6" [libraries] androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" } @@ -22,6 +23,7 @@ androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "u androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } +androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation-compose" } androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso-core" } androidx-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-junit" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" } From 8b48cb714deabbf989ed79f7f3310a988f970ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=AE=E1=86=AB?= Date: Mon, 15 Jan 2024 13:52:32 +0900 Subject: [PATCH 2/5] feat :: JobisApp --- .../team/retum/jobisandroidv2/JobisApp.kt | 20 +++++++++++++++++++ .../team/retum/jobisandroidv2/MainActivity.kt | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt diff --git a/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt b/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt new file mode 100644 index 000000000..0e57d6f40 --- /dev/null +++ b/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt @@ -0,0 +1,20 @@ +package team.retum.jobisandroidv2 + +import androidx.compose.runtime.Composable +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.rememberNavController +import team.retum.jobisandroidv2.navigation.NAVIGATION_AUTH +import team.retum.jobisandroidv2.navigation.authNavigation +import team.retum.jobisandroidv2.navigation.homeNavigation + +@Composable +internal fun JobisApp() { + val navController = rememberNavController() + NavHost( + navController = navController, + startDestination = NAVIGATION_AUTH, + ) { + authNavigation() + homeNavigation() + } +} diff --git a/app/src/main/java/team/retum/jobisandroidv2/MainActivity.kt b/app/src/main/java/team/retum/jobisandroidv2/MainActivity.kt index ed0363473..cf78bb9e0 100644 --- a/app/src/main/java/team/retum/jobisandroidv2/MainActivity.kt +++ b/app/src/main/java/team/retum/jobisandroidv2/MainActivity.kt @@ -10,7 +10,7 @@ class MainActivity : ComponentActivity() { super.onCreate(savedInstanceState) setContent { JobisDesignSystemV2Theme { - + JobisApp() } } } From bde58276ecd3329635cc861e73bed8c48770e070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=AE=E1=86=AB?= Date: Mon, 15 Jan 2024 13:53:48 +0900 Subject: [PATCH 3/5] feat :: AuthNavigation --- .../jobisandroidv2/navigation/AuthNavigation.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt diff --git a/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt new file mode 100644 index 000000000..dce6fa5f4 --- /dev/null +++ b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt @@ -0,0 +1,15 @@ +package team.retum.jobisandroidv2.navigation + +import androidx.navigation.NavGraphBuilder +import androidx.navigation.navigation + +const val NAVIGATION_AUTH = "auth" + +internal fun NavGraphBuilder.authNavigation() { + navigation( + route = NAVIGATION_AUTH, + startDestination = "", + ) { + // TODO auth 관련 스크린 위치 + } +} From 929360e0adaf208903d1abb9fc5ea5f59a0d0dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=AE=E1=86=AB?= Date: Mon, 15 Jan 2024 13:53:56 +0900 Subject: [PATCH 4/5] feat :: HomeNavigation --- .../jobisandroidv2/navigation/HomeNavigation.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/src/main/java/team/retum/jobisandroidv2/navigation/HomeNavigation.kt diff --git a/app/src/main/java/team/retum/jobisandroidv2/navigation/HomeNavigation.kt b/app/src/main/java/team/retum/jobisandroidv2/navigation/HomeNavigation.kt new file mode 100644 index 000000000..3e7e7de2b --- /dev/null +++ b/app/src/main/java/team/retum/jobisandroidv2/navigation/HomeNavigation.kt @@ -0,0 +1,15 @@ +package team.retum.jobisandroidv2.navigation + +import androidx.navigation.NavGraphBuilder +import androidx.navigation.navigation + +const val NAVIGATION_HOME = "home" + +internal fun NavGraphBuilder.homeNavigation() { + navigation( + route = NAVIGATION_HOME, + startDestination = "", + ) { + // TODO home 관련 스크린 위치 + } +} From f91ec363b5f13980769ffcbd83f2c88544652e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=89=E1=85=B3=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=AE=E1=86=AB?= Date: Mon, 15 Jan 2024 13:58:54 +0900 Subject: [PATCH 5/5] feat :: MainNavigation --- .../java/team/retum/jobisandroidv2/JobisApp.kt | 4 ++-- .../jobisandroidv2/navigation/MainNavigation.kt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/team/retum/jobisandroidv2/navigation/MainNavigation.kt diff --git a/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt b/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt index 0e57d6f40..30b83616d 100644 --- a/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt +++ b/app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt @@ -5,7 +5,7 @@ import androidx.navigation.compose.NavHost import androidx.navigation.compose.rememberNavController import team.retum.jobisandroidv2.navigation.NAVIGATION_AUTH import team.retum.jobisandroidv2.navigation.authNavigation -import team.retum.jobisandroidv2.navigation.homeNavigation +import team.retum.jobisandroidv2.navigation.mainNavigation @Composable internal fun JobisApp() { @@ -15,6 +15,6 @@ internal fun JobisApp() { startDestination = NAVIGATION_AUTH, ) { authNavigation() - homeNavigation() + mainNavigation() } } diff --git a/app/src/main/java/team/retum/jobisandroidv2/navigation/MainNavigation.kt b/app/src/main/java/team/retum/jobisandroidv2/navigation/MainNavigation.kt new file mode 100644 index 000000000..3507b6704 --- /dev/null +++ b/app/src/main/java/team/retum/jobisandroidv2/navigation/MainNavigation.kt @@ -0,0 +1,15 @@ +package team.retum.jobisandroidv2.navigation + +import androidx.navigation.NavGraphBuilder +import androidx.navigation.navigation + +const val NAVIGATION_MAIN = "main" + +fun NavGraphBuilder.mainNavigation(){ + navigation( + route = NAVIGATION_MAIN, + startDestination = "", + ){ + // TODO main 관련 스크린 위치 + } +}