-
Notifications
You must be signed in to change notification settings - Fork 47
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
Convert to Kotlin #34
Comments
It still makes sense to have this library compiled from Java sources to ensure that its class-files doesn't include unnecessary meta-information from Kotlin. So if you want to have a similar set of annotations for non-JVM Kotlin projects it would be better to create a new library. Also note that the most commonly used annotations from this library ( |
Ok, thanks. I plan on making this, and points I should consider? |
To achieve this, you can create a module with common Kotlin code that has the corresponding |
@elizarov @chashnikov Kotlin MPP requires Gradle >= 6, Gradle 6 doesn't support java 5, this project targets java 5. Could java 5 support be dropped? or is there another option that could be chosen? |
@KotlinIsland as far as I know Kotlin compiler cannot produce bytecode for Java 5 anyway, so it doesn't make sense to support Java 5 in a library for Kotlin. |
@chashnikov The implementation I was thinking of would make the java 8 target a Kotlin MPP project and leave the java 5 as is. |
@elizarov Hi, I've tried this workaround for the Perhaps I made a mistake in the implementation: kotest/kotest#3328 If it's not possible, then could the UPDATE: Ah I realise the mistake I made, I think I fixed it.
However, this is a little verbose and repetitive. It would be nicer if |
You can use comments to inject the language, however, having a KMP version of this would be great either way. It would also be great to finally support the @mutable and @immutable annotations in Kotlin itself |
I agree, plus I'll add that KMP annotations are also necessary when someone wants to publish a library with the annotations, since the comment-injections only work for local source code, and aren't available in published code. |
@chashnikov I think there are some strong cases for providing KMP annotations - would you consider reopening this issue? |
It wouldn't even be required to port the whole library to Kotlin, they could use expect/actual declarations like Roman suggested |
It would be good if this library was converted to Kotlin such that it could be used with Kotlin/common, Kotlin/JS and Kotlin/native.
I wouldn't mind doing this.
The text was updated successfully, but these errors were encountered: