what's minimal Kotlin and Gradle version requirement for Jetpack Compose

Viewed 98

I'm trying to integrate Jetpack compose into a long lasting project. It is currently using really old Kotlin 1.3 + gradle 3.5. But it very painful to update everything to newest. So what is the minimal requirement that I can get it working?

1 Answers

There is No way around it . you have to upgrade to latest version anyway at some point of time because of Compose artifact future releases . So if you are trying to use Compose in Old project better upgrade everything. This goes for Android Studio, kotlin, androidX and most of the first party libraries like nav-component, lifecycle, Accompanist etc.

Migrating to compose is not bread and butter stuff basically you have to re-write Whole UI layer again . Here is Doc describing the same thing. It also has a Migration guide .

One Opinion -> Since you mentioned its a very old project and if you are not using any architecture like MVVM(it goes well with Compose with DI and observable support out of the box) . It will be a better idea to create a new project from scratch considering compose is still growing and lots of things are still experimental and u have to keep your code it up to date with compose versions..

Related