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

Kotlin Support #47

Closed
sockeqwe opened this issue Jun 1, 2015 · 3 comments
Closed

Kotlin Support #47

sockeqwe opened this issue Jun 1, 2015 · 3 comments
Milestone

Comments

@sockeqwe
Copy link
Owner

sockeqwe commented Jun 1, 2015

☑ Mosby itself seems to be ready to be used in Kotlin. A little sample project already works as expected.

❑ Third party annotation processors don't work right now, but I haven't tested them with kotlins annotation processing support introduced lately.

      ❑ Butterknife: Probably Butterknife could be replaced with Kotterknife, but it's not clear if Kotterknife will ever see version 1.0 . However, adding Kotterknife's dependency should be done in the end users app project which uses Mosby and not in Mosby itself. So supporting Kotterknife is not needed in Mosby itself.

      ❑ FragmentArgs: May need an improved Annotation Processor for Kotlin. However, the goal should be that the dependency to Kotlin's FragmentArgs annotation processor should be added in end user application project. See this issue: sockeqwe/fragmentargs#21

      ❑ Icepick doesn't work right now. See this issue: frankiesardo/icepick#47



Mosby 2.0 can only be released after all annotation processors work properly and don't conflict with their java counterparts.

@dalewking
Copy link

In terms of view injection, Kotterknife is not necessarily the best solution. Kotlin has its own support for accessing views of activities and freagments: http://kotlinlang.org/docs/tutorials/android-plugin.html.

I wonder if there would be a way to make the use of these third party libraries more pluggable i Mosby, but I am not sure what that would look like. I am not sure that really should be done at the top of the hierarchy in Mosby. Perhaps they should be moved to a layer under Mosby and leave it to users of Mosby to create their own base layer that adds this support to a base class that extends MvpActivity. You could even provide that layer as an optional layer.

@sockeqwe
Copy link
Owner Author

sockeqwe commented Jun 1, 2015

Moving the layer would be the simplest solution. However I personally found this as a convenience features in Mosby, even though there might be other developers who doesn't like to use this third party tools. I thought about something like delegation to make it more pluggable, but havent found a good solution yet. I will take it into consideration for Mosby 2.0

@sockeqwe
Copy link
Owner Author

sockeqwe commented Sep 3, 2015

Kotlin supported in Mosby 2.0

@sockeqwe sockeqwe closed this as completed Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants