Solved finally. The trick to solve the circular dependencies is to ignore android studio atuomatic upgraders and the Kotlin upgrade strategies that other people have posted in this StackOverflow. and manually upgrade everything at the same time. Steps for solving it are:
- Go to graddle-wrapper.propierties and update the distribution url (any update here will be done by hovering and seeing what newer version android studio recommends).
- Then go to the libs.version.toml and manually update any version in [versions]. In [plugins] add
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
- In the main build.gradle.kts add in plugins: alias(libs.plugins.compose.compiler) apply false
- In each module add in plugins:
alias(libs.plugins.compose.compiler)
- Sync gradle. This will upgrade everything at the same time, circumventing the issue. Profit.