Posted on

Multiple modules with Moxy

https://gist.github.com/ekursakov/b8ffe396ae4e00a5400f7f4e3d546f9a

In order to add support for multiple modules:

  1. Add moxy-compiler dependency to each module that uses Moxy.
  2. In each library/subproject that uses a Moxy, you must add an annotation processor argument moxyReflectorPackage.
    For built-in annotationProcessor 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]

  3. 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]

Posted on

Top (unknown) keyboard shortcuts in Android Studio

https://codeburst.io/top-unknown-keyboard-shortcuts-in-android-studio-7b1bf833c9f1

    1. Toggle case

      [code]
      macOS: Cmd + Shift + U
      Windows: Ctrl + Shift + U
      [/code]

    2. Rectangle selection

      [code]
      macOS: alt + make selection
      Windows: alt + make selection
      [/code]

    3. Clipboard history

      [code]
      macOS: Cmd + Shift + V
      Windows: Ctrl + Shift + V
      [/code]

    4. Duplicate/remove whole line

      [code]
      For removing line:
      macOS: Cmd + Backspace
      Windows: Ctrl + Y
      For duplicating:
      macOS: Cmd + D
      Windows: Ctrl + D
      [/code]