-
Notifications
You must be signed in to change notification settings - Fork 841
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
Need to package generic pieces separate from android pieces #44
Comments
Cross platform? What gave you the idea that this framework is intended for
|
This text from the first Mosby article talks about the theory of Presenters being cross platform and I see no reason not to allow it:
|
In general I agree that Presenter usually shouldn't have dependencies to android. Actually, the interfaces are packed in a plain old jar file Here you can find However, the question is: Is it worth to make an effort in refactoring/repackaging this things. Next we may should refactor rx package and so on. Is it really worthwhile? Will mosby ever be used on oher plattforms? |
I agree with Hannes, people looking for Enterprise Java or Desktop Java
|
@dalewking I thought about your suggestions:
|
1 is fine. For 2 I would move it and I think it is perfectly valid to use Weak reference on desktop although not as important there. As far as cross-platform, I am looking at applying Mosby under Kotlin instead of Java which may need some tweaks. For one, Butterknife, Icepick, and probably FragmentArgs do not work with Kotlin (although I have made suggestions to Icepick creator on how to make it work) so to start with I may create a core-kotlin version of core. |
Didn't realize you were also the creator of FragmentArgs. Added the info to that project for supporting Kotlin |
I have moved Regarding Kotlin support. I have tested Mosby with Kotlin in a small sample project and as far as i can tell Mosby itself "works". As you have already said other third party annotation processors like Butterknife, Icepick and FragmentArgs doesn't work. However, they don't cause any compilation or runtime error, they just do nothing :) So full Kotlin support will be part of |
The Presenter side of things should be packaged as plain Java jars with no android content so that presenter code can be cross platform. For example, I see that MvpBasePresenter is packaged right next to MvpActivity and MvpFragment and packaged into an android library even though it is not Android specific. Items that are android specific like mvp should really be called something like mvp-android since there could theoretically be things mvp-swing or mvp-swt for desktop.
The text was updated successfully, but these errors were encountered: