jetc.dev Newsletter Issue #12
dev10 is out, bringing with it a compiler plugin update! We also have a bunch of articles from Joe Birch, a conference presentation, and a bit of shimmer.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
There was a Slack discussion on how to implement an animated gradient “shimmer”
effect in Compose. The thread wound up previewing a new top-level Compose
composed()) and reviewing whether
@Composable functions can return
values or not.
Posts, videos, and other new information related to Jetpack Compose!
The big change, by far, is the new Kotlin compiler plugin, based on a newer version of Kotlin. The updated plugin offers better support for annotation processors (kapt) and coroutines. It is still a pre-release implementation, but it should be several steps in the right direction.
By contrast, dev10 of Compose UI has no huge changes, but a lot of little ones.
FontLoader is gone, focus and blur events are consolidated on
Color parameters are now mostly non-nullable (use
Color.unset for a “null”
100% pure code!
…And One More Thing
dev10 is a major release, courtesy of the new compiler plugin. Make sure that
when you upgrade to
dev10 that you also set
1.3.70-dev-withExperimentalGoogleExtensions-20200424 in your
your module’s Gradle script.
As the name suggests, this plugin is based on Kotlin 1.3.70. There have been
reports of some hiccups in using newer Kotlin builds with this plugin, so if you
get strange results, try setting your
version in your top-level Gradle script to
1.3.70 to match the plugin version.
However, on the positive side, there are reports that you can now use
libraries like Room in a Compose module. Previously, you need to keep those
separate, due to conflicts between the annotation processors and the Compose
compiler plugin. And, there are reports that coroutines are working a lot
better, though there may still be some lingering issues with using Flow.
All in all, it is well worth trying to move to
dev10 soon, and major thanks go
out to the entire Compose development team for the updates!
If you encounter problems in subscribing, let us know!
- 2020-10-20: alpha05! ConstraintLayout! Semantics API! Epoxy vs. Compose! And Tetris!
- 2020-10-13: Staggered grids! Screenshot testing! Columns, and more columns! Tooltips! And security improvements!
- 2020-10-06: alpha04! Themes! Pagers! Tables! Presentations! But Not Stability!