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

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

E505897a79eede1a676f92740261e8f8?s=128

Masatoshi Kubode

March 27, 2019
Tweet

Transcript

  1. ©2019 Wantedly, Inc. ϚϧνϞδϡʔϧԽͷ5JQT QPUBUPUJQT ٱอग़խढ़ 2019/03/27

  2. ©2019 Wantedly, Inc. ٱอग़խढ़ 8BOUFEMZ ओʹ8BOUFEMZ7JTJUͷ"OESPJEΞϓϦΛ։ൃ͍ͯ͠·͢ɻ ઈࢍϦχϡʔΞϧதɻ ,PUMJO 1PLFNPO(P .BHJDUIF(BUIFSJOH

    ࣗݾ঺հ 5XJUUFS !TXJ[@BSE (JU)VC !LVCPEF
  3. ©2019 Wantedly, Inc.  ϚϧνϞδϡʔϧԽ΁ͷऔΓ૊Έ  ϚϧνϞδϡʔϧԽͨ݁͠Ռ  %BHHFSͷ5JQT 

    ·ͱΊ ࿩͢͜ͱ
  4. ©2019 Wantedly, Inc. ϚϧνϞδϡʔϧԽ΁ͷऔΓ૊Έ

  5. ©2019 Wantedly, Inc. w Ϗϧυ࣌ؒͷվળ w QBDLBHFΑΓ΋ڧ͍ϨΠϠʔԽ w %ZOBNJDGFBUVSFNPEVMFT ϚϧνϞδϡʔϧԽͷϝϦοτ

  6. ©2019 Wantedly, Inc. w ΫϦʔϯϏϧυ • feature1ͱ2͸ฒྻϏϧυՄ w ࠩ෼Ϗϧυ •

    มߋ͞Εͳ͍Ϟδϡʔϧ͸εΩοϓ Ϗϧυ࣌ؒͷվળ
  7. ©2019 Wantedly, Inc. ϚϧνϞδϡʔϧԽͨ݁͠Ռ

  8. ©2019 Wantedly, Inc. ࠓͷϞδϡʔϧߏ੒

  9. ©2019 Wantedly, Inc. w ࠩ෼Ϗϧυʢମײʣ w ෼൒ˠඵʙ෼ʢਂ͍΄Ͳ஗͍ʣ w ΫϦʔϯϏϧυʢ$*্ʣ w

    ෼൒ˠ෼൒ w ฒྻϞδϡʔϧ͕·ͩগͳ͍ͨΊ Ϗϧυ࣌ؒͷมԽ
  10. ©2019 Wantedly, Inc. %BHHFSͷ5JQT

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

    _⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈_ > kotlin-kapt忘れただけ <  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄
  12. ©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
  13. ©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) }
  14. ©2019 Wantedly, Inc. w ϞδϡʔϧͷCVJMEHSBEMFͰBQQMZ͢Δ͚ͩ w EFQFOEFODJFT͕εοΩϦͨ͠ w ଞʹ΋6OJU5FTU΍"OESPJE5FTUͳͲ΋࡞ͬͨ εΫϦϓτԽͷϝϦοτ

    apply plugin: 'kotlin-kapt' apply from: "$rootDir/gradle/dependencies/dagger.gradle.kts"
  15. ©2019 Wantedly, Inc. ·ͱΊ

  16. ©2019 Wantedly, Inc. w ࠩ෼Ϗϧυ͸͔ͳΓվળ͞Εͨ w Ϟδϡʔϧ͕૿͑Ε͹૿͑Δ΄ͲԸܙ w EFQFOEFODJFT͸εΫϦϓτʹ·ͱΊΔͱΑ͍ ·ͱΊ

  17. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2019 Wantedly, Inc. ٕज़ॻయ 8BOUFEMZ5FDI#PPL ΋͏গ͠ৄ͍͠࿩ॻ͍ͯ·͢