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

multi-module-no-susume

 multi-module-no-susume

DroidKaigi 2018 - Day1 Room1 16:50~ にて発表する内容です

Shinnosuke Kugimiya

February 08, 2018
Tweet

More Decks by Shinnosuke Kugimiya

Other Decks in Programming

Transcript

  1. ϚϧνϞδϡʔϧͷ͢ʍΊ LHNZTIJO!%SPJE,BJHJ%BZ3PPNd ͜ͷηογϣϯͷΰʔϧ ࿩͞ͳ͍͜ͱ w ϚϧνϞδϡʔϧͰ࣮૷͢Δ͜ ͱͷ༗ޮੑΛཧղ͍ͨͩ͘ w ϚϧνϞδϡʔϧͰͷ࣮૷Πϝʔ δΛ࣋ͬͯ΋Β͏

    w *OTUBOU"QQTʹ͍ͭͯৄ͘͠ w ,PUMJOOBUJWFʹ͍ͭͯৄ͘͠ w ϚϧνϞδϡʔϧ΍ͬͯߦ্͘ Ͱͷࡉ͔͍͚Ͳ༗ޮͳUJQT Φ ϑΟεΞϫʔ΍ύʔςΟʔͰฉ͍ͯͩ͘ ͍͞
  2. "OESPJE(SBEMF1MVHJO The Android Plugin for Gradle 3.0.0 is a major

    upgrade that brings significant performance improvements to large multi-module projects. IUUQTEFWFMPQFSBOESPJEDPNTUVEJPCVJMEHSBEMFQMVHJONJHSBUJPOIUNM "OESPJE1MVHJOGPS(SBEMF͸ɺେن໛ͳ ϚϧνϞδϡʔϧϓϩδΣΫτͷύϑΥʔϚϯε Λେ෯ʹ޲্ͤ͞ΔϝδϟʔΞοϓάϨʔυͰ͢ ɻ
  3. ࣗ෼͕ϚϧνϞδϡʔϧʹͨ͠ཧ༝ JOGSB EPNBJO ্Ґ૚ ೝূ "DDFTT 5PLFO औಘ αʔϏε JOGSB

    EPNBJO ্Ґ૚ ଞ "1* ໰͍߹Θͤ τʔΫϯ ผϞδϡʔϧʹ෼͚Δ͜ͱͰ ϨΠϠʔͷ੍໿Λอͭ͜ͱ͕Ͱ͖Δ͚ͩͰͳ͘ ҙຯ͋Δ͔ͨ·ΓͰ·ͱΊΔ͜ͱ͕Ͱ͖Δ
  4. EBUBCJOEJOHͱͷ૬ੑ͕ѱ͍ྫ @BindingAdapter("items") public void setItems( RecyclerView view, List<String> items )

    { : } dependencies { : implementation “com.android.support:recyclerview-v7:26.1.0" : } NPEVMFଆͷEFQFEFODJFTʹSFDZDMFSWJFXΛ௥Ճ #JOEJOH"EBQUFS࡞੒
  5. EBUBCJOEJOHͱͷ૬ੑ͕ѱ͍ྫ CVJME͢Δͱɺࣦഊ͢Δ > android.databinding.tool.util.LoggedErrorException: Found data binding errors. Cannot find

    the setter for attribute 'app:items' with parameter type java.lang.String on android.support.v7.widget.RecyclerView. file:///xxxx/mylibrary/src/main/res/layout/view_test.xml Line:18
  6. τϨʔχϯά ΞΧ΢ϯτ ֶशه࿥ EPNBJO 6* EPNBJO 6* EPNBJO 6* lϢʔβʔϩά͸6*૚Ͱ͔͠ૹΒͳ͍z

    ͳͲͷ੍໿Λґଘؔ܎Ͱڧ੍Ͱ͖ͨΓ͢Δ Ϣʔβʔϩάʹґଘ Ϣʔβʔϩάʹґଘ Ϣʔβʔϩάʹґଘ ݫີʹ΍ΔͳΒϨΠϠʔ ҙຯ͋Δ·ͱ·Γ
  7. τϨʔχϯά ΞΧ΢ϯτ ֶशه࿥ EPNBJO 6* EPNBJO 6* EPNBJO 6* Ϣʔβʔϩάʹґଘ

    Ϣʔβʔϩάʹґଘ Ϣʔβʔϩάʹґଘ ϨΠϠʔͰ੾Βͳ͍৔߹ɺ ϓϩάϥϚʹΑͬͯEPNBJOͰૹͬͨΓ6*ͰૹͬͨΓ ͱΧΦεʹͳΓ͔Ͷͳ͍ ݫີʹ΍ΔͳΒϨΠϠʔ ҙຯ͋Δ·ͱ·Γ
  8. طଘػೳ͔ΒϢʔεέʔεΛચ͍ग़ͯ͠ΈΔ ϢʔβʔΛಛఆ͠ ೝূ͢Δ ͲΜͳ Ξχϝ͕͋Δͷ͔ ஌Γ͍ͨ ݟͯΔɺݟ͍ͨɺ ݟͨ Λ؅ཧ͍ͨ͠ Ξχϝ΁

    ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ Τϐιʔυ΁ ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ ؾʹͳΔ ϢʔβʔΛ ϑΥϩʔ͍ͨ͠ ͦΕͧΕԿΛ࣮ݱ͢Δػೳͳͷ͔ʁ
  9. طଘػೳ͔ΒϢʔεέʔεΛચ͍ग़ͯ͠ΈΔ ϢʔβʔΛಛఆ͠ ೝূ͢Δ ͲΜͳ Ξχϝ͕͋Δͷ͔ ஌Γ͍ͨ ݟͯΔɺݟ͍ͨɺ ݟͨ Λ؅ཧ͍ͨ͠ Ξχϝ΁

    ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ Τϐιʔυ΁ ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ ؾʹͳΔ ϢʔβʔΛ ϑΥϩʔ͍ͨ͠ ·ͣ͸໌Β͔ʹओཁػೳ͔Β֎ΕΔಠཱͨ͠΋ͷΛ ݟ͚ͭͯΈΔ
  10. طଘػೳ͔ΒϢʔεέʔεΛચ͍ग़ͯ͠ΈΔ ϢʔβʔΛಛఆ͠ ೝূ͢Δ ͲΜͳ Ξχϝ͕͋Δͷ͔ ஌Γ͍ͨ ݟͯΔɺݟ͍ͨɺ ݟͨ Λ؅ཧ͍ͨ͠ Ξχϝ΁

    ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ Τϐιʔυ΁ ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ ؾʹͳΔ ϢʔβʔΛ ϑΥϩʔ͍ͨ͠ ·ͣ͸໌Β͔ʹओཁػೳ͔Β֎ΕΔಠཱͨ͠΋ͷΛ ݟ͚ͭͯΈΔ
  11. طଘػೳ͔ΒϢʔεέʔεΛચ͍ग़ͯ͠ΈΔ ϢʔβʔΛಛఆ͠ ೝূ͢Δ ͲΜͳ Ξχϝ͕͋Δͷ͔ ஌Γ͍ͨ ݟͯΔɺݟ͍ͨɺ ݟͨ Λ؅ཧ͍ͨ͠ Ξχϝ΁

    ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ Τϐιʔυ΁ ϨϏϡʔΛ ࢒͍ͨ͠ݟ͍ͨ ؾʹͳΔ ϢʔβʔΛ ϑΥϩʔ͍ͨ͠ Ξχϝ͔Τϐιʔυ΁ͷϨϏϡʔ͸ػೳͱͯ͠͸ είʔϓ͕ҧ͏͚ͩͰҰͭͷػೳͩΖ͏
  12. BOOJDUͷྫ·ͱΊ w ϢʔεέʔεΛચ͍ग़ͯ͠ά ϧʔϐϯάͯ͠ґଘؔ܎Λߟ͑ͯ Έͨ w ΞχϝݕࡧϞδϡʔϧ͕ج൫తػೳͰ͋Δ w ج൫ػೳͷ্ʹࢹௌ؅ཧػೳͱϨϏϡʔػೳ͕ϓϥάΠϯͰ͋ Δͱղऍͨ͠

    w TPDJBMOFUXPSLϞδϡʔϧ͸࡞඼ͱ͸ಠཱͨ͠΋ͷͱղऍͨ͠ w ະ׬੒Ͱ͕͢ԼهʹϦϙδτϦ͕͋Γ·͢ IUUQTHJUIVCDPNLHNZTIJOBOOJDUBOESPJE
  13. NPEVMFTEJSΛ࡞͍ͬͯ͘ include ':app', ':hoge', ':fuga', ‘:piyo' def modulesRopotDir = new

    File('modules') project(':hoge').projectDir = new File(modulesRopotDir, 'hoge') project(':fuga').projectDir = new File(modulesRopotDir, 'fuga') project(':piyo').projectDir = new File(modulesRopotDir, 'piyo') TFUUJOHTHSBEMFΛԼهͷΑ͏ʹ͢Δ
  14. ଞϞδϡʔϧ͔Β৘ใΛऔಘ͍ͨ͠ JOGSB EPNBJO ্Ґ૚ ೝূ "DDFTT 5PLFO औಘ αʔϏε JOGSB

    EPNBJO ্Ґ૚ ଞ "1* ໰͍߹Θͤ τʔΫϯ ࣮͸ɺ͢Ͱʹઌ΄Ͳ͞Βͬͱग़͖ͯͨ ԼهͷਤͷΑ͏ʹͯ͠·͢ɻ
  15. ଞϞδϡʔϧ͔Β৘ใΛऔಘ͍ͨ͠ JOGSB EPNBJO ্Ґ૚ ೝূ "DDFTT 5PLFO औಘ αʔϏε JOGSB

    EPNBJO ্Ґ૚ ଞ "1* ໰͍߹Θͤ ଞͷϞδϡʔϧ͔ΒɺEPNBJO΍ΒJOGSB΍ΒͳΜ Ͱ΋ݟ͑ΔΑ͏ʹ͢ΔͱࢄΒ͔ͬͯ͠·͏ͷͰ