Skip to content

Commit

Permalink
Setting navigation
Browse files Browse the repository at this point in the history
Setting navigation
  • Loading branch information
Tmdhoon2 authored Jan 15, 2024
2 parents aaecfaf + f91ec36 commit fbe8de2
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {

defaultConfig {
applicationId = "team.retum.jobisandroidv2"
minSdk = 26
minSdk = 28
targetSdk = 34
versionCode = 1
versionName = "1.0"
Expand Down Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions app/src/main/java/team/retum/jobisandroidv2/JobisApp.kt
Original file line number Diff line number Diff line change
@@ -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.mainNavigation

@Composable
internal fun JobisApp() {
val navController = rememberNavController()
NavHost(
navController = navController,
startDestination = NAVIGATION_AUTH,
) {
authNavigation()
mainNavigation()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
setContent {
JobisDesignSystemV2Theme {

JobisApp()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 관련 스크린 위치
}
}
Original file line number Diff line number Diff line change
@@ -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 관련 스크린 위치
}
}
Original file line number Diff line number Diff line change
@@ -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 관련 스크린 위치
}
}
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
Expand Down

0 comments on commit fbe8de2

Please sign in to comment.