3

According to Compose to Kotlin Compatibility Map, ComposeCompiler must be compatible with Kotlin version.

Is there this compatibility relation between Compose and ComposeCompiler?

Which one should be newer?

I didn't find any document/reference to describe the relation.

2
  • There's also dependency for compose compiler that you might be using, it contains change logs for kotiln supported version per release: developer.android.com/jetpack/androidx/releases/… This is not the complete reference but you can get started from here at least. Mostly your all other dependencies would be on the same version. May 3, 2022 at 13:06
  • Could you share your build files here, so we can have a closer look at which dependencies are being referred to? May 3, 2022 at 17:26

1 Answer 1

5

It is highly recommended that you use the plugin version matching the library you are using as that combination has received the most testing.

Also, the compose plugin must match the Kotlin compiler version it was intended for so it is recommended that you use the Kotlin compiler version the plugin was built for.

However the minimum current runtime version supported runtime is 1.0.0. This means you can use newer versions of the compiler with older versions of the library.

Beginning with 1.0.0, the Compose Compiler Plugin will feature detect the runtime and generate the code compatible with the runtime it is given. This allows new plugins to be used with older versions of the library. If a feature or optimization requires support from the library and it is not there, it is disabled.

Also, for binary compatibility, the runtime is required to support code generated from older version of the plugin. This allows older versions of the plugin to work with newer libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.