Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Add support for kotlin-allopen plugin#2068

Merged
WonderCsabo merged 5 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
dodgex:2040_support_kotlin-allopen_pluginCopy head branch name to clipboard
Oct 31, 2017
Merged

Add support for kotlin-allopen plugin#2068
WonderCsabo merged 5 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
dodgex:2040_support_kotlin-allopen_pluginCopy head branch name to clipboard

Conversation

@dodgex

@dodgex dodgex commented Oct 31, 2017

Copy link
Copy Markdown
Member

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

dodgex commented Oct 31, 2017

Copy link
Copy Markdown
Member Author

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

@dodgex

dodgex commented Oct 31, 2017

Copy link
Copy Markdown
Member Author

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

@WonderCsabo WonderCsabo left a comment

Copy link
Copy Markdown
Member

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

WonderCsabo commented Oct 31, 2017

Copy link
Copy Markdown
Member

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)

@WonderCsabo WonderCsabo Oct 31, 2017

Copy link
Copy Markdown
Member

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

dodgex commented Oct 31, 2017

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.