Add support for kotlin-allopen plugin#2068
Add support for kotlin-allopen plugin#2068WonderCsabo merged 5 commits intoandroidannotations:developfrom dodgex:2040_support_kotlin-allopen_plugin
Conversation
|
I also updated the kotlin sample project to use the latest kotlin version and the allopen plugin. :) |
|
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
left a comment
There was a problem hiding this comment.
You should remove the open keywords from the Kotlin classes in the example project. :)
|
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 |
| * 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) |
There was a problem hiding this comment.
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.
|
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" |
There was a problem hiding this comment.
Lets add the AA wiki here as well.
There was a problem hiding this comment.
Done. I replaced the link and added it to the wiki page
Add support for kotlin-allopen plugin
|
Thanks! |
I should have applied the
@KotlinOpenannotation to all annotations that override a class or method.