jetc.dev Newsletter Issue #29
Published: 2020-09-01
The alpha has arrived!
Last week saw the long-anticipated release of 1.0.0-alpha01
, marking the start
of the next phase of Jetpack Compose development. In this extra-long issue, we will
look at a lot of official and semi-official announcement materials from Google,
plus state management and a showcase for your composables. Plus: when might the
beta show up! š
Note that 1.0.0-alpha01
is almost identical to the dev17
release that
preceded it. As a result, we have no significant code changes to deal with, other
than updating our dependencies. It also means that there is very little in the
release notes worth mentioning. Unfortunately, as this issue will illustrate,
we have some tooling troubles to spoil the fun for some.
Alpha Announcements
A special newsletter section, highlighting official posts and videos for the Compose alpha release!
Announcing Jetpack Compose Alpha!
This was Googleās official blog post, bringing the alpha to light!
Video: Thinking in Compose
This YouTube presentation by Googleās Leland Richardson explores Compose syntax, with a particular emphasis on why we use certain patterns, to go along with the how.
Video: Compose by Example
Googleās Nick Butcher continued the alpha series of YouTube videos, working through a Compose UI sample. However, this goes beyond just how to call and nest composables, getting into design themes and animations, among other topics.
Video: Compose for Existing Apps
Googleās Manuel Vivo and Chris Banes wrap up the YouTube video series, showing how you can migrate an app progressively to use Compose UI, rather than starting over from scratch. This includes blending Compose UI into your existing architecture, leveraging your existing resources, and more!
Understanding Jetpack Compose
This blog post, along with Part 2, are extensions of Leland Richardsonās YouTube video mentioned above. They dive into what makes Compose work and how that influences our decisions on how to craft composables.
Jetpack Team Reddit AMA
Androidās Jetpack team answered a bunch of questions posed by Redditors, including several related to Compose and Compose UI.
Android Developers Backstage #147: Jetpack Compose Alpha
If you prefer your Compose knowledge in podcast form, Googleās own Android Developers Backstage podcast offers up an episode focused on the Compose alpha release, featuring several members of the Compose team.
Twitter: Architecture in Compose
Googleās Sean McQuillan wrote an extended Twitter thread on some challenges that Google themselves ran into when applying Compose UI to their JetNews sample app.
One Off the Stack, One Off the Slack
Youāve got questions. Thatās understandable!
āSpace characters in SimpleNameā Error
There is a bug, either in the Compose compiler plugin or the Android Gradle Plugin, where we cannot use anonymous classes. We get a āSpace characters in SimpleNameā error.
Designer-Resistant Composables
Designers sometimes change the style of the app. With the classic View
system,
common look-and-feel aspects were often managed by style resources, so we could change
the style to match the designersā needs. In Compose UI, we will need to explore
alternatives, as we see in this weekās highlighted Slack thread.
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Android Studio Canary 8 Startup Issues
We were counting on Canary 8 to give us back support for @Preview
. Unfortunately,
for some developers (including me!), Canary 8 refuses to run on
Linux,
macOS,
and Chrome OS.
Jetpack Compose: How to handle states inside a Composable?
Here, GĆ©rard Paligot walks us through Compose state management. Note, though,
that the post includes coverage of state()
, which has been deprecated ā
one of the challenges of writing about a fast-moving technology.
Jetpack Compose ā State Management
Our material on state management continues, with Ali Azaz Alam reviewing
the use of mutableStateOf()
and remember()
for holding onto local state
within a composable tree.
Build and run Jetpack Compose for Desktop
Finally, Arne Stockmans shows us how to download and run the demo of
the ui-desktop
module from the Compose AOSP repository. On macOS, this will
show a Compose UI-based app running on the desktop. On other operating
systems, it will fail to buildā¦ but that is a limitation of WIP code.
Resource Roundup
100% pure code!
GitHub: android / compose-samples
This is Googleās official repository for their recently-released set of Compose UI samples, including the Jet* series: JetNews, Jetcaster, Jetchat, Jetsnack, and Jetsurvey.
GitHub: airbnb / Showkase
This library, from Vinay Gaba and the team at AirBnb,
builds a gallery of your @ShowkaseComposable
-annotated
composables. If you launch the supplied activity, it
will let you explore your composables, rendered for different scenarios
(text scale, dark mode, RTL, etc.). Since the composables are discovered
via an annotation processor, simply adding the @ShowkaseComposable
is
enough to get a composable to appear in the showcase.
ā¦And One More Thing
So, weāre finally out of developer preview mode and have an alpha release!
As I expected, though, while it is clearly a step forward, we should largely expect āmore of the sameā as what we have been seeing.
The general idea that weāve been following is that alpha is an indication of āthere is enough here to build something realā. But there is still no guarantee of API stability. Things will continue to change in alpha (though likely at a slower pace)
We will still get updates every two weeks or thereabouts, so expect a steady stream of updating your dependencies in Gradle if you want to stay on the current alpha. Those changes may break our code ā while there may be fewer breaking changes, there will still be some.
That is particularly true when you consider how long the alpha period might last. We know that Google wants to ship a stable release in 2021, but thatās it. Typically, Jetpack alpha release series are a lot longer than the betas, which in turn are a lot longer than the RCs. So, we might see something like:
- Betas beginning in May 2021
- RCs beginning in September 2021
- Stable in November 2021
Thatās just a guess, and the actual timing could wind up being quite a bit different. This timeframe is about as slow as it could go and still ship the stable release in 2021. But it illustrates that we may have 9 months of alpha releasesā¦ similar to the length of time that we had the developer previews.
So, even with a slow pace of changes, we may still wind up with quite a few
API changes before a beta01
release and a temporarily stable API.
āPatience is the watchwordā.
Still, clearly, an alpha release is a major achievement, and the Compose team deserves all of the acclaim that has been coming their way since the alpha announcements. Many thanks to all who have contributed!
And now, let the composing commence!
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2024-12-10: A Compose Multiplatform alpha! Hot reload! Presentation! Sprites! Calendars!
- 2024-12-03: Rebecca Franks on clipping and masking! Stefano Natali on graphicsLayer()! FunkyMuse on type-safe nav results! And... if we have enough maps, do we need to store our maps in a Map?!?
- 2024-11-26: Math! Shared element transitions! Custom modifiers! Macrobenchmark! Adapting to platform-specific design systems! And... why does wrapContentSize() not wrap my content size?!?