Android Internals
Android Internals For Developers : Part I (https://android.jlelse.eu/android-internals-for-developers-part-i-982a4409f4b5)
Android Internals for Developers: Part II (https://android.jlelse.eu/android-internals-for-developers-part-ii-c6ca94243efa)
English in airplane
Multiple modules with Moxy
https://gist.github.com/ekursakov/b8ffe396ae4e00a5400f7f4e3d546f9a
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+:[code language=”groovy”]
android {
…
defaultConfig {
…
javaCompileOptions {
annotationProcessorOptions {
arguments = [ moxyReflectorPackage : ‘some.unique.package.name’ ]
}
}
}
…
}
[/code]For Kotlin with kapt:
[code language=”groovy”]
kapt {
…
arguments {
arg("moxyReflectorPackage", "some.unique.package.name")
}
}
[/code] - 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:[code language=”groovy”]
@RegisterMoxyReflectorPackages({"some.unique.package.name.library1", "some.unique.package.name.library2"})
public class MyApplication extends Application {
…
[/code]