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

Multiple modules challenge #224

Open
matzuk opened this issue Sep 5, 2018 · 1 comment
Open

Multiple modules challenge #224

matzuk opened this issue Sep 5, 2018 · 1 comment

Comments

@matzuk
Copy link

matzuk commented Sep 5, 2018

Hi, guys!

I have one interesting question.
Let's imagine the next application. In the begin there are modules: app, feature-api and feature-impl. In feature-impl I use moxy. So I know that I have to add multiple modules support according this article. app knows about feature-api and feature-impl.
But I want my app knows only about feature-api. For this purpose, I have created a special adapter module which binds feature-api and feature-impl and allows app to know only about feature-api and to start feature via only this module. But I get error "cannot find symbol class MoxyReflector" because app doesn't see packages from feature-impl where Moxy is used.
Can I resolve this error without application module but only via library modules?

@IlyaGulya
Copy link

I have a feature proposal for this.

  1. Add ability to get instance of MoxyReflector using MoxyReflector.getInstance
  1. Make MoxyReflector implement some interface like Reflector
  2. Add ability to register MoxyReflectors in runtime.

sergevalevich pushed a commit to sergevalevich/Moxy-Multimodule that referenced this issue Mar 3, 2019
…n module.

This allows Instant App support (Arello-Mobile#209),
running unit-tests for feature modules (Arello-Mobile#223)
and other issues Arello-Mobile#224.

Here, Moxy always references to MoxyReflector by com.arellomobile.mvp package and generates
MoxyReflectorDelegate for each module.

In order to use Moxy, there is no need to follow instructions described on this page https://github.com/Arello-Mobile/Moxy/wiki/Multiple-modules

Now it is only required to add 1 line of code to BaseActivity.onCreate of each module : MoxyReflector.registerDelegate(MoxyReflectorDelegate.INSTANCE);
sergevalevich pushed a commit to sergevalevich/Moxy-Multimodule that referenced this issue Jul 22, 2019
…n module.

This allows Instant App support (Arello-Mobile#209),
running unit-tests for feature modules (Arello-Mobile#223)
and other issues Arello-Mobile#224.

Here, Moxy always references to MoxyReflector by com.arellomobile.mvp package and generates
MoxyReflectorDelegate for each module.

In order to use Moxy, there is no need to follow instructions described on this page https://github.com/Arello-Mobile/Moxy/wiki/Multiple-modules

Now it is only required to add 1 line of code to BaseActivity.onCreate of each module : MoxyReflector.registerDelegate(MoxyReflectorDelegate.INSTANCE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants