Skip to content

Dependency Updates - Main Batch - AndroidX Compose/Kotlin #17563

@ParaskP7

Description

@ParaskP7

Parent #17551
Batch Branch: deps/main-batch-androidx-compose-kotlin


🚫 Blocked By:

  • Update "compileSdk" to 33 #17790 (for more info see below): Cc @irfano
    • Updating AndroidX Compose to 1.2.X requires compileSdkVersion 32 or above.
    • Updating AndroidX Compose to 1.3.X requires compileSdkVersion 33 or above.
    • Updating AndroidX Compose to 1.4.X requires compileSdkVersion 33 or above.
    • Updating AndroidX Compose to any of the currently 4 available BOM related version requires compileSdkVersion 33 or above.

Also, note the fact that updating AndroidX Compose Compiler will require a Kotlin update too:

  • Updating AndroidX Compose Compiler to 1.2.X requires Kotlin 1.7.0.
  • Updating AndroidX Compose Compiler to 1.3.X requires Kotlin 1.7.20.
  • Updating AndroidX Compose Compiler to 1.4.X requires Kotlin 1.8.0.

FYI: As such, both the AndroidX Compose Compiler and Kotlin update will be done in one go.


In addition to the above, with this AndroidX Compose update we will be switching to using BOM (Bill of Materials) to manage all of our AndroidX Compose library versions. This will help us:

  • Avoid potential incompatibility issues as the BOM itself has links to the stable versions of the different AndroidX Compose libraries, in such a way that they work well together.
  • Stop explicitly adding any version to the AndroidX Compose library dependencies themselves as when the BOM get configured or updated all the AndroidX Compose libraries will automatically be updated to their corresponding fully compatible versions.

FYI: As such, most probably, this AndroidX Compose update will be targeting the below change:

  • gradle.ext.kotlinVersion = '1.7.20' // Requires androidxComposeCompilerVersion 1.3.2
  • androidxComposeBomVersion = "2023.01.00" // Requires compileSdkVersion 33
  • androidxComposeCompilerVersion = '1.3.2' // Requires kotlinVersion 1.7.20

You will also notice that the AndroidX Compose Compiler is not included in the BOM. This is done due to that fact that the AndroidX Compose Compiler needs to be updated alongside a compatible version of Kotlin and thus it is release in a separate cadence from the rest of AndroidX Compose.

PS: WCAndroid already did a similar update via this Upgrade Kotlin version to 1.7.20 #8091 PR of theirs.


Finally, the above AndroidX Compose targeting changes are not targeting neither the latest AndroidX Compose Compiler version, the 1.4.0 version (Jan 17, 2023), nor the latest kotlin version, the 1.8.0 version (Dec 28, 2022). This is done on purpose because:

  • We will be already jumping from 1.1.1 into 1.3.2, which is 2 "major" versions of AndroidX Compose Compiler. No need to jump even further, that is into 1.4.0 and 3 "major" versions of AndroidX Compose Compiler.
  • We should avoid jumping from Kotlin 1.6.10 into 1.8.0, which is 2 "major" versions away. Also, there is no need in using such a recent version of Kotlin and "probably" better to wait for another minor version of Kotlin first, or just, wait a couple of month to verify 1.8.0 version's stability.

This issue is about updating all Main - AndroidX Compose related dependencies for the whole project.

This AndroidX Compose batch contains the following 3 + 1 dependencies:

PLUS:

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions