Skip to content

Commit

Permalink
Merge pull request #534 from igorescodro/renovate/compose.bom
Browse files Browse the repository at this point in the history
Update dependency androidx.compose:compose-bom to v2023.08.00
  • Loading branch information
igorescodro authored Aug 23, 2023
2 parents 9817595 + 6da4cf0 commit ed519e2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ dependencies {
implementation(libs.logcat)
implementation(libs.compose.navigation)
implementation(libs.compose.activity)
implementation(libs.accompanist.animation)
implementation(libs.accompanist.material)
implementation(libs.androidx.playcore)
implementation(libs.koin.android)
Expand Down
27 changes: 12 additions & 15 deletions app/src/main/java/com/escodro/alkaa/navigation/NavGraph.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package com.escodro.alkaa.navigation
import android.content.Context
import android.content.Intent
import android.net.Uri
import androidx.compose.animation.AnimatedContentScope
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.core.tween
import androidx.compose.material3.windowsizeclass.WindowSizeClass
import androidx.compose.runtime.Composable
Expand All @@ -13,7 +12,10 @@ import androidx.compose.ui.platform.LocalContext
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.NavType
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.dialog
import androidx.navigation.compose.rememberNavController
import androidx.navigation.navArgument
import androidx.navigation.navDeepLink
import com.escodro.alkaa.presentation.home.Home
Expand All @@ -26,9 +28,6 @@ import com.escodro.preference.presentation.OpenSource
import com.escodro.splitinstall.LoadFeature
import com.escodro.task.presentation.add.AddTaskBottomSheet
import com.escodro.task.presentation.detail.main.TaskDetailSection
import com.google.accompanist.navigation.animation.AnimatedNavHost
import com.google.accompanist.navigation.animation.composable
import com.google.accompanist.navigation.animation.rememberAnimatedNavController
import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
import com.google.accompanist.navigation.material.ModalBottomSheetLayout
import com.google.accompanist.navigation.material.bottomSheet
Expand All @@ -40,17 +39,17 @@ import com.google.accompanist.navigation.material.rememberBottomSheetNavigator
* @param windowSizeClass the window size class from current device
* @param startDestination the start destination of the graph
*/
@OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialNavigationApi::class)
@OptIn(ExperimentalMaterialNavigationApi::class)
@Composable
fun NavGraph(windowSizeClass: WindowSizeClass, startDestination: String = Destinations.Home) {
val bottomSheetNavigator = rememberBottomSheetNavigator()
val navController = rememberAnimatedNavController(bottomSheetNavigator)
val navController = rememberNavController(bottomSheetNavigator)
val context = LocalContext.current

val actions = remember(navController) { Actions(navController, context) }

ModalBottomSheetLayout(bottomSheetNavigator) {
AnimatedNavHost(navController = navController, startDestination = startDestination) {
NavHost(navController = navController, startDestination = startDestination) {
homeGraph(windowSizeClass, actions)
taskGraph(actions)
preferencesGraph(actions)
Expand All @@ -60,21 +59,20 @@ fun NavGraph(windowSizeClass: WindowSizeClass, startDestination: String = Destin
}
}

@OptIn(ExperimentalAnimationApi::class)
@Suppress("MagicNumber")
private fun NavGraphBuilder.homeGraph(windowSizeClass: WindowSizeClass, actions: Actions) {
composable(
route = Destinations.Home,
deepLinks = listOf(navDeepLink { uriPattern = DestinationDeepLink.HomePattern }),
enterTransition = {
slideIntoContainer(
AnimatedContentScope.SlideDirection.Right,
AnimatedContentTransitionScope.SlideDirection.Right,
animationSpec = tween(700),
)
},
exitTransition = {
slideOutOfContainer(
AnimatedContentScope.SlideDirection.Left,
AnimatedContentTransitionScope.SlideDirection.Left,
animationSpec = tween(700),
)
},
Expand All @@ -91,7 +89,7 @@ private fun NavGraphBuilder.homeGraph(windowSizeClass: WindowSizeClass, actions:
}
}

@OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialNavigationApi::class)
@OptIn(ExperimentalMaterialNavigationApi::class)
@Suppress("MagicNumber")
private fun NavGraphBuilder.taskGraph(actions: Actions) {
composable(
Expand All @@ -104,13 +102,13 @@ private fun NavGraphBuilder.taskGraph(actions: Actions) {
),
enterTransition = {
slideIntoContainer(
AnimatedContentScope.SlideDirection.Left,
AnimatedContentTransitionScope.SlideDirection.Left,
animationSpec = tween(700),
)
},
exitTransition = {
slideOutOfContainer(
AnimatedContentScope.SlideDirection.Right,
AnimatedContentTransitionScope.SlideDirection.Right,
animationSpec = tween(700),
)
},
Expand Down Expand Up @@ -151,7 +149,6 @@ private fun NavGraphBuilder.categoryGraph(actions: Actions) {
}
}

@OptIn(ExperimentalAnimationApi::class)
@Suppress("MagicNumber")
private fun NavGraphBuilder.preferencesGraph(actions: Actions) {
composable(route = Destinations.About) {
Expand Down
5 changes: 2 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lifecycle_viewmodel = "2.6.1"
# Compose
compose = "1.4.2"
compose_compiler = "1.4.6"
compose_bom = "2023.06.01"
compose_bom = "2023.08.00"
compose_nav = "2.5.3"
compose_viewmodel = "2.6.1"
compose_activity = "1.7.1"
Expand All @@ -50,7 +50,7 @@ koin_compose = "3.4.6"
koin_android = "3.4.3"

# Accompanist
accompanist = "0.30.1"
accompanist = "0.32.0"

# Test
test_junit = "4.13.2"
Expand Down Expand Up @@ -124,7 +124,6 @@ koin_compose = { module = "io.insert-koin:koin-androidx-compose", version.ref =
koin_test = { module = "io.insert-koin:koin-test", version.ref = "koin_test" }

# Accompanist
accompanist_animation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanist" }
accompanist_permission = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist_material = { module = "com.google.accompanist:accompanist-navigation-material", version.ref = "accompanist" }

Expand Down
2 changes: 1 addition & 1 deletion plugins/src/main/java/AlkaaVersions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object AlkaaVersions {
const val versionCode = 20207
const val versionName = "2.2.7"

const val compileSdk = 33
const val compileSdk = 34
const val targetSdk = 33
const val minSdk = 24
val javaCompileVersion = JavaVersion.VERSION_17
Expand Down

0 comments on commit ed519e2

Please sign in to comment.