-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Kotlin to 2.0.0, Compose to 1.6.10, kotlinx-serialization to 1.6.3, AGP to 8.2.0 #718
Conversation
WalkthroughThis update focuses on enhancing the Kotlin and Compose dependencies across various modules, introducing new animation interfaces for Compose, and refining the build configuration. Key changes include updating Kotlin to version 2.0.0, Compose to 1.6.10, and removing deprecated suppression directives. Additionally, the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
gradle/wrapper/gradle-wrapper.jar
is excluded by!**/*.jar
kotlin-js-store/yarn.lock
is excluded by!**/*.lock
Files selected for processing (24)
- .gitignore (1 hunks)
- build.gradle.kts (2 hunks)
- decompose/api/android/decompose.api (1 hunks)
- decompose/api/decompose.klib.api (1 hunks)
- decompose/api/jvm/decompose.api (1 hunks)
- decompose/src/commonMain/kotlin/com/arkivanov/decompose/Lock.kt (1 hunks)
- decompose/src/jsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- decompose/src/wasmJsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- decompose/src/webMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- deps.versions.toml (2 hunks)
- extensions-compose/api/extensions-compose.klib.api (1 hunks)
- extensions-compose/build.gradle.kts (1 hunks)
- gradle.properties (1 hunks)
- gradle/wrapper/gradle-wrapper.properties (1 hunks)
- gradlew (4 hunks)
- gradlew.bat (3 hunks)
- sample/app-android/build.gradle.kts (1 hunks)
- sample/app-desktop/build.gradle.kts (1 hunks)
- sample/app-js-compose/build.gradle.kts (2 hunks)
- sample/shared/compose/build.gradle.kts (1 hunks)
- sample/shared/dynamic-features/compose-api/build.gradle.kts (1 hunks)
- sample/shared/dynamic-features/feature1Impl/build.gradle.kts (2 hunks)
- sample/shared/dynamic-features/feature2Impl/build.gradle.kts (2 hunks)
- settings.gradle.kts (1 hunks)
Files not summarized due to errors (1)
- decompose/api/decompose.klib.api: Error: Message exceeds token limit
Files skipped from review due to trivial changes (12)
- .gitignore
- decompose/api/android/decompose.api
- decompose/src/commonMain/kotlin/com/arkivanov/decompose/Lock.kt
- decompose/src/wasmJsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt
- gradle.properties
- gradle/wrapper/gradle-wrapper.properties
- gradlew.bat
- sample/app-android/build.gradle.kts
- sample/app-desktop/build.gradle.kts
- sample/app-js-compose/build.gradle.kts
- sample/shared/compose/build.gradle.kts
- settings.gradle.kts
Additional comments not posted (37)
decompose/src/webMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1)
3-8
: The changes correctly apply Kotlin's override conventions to the properties and methods ofDefaultWebHistoryControllerWindow
.sample/shared/dynamic-features/compose-api/build.gradle.kts (1)
9-9
: The addition of theorg.jetbrains.kotlin.plugin.compose
plugin aligns with the project's update to Compose version 1.6.10.decompose/src/jsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1)
5-7
: The use ofactual override
keywords correctly specifies that these members are platform-specific implementations overriding those in a common module.extensions-compose/build.gradle.kts (1)
14-14
: The addition of theorg.jetbrains.kotlin.plugin.compose
plugin aligns with the project's update to Compose version 1.6.10.sample/shared/dynamic-features/feature1Impl/build.gradle.kts (1)
11-11
: The addition of theorg.jetbrains.kotlin.plugin.compose
plugin and the configuration changes in thecomposeCompiler
and tasks are well-aligned with the project's goals. Ensure that the task dependencies are correctly configured to avoid build issues.Also applies to: 59-70
sample/shared/dynamic-features/feature2Impl/build.gradle.kts (1)
11-11
: The addition of theorg.jetbrains.kotlin.plugin.compose
plugin and the configuration changes in thecomposeCompiler
and tasks are well-aligned with the project's goals. Ensure that the task dependencies are correctly configured to avoid build issues.Also applies to: 59-70
build.gradle.kts (2)
22-22
: Added classpath dependencies for Kotlin Compose and serialization plugins.
50-50
: Enabled Kotlin/Native library format in binary compatibility settings.deps.versions.toml (1)
4-14
: Updated versions for Kotlin, Compose, kotlinx-serialization, and other dependencies.Also applies to: 39-39
gradlew (1)
58-58
: Enhanced error handling, set default JVM options, and improved script robustness.Also applies to: 83-87, 134-140, 147-156, 201-209
decompose/api/jvm/decompose.api (1)
Line range hint
1-209
: API declarations indecompose/api/jvm/decompose.api
appear well-defined and consistent.Verification successful
The issue found in the project's issue tracker is a feature request for enhancing the API to support shared element transitions between screens. This does not indicate any problems with the current API changes.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of API changes with the rest of the project. # Test: Check for any issues related to the API in the project's issue tracker. gh issue list --search "decompose/api"Length of output: 225
extensions-compose/api/extensions-compose.klib.api (7)
9-11
: IntroducedStackAnimation
interface with a complex function signature.Ensure that the types and parameters used here are consistent with the rest of the codebase and that they integrate well with existing functionalities.
12-14
: IntroducedStackAnimator
interface with a function that seems to handle direction and animation logic.This addition should enhance the flexibility of animation handling in the stack. Verify that the implementation details align with the overall animation strategy of the application.
15-23
: AddedPredictiveBackAnimatable
interface for handling predictive back animations.This is a significant addition for improving user experience by predicting back animations. It's important to ensure that this interface is implemented correctly across different platforms supported by the library.
24-26
: IntroducedStackAnimationProvider
interface.This interface seems to serve as a factory for
StackAnimation
objects, which could be crucial for managing different animation strategies dynamically.
27-36
: AddedDirection
enum with entries for different animation directions.This enum will help in clearly defining the direction of animations and should be used consistently throughout the animation handling code.
37-37
: Added a function to combine twoStackAnimator
instances.This function will likely be useful for creating composite animations. Ensure that the combination logic is defined clearly and works as expected.
79-94
: IntroducedPagesScrollAnimation
with variantsCustom
,Default
, andDisabled
.These additions provide configurable options for scroll animations in pages, which can enhance the visual experience. Make sure to document the differences and use cases for each variant to aid developers in choosing the right one for their needs.
decompose/api/decompose.klib.api (19)
8-8
: The library unique name is correctly specified, ensuring proper identification within the Kotlin ecosystem.
14-14
: The constructor forMutableValue
is correctly defined without parameters, which is standard for Kotlin abstract classes.
20-20
: The constructor forValue
is also correctly defined without parameters, maintaining consistency with Kotlin's abstract class conventions.
23-23
: TheComponentContextFactory
interface correctly defines a single abstract method, adhering to Kotlin's functional interface requirements.
26-26
: TheCancellation
interface'scancel
method is essential for managing lifecycle events in reactive programming, ensuring resources are properly released.
30-30
: The constructor forPagesNavigation.Event
is defined with default parameters, which enhances flexibility in event handling by allowing partial customizations.
38-38
: ThePagesNavigator
interface'snavigate
method is crucial for managing navigation events, and it's defined to accept both a transformer and a completion handler, which is a robust design choice.
[APROVED]
42-42
: The constructor forSlotNavigation.Event
includes optional parameters, providing flexibility in how events are handled within slot navigations.
50-50
: TheSlotNavigator
interface'snavigate
method is well-defined, allowing for custom navigation logic, which is vital for a navigation framework.
54-54
: The constructor forStackNavigation.Event
is designed with optional parameters, facilitating customization in stack navigation handling.
62-62
: TheStackNavigator
interface'snavigate
method is appropriately defined to handle list transformations, which is essential for managing navigation stacks.
99-99
: The constructor forSimpleNavigation
is defined without parameters, which is typical for Kotlin classes intended for simple navigation scenarios.
104-104
: The constructor forChildPages
is defined with parameters to initialize the state, which is crucial for maintaining the integrity of navigation states.
118-118
: The constructor forChildSlot
includes an optional parameter, allowing for the initialization of the slot with an existing child, which is a flexible design choice.
128-128
: The constructor forChildStack
is defined with parameters to initialize both the active child and the back stack, which is essential for managing complex navigation scenarios.
144-144
: The constructor forSimpleChildNavState
is defined with parameters to initialize both the configuration and the status, ensuring that the navigation state is correctly set up from the start.
157-157
: The constructor forPages
is defined without parameters, simplifying the creation of new pages instances when no initial state is provided.
171-171
: The constructor forDefaultComponentContext
is defined with a mandatoryLifecycle
parameter, ensuring that every component context is bound to a lifecycle, which is a critical aspect of managing component states.
289-289
: The constructor forDefaultWebHistoryController
is defined without parameters, which is appropriate for classes that manage web history in a standardized way without needing initial configuration.
…1.6.3, AGP to 8.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
gradle/wrapper/gradle-wrapper.jar
is excluded by!**/*.jar
kotlin-js-store/yarn.lock
is excluded by!**/*.lock
Files selected for processing (29)
- .gitignore (1 hunks)
- build.gradle.kts (3 hunks)
- decompose/api/android/decompose.api (1 hunks)
- decompose/api/decompose.klib.api (1 hunks)
- decompose/api/jvm/decompose.api (1 hunks)
- decompose/src/commonMain/kotlin/com/arkivanov/decompose/Lock.kt (1 hunks)
- decompose/src/jsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- decompose/src/wasmJsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- decompose/src/webMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt (1 hunks)
- deps.versions.toml (2 hunks)
- extensions-compose/api/extensions-compose.klib.api (1 hunks)
- extensions-compose/build.gradle.kts (1 hunks)
- gradle.properties (1 hunks)
- gradle/wrapper/gradle-wrapper.properties (1 hunks)
- gradlew (4 hunks)
- gradlew.bat (3 hunks)
- sample/app-android/build.gradle.kts (1 hunks)
- sample/app-desktop/build.gradle.kts (1 hunks)
- sample/app-js-compose/build.gradle.kts (2 hunks)
- sample/shared/compose/build.gradle.kts (1 hunks)
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/cards/CardsContent.kt (1 hunks)
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/cards/card/CardContent.kt (1 hunks)
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/counters/CountersContent.kt (1 hunks)
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContent.kt (1 hunks)
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/pages/PagesContent.kt (4 hunks)
- sample/shared/dynamic-features/compose-api/build.gradle.kts (1 hunks)
- sample/shared/dynamic-features/feature1Impl/build.gradle.kts (2 hunks)
- sample/shared/dynamic-features/feature2Impl/build.gradle.kts (2 hunks)
- settings.gradle.kts (1 hunks)
Files not summarized due to errors (1)
- decompose/api/decompose.klib.api: Error: Message exceeds token limit
Files skipped from review due to trivial changes (6)
- decompose/src/webMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/cards/CardsContent.kt
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/cards/card/CardContent.kt
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/counters/CountersContent.kt
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContent.kt
- sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/pages/PagesContent.kt
Files skipped from review as they are similar to previous changes (21)
- .gitignore
- build.gradle.kts
- decompose/api/android/decompose.api
- decompose/api/jvm/decompose.api
- decompose/src/commonMain/kotlin/com/arkivanov/decompose/Lock.kt
- decompose/src/jsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt
- decompose/src/wasmJsMain/kotlin/com/arkivanov/decompose/router/stack/webhistory/DefaultWebHistoryControllerWindow.kt
- deps.versions.toml
- extensions-compose/build.gradle.kts
- gradle.properties
- gradle/wrapper/gradle-wrapper.properties
- gradlew
- gradlew.bat
- sample/app-android/build.gradle.kts
- sample/app-desktop/build.gradle.kts
- sample/app-js-compose/build.gradle.kts
- sample/shared/compose/build.gradle.kts
- sample/shared/dynamic-features/compose-api/build.gradle.kts
- sample/shared/dynamic-features/feature1Impl/build.gradle.kts
- sample/shared/dynamic-features/feature2Impl/build.gradle.kts
- settings.gradle.kts
Additional comments not posted (17)
extensions-compose/api/extensions-compose.klib.api (11)
9-11
: IntroducedStackAnimation
interface with a function that takes multiple parameters including aChildStack
,Modifier
, and aFunction3
for handling child creation. This setup allows for custom animations based on the child stack changes.
12-14
: IntroducedStackAnimator
interface with a function that supports directional animations and cancellation. This provides a flexible base for implementing various stack-based animations.
15-22
: AddedPredictiveBackAnimatable
interface with methods for animation control and properties for enter and exit modifiers. This is crucial for implementing animations that predict user actions like back navigation.
24-26
: IntroducedStackAnimationProvider
interface to abstract the provision ofStackAnimation
instances. This design supports dependency injection and makes the animation system more modular.
27-36
: DefinedDirection
enum with entries likeENTER_BACK
andEXIT_FRONT
. This clear distinction in navigation directions will aid in implementing context-specific animations.
37-45
: Added various functions to extendStackAnimator
and handle child stacks. These additions enhance the flexibility and reusability of stack animations within the framework.
46-50
: Enhanced subscription and gesture handling capabilities for Compose UI components. These functions facilitate the integration of state and gesture responses into the Compose lifecycle.
51-53
: Introduced functions for predictive back animations on different platforms (Android, Material). This cross-platform support is essential for maintaining consistent user experience across devices.
54-56
: Added animation functions likefade
,scale
, andslide
which utilizeFiniteAnimationSpec
. These functions provide basic but essential animations that can be easily configured and applied.
57-58
: ThestackAnimator
function with aFiniteAnimationSpec
parameter allows for detailed configuration of animations, enhancing the visual dynamics of the application.
79-94
: DefinedPagesScrollAnimation
with variantsCustom
,Default
, andDisabled
. This setup allows developers to choose the appropriate scrolling animation behavior or disable it entirely.decompose/api/decompose.klib.api (6)
246-248
: The introduction ofExperimentalDecomposeApi
annotation is noted. Ensure that it is used judiciously to avoid exposing unstable API elements in production.
249-251
: The introduction ofFaultyDecomposeApi
annotation is noted. This should be used to mark APIs that are known to have issues. Ensure that these APIs are either fixed or documented clearly.
252-254
: The introduction ofInternalDecomposeApi
annotation is noted. Ensure that it is used to protect internal APIs from being used externally.
8-8
: Ensure the library unique name is correctly specified and aligns with the project's naming conventions.Verification successful
The library unique name
com.arkivanov.decompose:decompose
is consistently used across the project files, including build scripts and documentation.
tools/check-publication/build.gradle.kts
decompose/api/decompose.klib.api
docs/getting-started/installation.md
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the library name consistency across the project. # Test: Search for the library name in project files. Expect: Consistent naming. rg --type kotlin "com.arkivanov.decompose:decompose"Length of output: 166
Script:
#!/bin/bash # Description: Verify the library name consistency across the project. # Test: Search for the library name in all project files. Expect: Consistent naming. rg "com.arkivanov.decompose:decompose"Length of output: 660
287-293
: The implementation ofDefaultWebHistoryController
should be reviewed to ensure it aligns with the new routing and navigation requirements.
243-245
: Review the error handling strategy foronDecomposeError
.Verification successful
The
onDecomposeError
function is used consistently across different platform-specific implementations to handle errors when the main thread check fails. The function is defined inErrorHandlers.kt
and defaults to printing the error via::printError
.Locations to Review:
decompose/src/jvmMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt
decompose/src/darwinMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt
decompose/src/androidMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt
decompose/src/commonMain/kotlin/com/arkivanov/decompose/errorhandler/ErrorHandlers.kt
The error handling strategy appears to be consistent and appropriate across the different platforms.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `onDecomposeError` across the project to ensure it's being used appropriately. # Test: Search for the usage of `onDecomposeError`. Expect: Proper error handling. rg --type kotlin "onDecomposeError"Length of output: 1182
Script:
#!/bin/bash # Extract the relevant code snippets where `onDecomposeError` is used to verify the error handling strategy. # Extract usage in JVM main thread check echo "JVM Main Thread Check:" rg --type kotlin -A 5 -B 5 "onDecomposeError" decompose/src/jvmMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt # Extract usage in Darwin main thread check echo "Darwin Main Thread Check:" rg --type kotlin -A 5 -B 5 "onDecomposeError" decompose/src/darwinMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt # Extract usage in Android main thread check echo "Android Main Thread Check:" rg --type kotlin -A 5 -B 5 "onDecomposeError" decompose/src/androidMain/kotlin/com/arkivanov/decompose/mainthread/CheckMainThread.kt # Extract the definition of `onDecomposeError` in ErrorHandlers.kt echo "ErrorHandlers.kt Definition:" rg --type kotlin -A 5 -B 5 "onDecomposeError" decompose/src/commonMain/kotlin/com/arkivanov/decompose/errorhandler/ErrorHandlers.ktLength of output: 2079
Closes #717
Summary by CodeRabbit
New Features
Updates
Bug Fixes
gradlew
andgradlew.bat
scripts.Enhancements
Chores
.gitignore
to include the.kotlin
directory.org.jetbrains.kotlin.plugin.compose
plugin across various build files for better Compose support.