-
Notifications
You must be signed in to change notification settings - Fork 207
Multiple modules
Yuri Shmakov edited this page May 24, 2017
·
2 revisions
In order to add support for multiple modules:
- Add
moxy-compiler
dependency to each module that uses Moxy. - In each library/subproject that uses a Moxy, you must add an annotation processor argument
moxyReflectorPackage
.
For built-inannotationProcessor
from gradle android plugin 2.2+:For Kotlin with kapt:android { ... defaultConfig { ... javaCompileOptions { annotationProcessorOptions { arguments = [ moxyReflectorPackage : 'some.unique.package.name' ] } } } ... }
kapt { ... arguments { arg("moxyReflectorPackage", "some.unique.package.name") } }
- In application module you must add annotation
@RegisterMoxyReflectorPackages
to any class (for example application class) and pass all packages that were set in library modules, like this:@RegisterMoxyReflectorPackages({"some.unique.package.name.library1", "some.unique.package.name.library2"}) public class MyApplication extends Application { ...
- Home
- Causes of Moxy
- Getting started
- How to's
- Components
- Multiple modules
- Moxy & Kotlin
- Android Studio Templates
- FAQ
- Changelog