Add support for Kotlin 2.x
What's changed?
What's your motivation?
- Closes https://github.com/openrewrite/rewrite/pull/5575
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist
- [ ] I've added unit tests to cover both positive and negative cases
- [ ] I've read and applied the recipe conventions and best practices
- [ ] I've used the IntelliJ IDEA auto-formatter on affected files
Gradle 9 should be interesting, as that now requires Kotlin 2.1. All the more appreciative of your efforts here!
Linking the relevant thread in the Kotlin lang Slack here as well. Let us know if you could use more help!
Hey @barbulescu, we're looking forward to having Kotlin 2.x support 🙂.
Could you please let me know if you have any issues or require assistance?
Thanks for your interest @e5l ; there's also this parallel alternative approach, where we're exploring a separate Kotlin 2 parser which more closely matches the model of the underlying compiler:
- https://github.com/openrewrite/rewrite/pull/5963
It's expected that we can take learnings from the work done here, but might have that flow into the new Kotlin 2 parser, such that we can support these two in parallel rather than a hard switch over.