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
Support for compose 0.1.0-dev16 #38
Conversation
Hello @dshatz, thanks for the PR. Can you please make sure the whole project builds fine (see failing GitHub Actions) and checking the example apps they're not broken visually. Cheers. |
I was looking for this update too, thanks for submitting this PR! |
router/src/main/java/com/github/zsoltk/compose/router/Router.kt
Outdated
Show resolved
Hide resolved
Example apps seem to be ok. |
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.
Thanks for this update!
It would be nice if you could correct two more small things :)
@@ -82,7 +82,7 @@ interface PhotosOfAlbum { | |||
val photoRows = album.photos.chunked(cols) | |||
|
|||
Box(modifier = Modifier.padding(4.dp)) { | |||
LazyColumnItems(photoRows) { row -> | |||
LazyColumnFor(photoRows) { row -> | |||
WithConstraints { | |||
Row { |
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.
Seems like it breaks layout of these albums now
Can you add modifier fillParentMaxWidth
to the Row
to make it work again? :)
build.gradle
Outdated
@@ -1,7 +1,7 @@ | |||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |||
buildscript { | |||
ext { | |||
compose_version = "0.1.0-dev15" | |||
compose_version = "0.1.0-dev16" | |||
kotlin_version = "1.4-M3" |
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.
compose works with 1.4.0-rc
version of Kotlin now, so it makes sense to upgrade it as well to avoid inconsistency on the client side.
if you can, please also update kotlinCompilerVersion
in other build.gradle files to match the version:
composeOptions {
kotlinCompilerVersion "1.4.0-rc"
kotlinCompilerExtensionVersion compose_version
}
@dshatz can you please fix the above findings and I'll merge & release right away. |
Hello, I noticed this library does not work on jetpack-compose dev16 (with errors like
Composable functions can only be used from other Composable functions.
). This is probably because @composable annotation had been refactored to another package in dev16 and so the compiler cannot match the two different @composable annotations.In this MR I have updated the dependency version to
0.1.0-dev16
and adjusted all the imports. It compiles on dev16 and works in my application.