Skip to content

Request to upgrade Kotlin compiler #56522

@mcorner

Description

@mcorner

Description

The current Kotlin compiler version in RN is 2.1.20. The newest Kotlin compiler is 2.3.20.

The general rule is that the Kotlin compiler is forwards compatible one minor version:

"Preferably (but we can't guarantee it), the binary format is mostly forwards compatible with the next language release, but not later ones (in the cases when new features are not used, for example, 1.9 can understand most binaries from 2.0, but not 2.1)."

Many Google SDKs, including one I maintain, (and others) use the latest release of the Kotlin compiler and are now incompatible with RN.

Thanks.

Steps to reproduce

Add a newer dependency such as: implementation("com.google.android.gms:play-services-media-effect-enhancement:16.0.0-beta03")

React Native Version

0.85.2

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

N/A

Stacktrace or Logs

file:///Users/markcorner/.gradle/caches/9.3.1/transforms/2ac25d4a7fa5e5be514882f5862f1fe4/transformed/play-services-media-effect-enhancement-16.0.0-beta03-api.jar!/META-INF/third_party.kotlin.protobuf.src.commonMain.kotlin.com.google.protobuf.kotlin_shared_runtime.kotlin_module Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.3.0, expected version is 2.1.0.

MANDATORY Reproducer

https://github.com/mcorner/kotlinrepro

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions