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

pixivアプリでマルチモジュールを実現するまで

 pixivアプリでマルチモジュールを実現するまで

gatosyocora

March 28, 2024
Tweet

More Decks by gatosyocora

Other Decks in Programming

Transcript

  1. ϞδϡʔϧԽͷར఺ • ࠶ར༻ੑ • ݫີͳදࣔઃఆ؅ཧ • ΧελϚΠζՄೳͳ഑৴ • ֦ுੑ •

    Φʔφʔγοϓ • Ϗϧυ࣌ؒ https://developer.android.com/topic/modularization
  2. ϞδϡʔϧԽͷར఺ ࠶ར༻ੑ : ಉ͡Ϟδϡʔϧ͔Βෳ਺ͷΞϓϦΛ࡞੒Ͱ͖Δ • Ұ෦ػೳΛϓϩτλΠϓΞϓϦͱͯ͠ฒߦͯ͠։ൃͰ͖Δ ݫີͳදࣔઃఆ؅ཧ : ଞͷϞδϡʔϧʹެ։͢ΔൣғΛ੍ޚͰ͖Δ •

    IDEͷิ׬ʹग़͢΂͖ީิΛߜΕɺ։ൃମݧ͕޲্͞ΕΔ Φʔφʔγοϓ : ίʔυͷอकɺมߋͷϨϏϡʔͳͲΛ୲౰͢ΔΦʔφʔΛࢦఆ • νʔϜ͝ͱʹͲͷϞδϡʔϧΛ৮Ε͹ྑ͍͔໌֬ʹͳΓɺ 
 ਝ଎ͳ։ൃʹܨ͕Δ
  3. Resource Pre fi xΛઃఆ • Ϟδϡʔϧ಺ͷϦιʔεʹpre fi xΛཁٻ • Ϧιʔεͷ഑ஔ৔ॴ͕໌֬ʹͳΔ

    • Ϧιʔε໊ͷিಥ͕ͳ͘ͳΔ pixivΞϓϦͷϞδϡʔϧͷ޻෉఺ android { namespace ‘com.sample.app.feature.post’ resoursePre fi x ‘feature_post_’ 
 } build.gradle
  4. Ϟδϡʔϧͷৄࡉ΍Φʔφʔγοϓͷ໌֬Խ • ୭͕؅ཧ͢Δ͔Λهࡌ • ෳ਺νʔϜͰΞϓϦ։ൃ͢Δମ੍ʹରԠ pixivΞϓϦͷϞδϡʔϧͷ޻෉఺ # :feature:post ## ໾ׂ

    ౤ߘը໘ͷUIΛఏڙ͢Δ ## ίʔυΦʔφʔ pixiv ΞϓϦνʔϜ ## มߋ࣌ͷ஫ҙ఺ ಈ࡞͕มΘΔ৔߹͸A νʔϜʹڞ༗͢Δ͜ͱ README.md
  5. ·ͱΊ • ϚϧνϞδϡʔϧԽʹΑͬͯνʔϜ։ൃ͕ḿΔ • ϓϩτλΠϓΞϓϦ, IDEิ׬ީิ͔Βআ֎, ίʔυͷΦʔφʔγοϓ • pixivΞϓϦ͸feature, domain,

    data, coreϞδϡʔϧͰߏ੒͞Ε͍ͯΔ • ໨ඪઃఆ, ਐḿͷܭଌ, ิॿπʔϧͳͲͰνʔϜͰண࣮ʹਐΊͨ https://developer.android.com/topic/modularization https://developer.android.com/topic/modularization/patterns