Skip to content
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

Merged
merged 4 commits into from Aug 11, 2020
Merged

Support for compose 0.1.0-dev16 #38

merged 4 commits into from Aug 11, 2020

Conversation

dshatz
Copy link

@dshatz dshatz commented Aug 10, 2020

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.

@zsoltk
Copy link
Owner

zsoltk commented Aug 10, 2020

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.

@galex
Copy link

galex commented Aug 10, 2020

I was looking for this update too, thanks for submitting this PR!
Let's hope @zsoltk can release a new version quickly 👍

@dshatz
Copy link
Author

dshatz commented Aug 10, 2020

Example apps seem to be ok.
I removed the star imports too.
@zsoltik take a look again pls:)

@dshatz dshatz requested a review from zsoltk August 10, 2020 17:09
Copy link
Contributor

@ShikaSD ShikaSD left a 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 {
Copy link
Contributor

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"
Copy link
Contributor

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
}

@zsoltk
Copy link
Owner

zsoltk commented Aug 11, 2020

@dshatz can you please fix the above findings and I'll merge & release right away.

@dshatz
Copy link
Author

dshatz commented Aug 11, 2020

@dshatz can you please fix the above findings and I'll merge & release right away.

@zsoltk Should be fine now

@zsoltk zsoltk merged commit 3da0929 into zsoltk:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants