Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K2 support #1525

Merged
merged 20 commits into from
Nov 14, 2023
Merged

K2 support #1525

merged 20 commits into from
Nov 14, 2023

Conversation

rorbech
Copy link
Contributor

@rorbech rorbech commented Sep 22, 2023

Add support for Kotlin 1.9 and the experimental K2 support.

TODO

Closes #1483

@rorbech rorbech marked this pull request as ready for review October 23, 2023 19:56
Copy link
Contributor

@clementetb clementetb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some minor comments while I try to grasp the moving parts.

Copy link
Contributor

@cmelchior cmelchior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor stuff, otherwise looking good

@@ -4,7 +4,7 @@
* None.

### Enhancements
* None.
* Support for experimental K2-compilation with `kotlin.experimental.tryK2=true`. (Issue [#1483](https://github.com/realm/realm-kotlin/issues/1483))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the restriction about companion classes and Serialization or maybe reference some other place (either issue or documentation about it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created #1567 to track it. This should enable users to find and workaround the issue. Do we also need it as known issues?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, my guess is that more people will find it if we just pin #1567.

CHANGELOG.md Outdated
@@ -22,6 +22,7 @@
* Minimum Gradle version: 6.8.3.
* Minimum Android Gradle Plugin version: 4.1.3.
* Minimum Android SDK: 16.
* Minimum R8: 8.0.27.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we are bumping the minimum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier versions of R8 does not know how to read Kotlin 1.9 metadata. This will cause the consumer project to fail because it will not properly honor the configuration when obfuscating out library. https://developer.android.com/build/kotlin-support

buildSrc/src/main/kotlin/Config.kt Show resolved Hide resolved
Copy link
Contributor

@cmelchior cmelchior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :shipit:

@rorbech rorbech merged commit ccd8ae9 into main Nov 14, 2023
2 checks passed
@rorbech rorbech deleted the cr/k2-support branch November 14, 2023 15:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

K2 Support - Add FirDeclarationGenerationExtension as replacement for SyntheticResolveExtension
3 participants