fix(Example): Upgrade kotlin to 2.3.* - #4536
Open
t0maboro wants to merge 1 commit into
Open
Conversation
kligarski
approved these changes
Aug 21, 2026
kligarski
left a comment
Member
There was a problem hiding this comment.
Tested reproduction using this PR - build passed correctly after changes to onUpdate.
Comment on lines
+28
to
+29
| // Pin KGP explicitly, because the version-less classpath entry resolves to the | ||
| // version pinned by RN's gradle-plugin. |
Member
There was a problem hiding this comment.
Maybe we should add information that this pin can be removed when RN bumps Kotlin, similar to previous // TODO: Can be removed when RN ships Kotlin >= 2.3.0 which resolved the issue.. When somebody sees this randomly in a year or so it will have a higher chance of being cleaned up.
kkafar
approved these changes
Aug 21, 2026
kkafar
left a comment
Member
There was a problem hiding this comment.
Just a single request for a comment documenting when that code can be cleaned up again.
Thanks.
Comment on lines
+28
to
+29
| // Pin KGP explicitly, because the version-less classpath entry resolves to the | ||
| // version pinned by RN's gradle-plugin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
For RCA, please see: #4443 . We've internally discussed with @kkafar that the Kotlin upgrade should be safe because of their backward compatibility policy. This still diverges app from the RN template, but seems to be slightly better approach than applying the workaround with resolve RNS sources to its realpath.
Please note that bumping the
kotlinVersionalone does nothing. The versionless KGP classpath entry resolves to the version pinned by@react-native/gradle-pluginthat pins Kotlin 2.2.0, so the module kept compiling with Kotlin 2.2.* After pinning KGP explicitly, the resolved compiler is 2.3.*.Changes
Before & after - visual documentation
N/A
Test plan
How to reproduce the issue:
ScreenStackHeaderConfig.onUpdateThis should NOT happen after changing the Kotlin version to 2.3
Checklist