Upgrade to Pro — share decks privately, control downloads, hide ads and more …

マルチモジュール化のTips / The tips of Multi-module

マルチモジュール化のTips / The tips of Multi-module

Masatoshi Kubode

March 27, 2019
Tweet

More Decks by Masatoshi Kubode

Other Decks in Programming

Transcript

  1. ©2019 Wantedly, Inc. w ৽͘͠ϞδϡʔϧΛ௥Ճ͕ͨ͠Ϗϧυʹࣦഊ͢Δ w %BHHFSͷΤϥʔͳͷ͸Θ͔Δ͕Α͘Θ͔ΒΜ w ൒೔΄Ͳ௵͢ Daggerͷ᠘

    _⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈_ > kotlin-kapt忘れただけ <  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄
  2. ©2019 Wantedly, Inc. w ΄ͱΜͲͷϞδϡʔϧͰ%BHHFSΛ࢖͍ͬͯΔ w ಉ͡EFQFOEFODJFTΛॻ͔ͳ͍ͱ͍͚ͳ͍ ଞʹ΋Daggerʹ͸໰୊͕ dependencies {

    implementation(Dependencies.DAGGER) kapt(Dependencies.DAGGER_COMPILER) implementation(Dependencies.DAGGER_ANDROID) implementation(Dependencies.DAGGER_ANDROID_SUPPORT) kapt(Dependencies.DAGGER_ANDROID_PROCESSOR) } x N modules
  3. ©2019 Wantedly, Inc. w %BHHFSͷEFQFOEFODJFTΛεΫϦϓτԽ w LBQU๨Εʹؾ͚ͮΔΑ͏ʹͨ͠ ղܾࡦ if (!plugins.hasPlugin("kotlin-kapt"))

    { throw IllegalStateException("You must apply kotlin-kapt plugin to this $name project") } dependencies { val implementation by configurations val kapt by configurations implementation(Dependencies.DAGGER) kapt(Dependencies.DAGGER_COMPILER) implementation(Dependencies.DAGGER_ANDROID) implementation(Dependencies.DAGGER_ANDROID_SUPPORT) kapt(Dependencies.DAGGER_ANDROID_PROCESSOR) }