diff --git a/app/build.gradle b/app/build.gradle index 4c3ccb0..cc82eda 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,20 +65,19 @@ dependencies { implementation platform("androidx.compose:compose-bom:2023.01.00") implementation project(':navi-uitron') - implementation 'androidx.appcompat:appcompat:1.4.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.core:core-ktx:1.8.0' - implementation 'com.google.android.material:material:1.8.0' - implementation 'androidx.activity:activity-compose:1.5.0' + implementation 'com.google.android.material:material:1.9.0' + implementation 'androidx.activity:activity-compose:1.7.2' implementation "androidx.compose.material:material" implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui-graphics' implementation 'androidx.compose.ui:ui-tooling-preview' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' - implementation 'com.google.code.gson:gson:2.8.9' - implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha02" - implementation "io.coil-kt:coil-compose:2.2.2" + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' + implementation 'com.google.code.gson:gson:2.10.1' + implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10" testImplementation "junit:junit:4.13.2" - androidTestImplementation "androidx.test.ext:junit:1.1.4" + androidTestImplementation "androidx.test.ext:junit:1.1.5" androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' implementation "androidx.navigation:navigation-compose:$nav_version" implementation 'androidx.profileinstaller:profileinstaller:1.3.1' diff --git a/build.gradle b/build.gradle index ffad80b..2dfefca 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - nav_version = "2.5.3" + nav_version = "2.6.0" } } plugins { diff --git a/navi-uitron/build.gradle b/navi-uitron/build.gradle index 70a8f8d..974c1ce 100644 --- a/navi-uitron/build.gradle +++ b/navi-uitron/build.gradle @@ -81,24 +81,24 @@ publishing { } dependencies { - implementation platform("androidx.compose:compose-bom:2023.01.00") + implementation platform("androidx.compose:compose-bom:2023.06.01") implementation "androidx.compose.ui:ui" implementation "androidx.compose.material:material" implementation "androidx.compose.ui:ui-tooling-preview" implementation "com.google.accompanist:accompanist-pager:0.23.1" implementation "com.google.accompanist:accompanist-pager-indicators:0.23.1" - implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha02" - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' - implementation 'androidx.activity:activity-compose:1.5.0' + implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' + implementation 'androidx.activity:activity-compose:1.7.2' implementation 'androidx.core:core-ktx:1.8.0' - implementation 'com.google.code.gson:gson:2.8.9' + implementation 'com.google.code.gson:gson:2.10.1' implementation 'androidx.hilt:hilt-navigation-compose:1.0.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.9.0' implementation "org.mvel:mvel2:2.4.15.Final" implementation "com.airbnb.android:lottie-compose:5.2.0" - api "io.coil-kt:coil-compose:2.2.2" + api "io.coil-kt:coil-compose:2.4.0" testImplementation "junit:junit:4.13.2" - androidTestImplementation "androidx.test.ext:junit:1.1.4" + androidTestImplementation "androidx.test.ext:junit:1.1.5" } diff --git a/navi-uitron/src/main/java/com/navi/uitron/render/AutoScrollViewRenderer.kt b/navi-uitron/src/main/java/com/navi/uitron/render/AutoScrollViewRenderer.kt index 3a07c2c..3ba093b 100644 --- a/navi-uitron/src/main/java/com/navi/uitron/render/AutoScrollViewRenderer.kt +++ b/navi-uitron/src/main/java/com/navi/uitron/render/AutoScrollViewRenderer.kt @@ -1,7 +1,7 @@ package com.navi.uitron.render import androidx.compose.animation.AnimatedContent -import androidx.compose.animation.AnimatedContentScope +import androidx.compose.animation.AnimatedContentTransitionScope import androidx.compose.animation.ContentTransform import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.slideInHorizontally @@ -117,7 +117,7 @@ class AutoScrollViewRenderer( } } - private fun getTransformation(direction: String?): AnimatedContentScope.() -> ContentTransform { + private fun getTransformation(direction: String?): AnimatedContentTransitionScope.() -> ContentTransform { return { when (direction) { Direction.TOP_TO_BOTTOM.name -> { diff --git a/navi-uitron/src/main/java/com/navi/uitron/render/JackpotTextRenderer.kt b/navi-uitron/src/main/java/com/navi/uitron/render/JackpotTextRenderer.kt index 2af7fb4..ce1f2e6 100644 --- a/navi-uitron/src/main/java/com/navi/uitron/render/JackpotTextRenderer.kt +++ b/navi-uitron/src/main/java/com/navi/uitron/render/JackpotTextRenderer.kt @@ -122,13 +122,13 @@ class JackpotTextRenderer : Renderer { } } - private fun bottomUpTransformation(): AnimatedContentScope.() -> ContentTransform { + private fun bottomUpTransformation(): AnimatedContentTransitionScope.() -> ContentTransform { return { slideInVertically { it } with slideOutVertically { -it } } } - private fun topDownTransformation(): AnimatedContentScope.() -> ContentTransform { + private fun topDownTransformation(): AnimatedContentTransitionScope.() -> ContentTransform { return { slideInVertically { -it } with slideOutVertically { it } } diff --git a/navi-uitron/src/main/java/com/navi/uitron/render/ToastRenderer.kt b/navi-uitron/src/main/java/com/navi/uitron/render/ToastRenderer.kt index 3fc20d7..4d09b94 100644 --- a/navi-uitron/src/main/java/com/navi/uitron/render/ToastRenderer.kt +++ b/navi-uitron/src/main/java/com/navi/uitron/render/ToastRenderer.kt @@ -15,8 +15,8 @@ import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.platform.LocalSavedStateRegistryOwner -import androidx.lifecycle.ViewTreeLifecycleOwner -import androidx.lifecycle.ViewTreeViewModelStoreOwner +import androidx.lifecycle.setViewTreeLifecycleOwner +import androidx.lifecycle.setViewTreeViewModelStoreOwner import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import androidx.savedstate.setViewTreeSavedStateRegistryOwner import com.navi.uitron.model.data.ToastData @@ -77,8 +77,8 @@ class ToastRenderer( } } } - ViewTreeLifecycleOwner.set(views, LocalLifecycleOwner.current) - ViewTreeViewModelStoreOwner.set(views, LocalViewModelStoreOwner.current) + views.setViewTreeLifecycleOwner(LocalLifecycleOwner.current) + views.setViewTreeViewModelStoreOwner(LocalViewModelStoreOwner.current) views.setViewTreeSavedStateRegistryOwner(LocalSavedStateRegistryOwner.current) setGravity(getGravity(property.gravity), dpToPx(property.xOffset.orZero()).toInt(), dpToPx(property.yOffset.orZero()).toInt() @@ -86,7 +86,6 @@ class ToastRenderer( view = views }.show() } - uiTronViewModel.handleActions(toastData?.onDismiss) } }