Posted by Jolanda Verhoef, Android Developer Relations Engineer
Beginning at present, the varied Jetpack Compose libraries will transfer to unbiased versioning schemes. This creates the likelihood for sub-groups reminiscent of 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 had been beforehand implicitly coupled, thereby making it simpler to incrementally improve your software and due to this fact keep up-to-date with the newest 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 appropriate 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 can help you improve your Kotlin model. We need to just be sure you can use the newest and best 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 sooner 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 should use a model of the Compose Compiler which is appropriate with the model of Kotlin that you’ve chosen. That can assist you select the model that matches your mission, try the Compose-Kotlin compatibility map.
Shifting the Compiler library to a special versioning scheme is step one in decoupling versioning for the completely different Compose library teams. You’ll see new steady 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 stay up for seeing what you construct with Compose!