Posted by Jolanda Verhoef, Android Developer Relations Engineer
Beginning immediately, the assorted Jetpack Compose libraries will transfer to unbiased versioning schemes. This creates the chance for sub-groups similar to androidx.compose.compiler or androidx.compose.animation to comply with 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 software and subsequently keep up-to-date with the newest Compose options.
The primary library to interrupt away from the only Compose model is the Compose Compiler. At this time we’re releasing the 1.2.0 secure model that brings assist for Kotlin 1.7.0! The discharge is each backwards and forwards appropriate with the Compose UI libraries and the Compose Runtime library. This implies you possibly can improve your Compose Compiler to 1.2.0 secure and use Kotlin 1.7.0, whereas leaving your different Compose libraries on their present model, for instance 1.1.0 secure.
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 newest and best options (and bug fixes) from each Compose and Kotlin, which is why we plan to launch secure 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 appropriate, 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 need to use a model of the Compose Compiler which is appropriate with the model of Kotlin that you’ve got chosen. That will help you select the model that matches your challenge, try the Compose-Kotlin compatibility map.
Shifting the Compiler library to a distinct versioning scheme is step one in decoupling versioning for the completely different Compose library teams. You’ll see new secure releases for the opposite Compose libraries within the subsequent few weeks, after which they are going to then begin following their very own launch cycles unbiased of the Compose Compiler.
Put together your construct for particular person versioning and begin utilizing the newest Compose Compiler and Kotlin variations now!
We look ahead to seeing what you construct with Compose!