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

카카오페이 iOS 모듈 아키텍처 리팩토링 이야기: Monorepo 도입기

kakao
November 01, 2024

카카오페이 iOS 모듈 아키텍처 리팩토링 이야기: Monorepo 도입기

#iOS #Mono repository

카카오페이 iOS 서비스의 여러 모듈을 Multirepo에서 Monorepo로 전환한 배경과 과정, 그리고 이를 통해 얻은 개발 효율성과 협업 개선점에 대해 이야기합니다.

발표자 : marlin.blue
카카오페이 iOS 서비스를 개발하고 있는 marlin 입니다.
페이 iOS 서비스를 더욱 효과적으로 개발하고 또 운영 할 수 있도록 개발 환경 및 아키텍처 개선 업무를 담당하고 있습니다.

kakao

November 01, 2024
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1. ݽٕҳઑ ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF

    ӝఋࢲ࠺झ 
 .PEVMF 6UJM 
 .PEVMF ٣੗ੋदझమ .PEVMF /FUXPSL 
 .PEVMF
  2. ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF ӝఋࢲ࠺झ

    
 .PEVMF 6UJM 
 .PEVMF ٣੗ੋदझమ .PEVMF /FUXPSL 
 .PEVMF ݽٕҳઑ
  3. ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF ӝఋࢲ࠺झ

    
 .PEVMF 6UJM 
 .PEVMF ٣੗ੋदझమ .PEVMF /FUXPSL 
 .PEVMF ஠஠য়ಕ੉
  4. ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF ӝఋࢲ࠺झ

    
 .PEVMF 6UJM 
 .PEVMF ٣੗ੋदझమ .PEVMF /FUXPSL 
 .PEVMF ஠஠য়స ஠஠য়ಕ੉
  5. ஠஠য়స ஠஠য়ಕ੉ ࢎ੢ש೒۞झ ࣠Ә 
 .PEVMF ӝఋࢲ࠺झ 
 .PEVMF 6UJM

    
 .PEVMF ٣੗ੋदझమ .PEVMF /FUXPSL 
 .PEVMF ݽٕҳઑ
  6. ցޖ݆਷ۨ౵૑షܻ 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ

    .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF 3FQPTJUPSZ .PEVMF
  7. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  8. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  9. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  10. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  11. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  12. Ҋ۰ࢎ೦ "4 - *4 50 - #& ੷੢ࣗҙܻ੹ۚ .VMUJSFQP .POPSFQP

    ݽٕߡ੹ҙܻ ѐ߹ߡ੹ҙܻ ా೤ߡ੹ҙܻ ੄ઓࢿҙܻبҳ $PDPBQPET 4XJGU1BDLBHF.BOBHFS
  13. ࢸ҅ ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF

    ӝఋࢲ࠺झ 
 .PEVMF ٣੗ੋदझమ 
 .PEVMF 6UJM 
 .PEVMF /FUXPSL 
 .PEVMF -PHHFS 
 .PEVMF
  14. ࢸ҅ 1SPEVDU GPS ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ

    
 .PEVMF ӝఋࢲ࠺झ 
 .PEVMF ٣੗ੋदझమ 
 .PEVMF 6UJM 
 .PEVMF /FUXPSL 
 .PEVMF -PHHFS 
 .PEVMF
  15. ࢸ҅ 1SPEVDU GPS ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ

    
 .PEVMF ӝఋࢲ࠺झ 
 .PEVMF ٣੗ੋदझమ 
 .PEVMF 6UJM 
 .PEVMF /FUXPSL 
 .PEVMF -PHHFS 
 .PEVMF
  16. ࢸ҅ 1SPEVDU GPS 1SPEVDU GPS ࣠Ә 
 .PEVMF Ѿઁ 


    .PEVMF ੋૐ 
 .PEVMF ӝఋࢲ࠺झ 
 .PEVMF ٣੗ੋदझమ 
 .PEVMF 6UJM 
 .PEVMF /FUXPSL 
 .PEVMF -PHHFS 
 .PEVMF
  17. ࢸ҅ 1BDLBHF 1SPEVDU GPS 1SPEVDU GPS ࣠Ә 
 .PEVMF Ѿઁ

    
 .PEVMF ੋૐ 
 .PEVMF ӝఋࢲ࠺झ 
 .PEVMF ٣੗ੋदझమ 
 .PEVMF 6UJM 
 .PEVMF /FUXPSL 
 .PEVMF -PHHFS 
 .PEVMF
  18. 5BSHFU targets: [ ... .target( name: "PayNetwork", dependencies: [ "PayLog"

    "PayUtils", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), ... /// ੋૐ, ҅੿ .target( name: "PayAccount", dependencies: [ "PayLog" "PayUtils", "PayNetwork", "PayUI", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), /FUXPSL 
 .PEVMF
  19. 5BSHFU targets: [ ... .target( name: "PayNetwork", dependencies: [ "PayLog"

    "PayUtils", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), ... /// ੋૐ, ҅੿ .target( name: "PayAccount", dependencies: [ "PayLog" "PayUtils", "PayNetwork", "PayUI", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), /FUXPSL 
 .PEVMF
  20. targets: [ ... .target( name: "PayNetwork", dependencies: [ "PayLog" "PayUtils",

    ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), ... /// ੋૐ, ҅੿ .target( name: "PayAccount", dependencies: [ "PayLog" "PayUtils", "PayNetwork", "PayUI", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), 5BSHFU ੋૐ 
 .PEVMF /FUXPSL 
 .PEVMF
  21. 1SPEVDU products: [ /// ஠஠য়ಕ੉, ஠஠য়స .library( name: "PayShared-App", type:

    .static, targets: [ "PayMoney", "PayPayment", "PayAccount", "PayUI", "PayNetwork" "PayLog", ... ] ), /// ࢎ੢ש೒۞झ .library( name: “PayShared-Ceo", type: .static, targets: [ "PayAccount", "PayUI", "PayNetwork" "PayLog", ... ] ), 1SPEVDU GPS
  22. 1SPEVDU products: [ /// ஠஠য়ಕ੉, ஠஠য়స .library( name: "PayShared-App", type:

    .static, targets: [ "PayMoney", "PayPayment", "PayAccount", "PayUI", "PayNetwork" "PayLog", ... ] ), /// ࢎ੢ש೒۞झ .library( name: “PayShared-Ceo", type: .static, targets: [ "PayAccount", "PayUI", "PayNetwork" "PayLog", ... ] ), 1SPEVDU GPS 1SPEVDU GPS
  23. 1BDLBHF let package = Package( name: "PayShared", platforms: [ .iOS(.v15),

    .watchOS(.v8) ], products: [ /// for ஠஠য়ಕ੉, ஠஠য়స .library( name: "PayShared-App", ... ), /// for ࢎ੢ש೒۞झ .library( name: "PayShared-Ceo", ... ) ... ] ) 1BDLBHF
  24.  &Y ݽٕղীࢲজীౠ੿ೠޙ੗ৌчਸࢶ঱ೞח҃਋ [࣠Ә Module] var message: String { ...

    string.insert(contentsOf: "஠஠য়స" or "஠஠য়ಕ੉" or "ࢎ੢ש೒۞झ" … ) ... } জ࠙ӝо೙ਃೠ҃਋
  25. JG [࣠Ә Module] var message: String { ... #if PAYAPP

    string.insert(contentsOf: "஠஠য়ಕ੉", at: index) #elseif KAKAOTALK string.insert(contentsOf: "஠஠য়స", at: index) #elseif CEOAPP string.insert(contentsOf: "ࢎ੢ש೒۞झ", at: index) ... } ੹୊ܻޙ
  26. 1BDLBHFTXJGU ജ҃߸ࣻഝਊ ੹୊ܻޙ import Foundation import PackageDescription struct Enviroment {

    enum APP: String { case PAYAPP // ஠஠য়ಕ੉ জীࢲ ࢎਊೞח ജ҃߸ࣻ case KAKAOTALK // ஠஠য়స case CEOAPP // ࢎ੢ש೒۞झ static var current: String { let pointer = ProcessInfo.processInfo.environment["SPM_APP_ENV"] return APP(rawValue: pointer).rawValue } } } let swiftEnvironemntSetting = [.define(Enviroment.APP.current)]
  27. 1BDLBHFTXJGU 
 5BSHFU੄TXJGU4FUUJOHTীࢸ੿ ੹୊ܻޙ targets: [ ... .target( name: "PayNetwork",

    dependencies: [ "PayLog" "PayUtils", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ), ... /// ੋૐ, ҅੿ .target( name: "PayAccount", dependencies: [ "PayLog" "PayUtils", "PayNetwork", "PayUI", ], resources: [ .process("Resources") ], swiftSettings: swiftEnvironemntSetting ),
  28. 4BNQMF"QQ ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF

    ӝఋࢲ࠺झ 
 .PEVMF ࣠Ә 
 4BNQMF"QQ Ѿઁ 
 4BNQMF"QQ ੋૐ 
 4BNQMF"QQ 4BNQMF 
 "QQT
  29. 4BNQMF"QQ ࣠Ә 
 .PEVMF Ѿઁ 
 .PEVMF ੋૐ 
 .PEVMF

    ӝఋࢲ࠺झ 
 .PEVMF ࣠Ә 
 4BNQMF"QQ Ѿઁ 
 4BNQMF"QQ ੋૐ 
 4BNQMF"QQ 4BNQMF 
 "QQT 4BNQMF 
 "QQT 
 8PSLTBQDF
  30. ߡ੹ҙܻ "4 - *4 [Podfile.lock] ... - PayMoney: 27da90f55158434f559158f7acfa113819d9f8d6 -

    PayAccount: af832d5331b8ed358eab7e55364f1065b3a27845 - PayPayment: c90f309ca0677698713e615b2d7aac489e57be45 - PayWebView: 3869377a12db554612191a4395f4ffc32a219e12 + PayMoney: a3311dbcf3ea651e5a070fe8559b57c174ada081 + PayAccount: 629c20a4d363167143f30ea78320d5a7eb8bd940 + PayPayment: 684ee790a24f73ebb2d1d966e9711c203f2a4237 + PayWebView: 039e9a885e5fdd336d5af102c30cc20ecc50dd2d …
  31. [Podfile.lock] ... - PayMoney: 27da90f55158434f559158f7acfa113819d9f8d6 - PayAccount: af832d5331b8ed358eab7e55364f1065b3a27845 - PayPayment:

    c90f309ca0677698713e615b2d7aac489e57be45 - PayWebView: 3869377a12db554612191a4395f4ffc32a219e12 + PayMoney: a3311dbcf3ea651e5a070fe8559b57c174ada081 + PayAccount: 629c20a4d363167143f30ea78320d5a7eb8bd940 + PayPayment: 684ee790a24f73ebb2d1d966e9711c203f2a4237 + PayWebView: 039e9a885e5fdd336d5af102c30cc20ecc50dd2d … ߡ੹ҙܻ 50 - #& [Package.resolved] ... { "identity" : "kakaopay-ios-shared", "kind" : "remoteSourceControl", "location" : "git@…/kakaopay-ios-shared.git", "state" : { "branch" : "release/3.3.0", - "revision" : “c591bea053efe7d7e7e54669b74fe45d278ad32f" + "revision" : "8b62878378dfaf57f7e2549b9cbd1cb2e5aa43e5" } }, ...