Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Conversation

@dodgex
Copy link
Member

@dodgex dodgex commented Oct 31, 2017

I should have applied the @KotlinOpen annotation to all annotations that override a class or method.

@dodgex dodgex requested a review from WonderCsabo October 31, 2017 16:34
@dodgex
Copy link
Member Author

dodgex commented Oct 31, 2017

I also updated the kotlin sample project to use the latest kotlin version and the allopen plugin. :)

@dodgex
Copy link
Member Author

dodgex commented Oct 31, 2017

Aaaaaaaaand... I just realized I missed the Plugin annotations once again... :) I have to leave now, but will add them as soon as I'm back home. :D

Copy link
Member

@WonderCsabo WonderCsabo left a comment

Choose a reason for hiding this comment

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

You should remove the open keywords from the Kotlin classes in the example project. :)

@WonderCsabo
Copy link
Member

WonderCsabo commented Oct 31, 2017

Hmm, maybe it is not a good idea, because users not having this plugin will face problems.

Lets create a method, then, which is not open, and uses this mechanism, and add KotlinDoc to it explain this.

* As of Kotlin 1.0.6+ and AndroidAnnotations 4.4.0, you can use the kotlin-allopen plugin
* to remove the need to explicitly declare enhanced classes or methods as <code>open</code>.
*
* See the build.gradle file or [the Kotlin Documentation](https://kotlinlang.org/docs/reference/compiler-plugins.html#all-open-compiler-plugin)
Copy link
Member

@WonderCsabo WonderCsabo Oct 31, 2017

Choose a reason for hiding this comment

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

I would rather link to our Kotlin support wiki page. We are not having one, but we should open it. :)
(We should list the KotlinOpen annotation there for example.)

Also we could add some gotchas for Kotlin, like lateinit and @JvmField.

@dodgex
Copy link
Member Author

dodgex commented Oct 31, 2017

I added a link to https://github.com/androidannotations/androidannotations/wiki/Kotlin 😉 instead of the kotlin docs

/**
* Utility annotation to easily support kotlin-allopen plugin
*
* @see "https://kotlinlang.org/docs/reference/compiler-plugins.html#all-open-compiler-plugin"
Copy link
Member

Choose a reason for hiding this comment

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

Lets add the AA wiki here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. I replaced the link and added it to the wiki page

@WonderCsabo WonderCsabo merged commit 8b6574b into androidannotations:develop Oct 31, 2017
WonderCsabo added a commit that referenced this pull request Oct 31, 2017
@WonderCsabo WonderCsabo added this to the 4.4 milestone Oct 31, 2017
@WonderCsabo
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants