Monday, August 8, 2022
HomeMobileImpartial versioning of Jetpack Compose libraries

Impartial versioning of Jetpack Compose libraries

Posted by Jolanda Verhoef, Android Developer Relations Engineer

Beginning right this moment, the assorted Jetpack Compose libraries will transfer to impartial versioning schemes. This creates the likelihood for sub-groups reminiscent of androidx.compose.compiler or androidx.compose.animation to observe their very own launch cycles.

Permitting these libraries to be versioned independently will decouple dependencies which have been beforehand implicitly coupled, thereby making it simpler to incrementally improve your utility and subsequently keep up-to-date with the most recent Compose options.

The primary library to interrupt away from the only Compose model is the Compose Compiler. Right this moment we’re releasing the 1.2.0 steady model that brings assist for Kotlin 1.7.0! The discharge is each backwards and forwards suitable with the Compose UI libraries and the Compose Runtime library. This implies you possibly can improve your Compose Compiler to 1.2.0 steady and use Kotlin 1.7.0, whereas leaving your different Compose libraries on their present model, for instance 1.1.0 steady.

To improve the model of the Compose Compiler in your app, specify the kotlinCompilerExtensionVersion in your construct.gradle file. 

android {
    composeOptions {
        kotlinCompilerExtensionVersion = "1.2.0"

Compose and Kotlin are extremely coupled, and we’ve heard your suggestions that Compose compiler updates are wanted to permit you to improve your Kotlin model. We wish to just remember to can use the most recent and biggest options (and bug fixes) from each Compose and Kotlin, which is why we plan to launch steady variations of the Compose Compiler on a way more common foundation. This implies the Compose Compiler model numbers will progress at a quicker tempo than most different Compose libraries. For the reason that Compose Compiler is each forwards and backwards suitable, it is possible for you to to improve it as quickly as a brand new model is launched.

The Compose Compiler is constructed as a Kotlin Compiler Plugin, and so you should use a model of the Compose Compiler which is suitable with the model of Kotlin that you’ve chosen. That can assist you select the model that matches your undertaking, take a look at the Compose-Kotlin compatibility map.

Transferring the Compiler library to a unique versioning scheme is step one in decoupling versioning for the totally different Compose library teams. You’ll see new steady releases for the opposite Compose libraries within the subsequent few weeks, after which they’ll then begin following their very own launch cycles impartial of the Compose Compiler.

Put together your construct for particular person versioning and begin utilizing the most recent Compose Compiler and Kotlin variations now!

We stay up for seeing what you construct with Compose!



Please enter your comment!
Please enter your name here

Most Popular