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

Xcode Meets Gradle

RyuNen344
August 01, 2023

Xcode Meets Gradle

RyuNen344

August 01, 2023
Tweet

More Decks by RyuNen344

Other Decks in Programming

Transcript

  1. ࿩͢͜ͱɾ࿩͞ͳ͍͜ͱ • ࿩͢͜ͱ • KMMͷςετΛ࣮ߦ͢ΔࡍͷͭΒΈ • xcode, xctest gradle pluginʹ͍ͭͯ

    • gradle-xcodePlugin • ࿩͞ͳ͍͜ͱ • Tink/Obj-Cͷ1.7.0ΛCocoaPodsʹpublishͯ͘͠Εͳ͍͜ͱ΁ͷෆຬ • ͦͷ͍ͤͰbazelೖ໳͢Δ͜ͱʹͳͬͨɾɾɾɾ • xcodebuildίϚϯυɺXCTestͷৄࡉͳ͋Ε͜Ε
  2. openbakery Tipsᶃ • gradle-xcodePlugin͕͍͔ͭ͘ͷϏϧυ࣌؀ڥม਺Λઃఆ͢Δ͕ૉͷ ··Ͱ͸௨Βͳ͍ͷͰ௥Ճઃఆ͕ඞཁ • DerivedDataPath, DSTROOT, OBJROOT, SYMROOT,

    SHARED_PRECOMPS_DIR -> plugin͕GradleͷbuildDirʹมߋ͞ΕΔ • SYMROOT͕มΘΔӨڹͰXCTest࣮ߦ࣌ʹappΛಡΈࠐΊͳ͘ͳΔ
  3. openbakery Tipsᶄ • git cloneͯ͠./gradlew :iosApp:xcodetestΛ࣮ߦͯ͠΋ࣦഊ͢Δ • ./gradlew xcodetest࣮ߦલʹXCFramework͕ੜ੒͞Ε͍ͯͳ͍ͷ͕ݪҼ •

    KMM pluginͰϓϩδΣΫτΛ࡞Δ৔߹iOSϓϩδΣΫτ͸2௨Γͷґଘํ๏ͰKMMΛiOSϓϩδΣΫτʹ ௥Ճ͢Δ • Build PhaseͷRun Script • CocoaPods • Run ScriptͰ͸xcframeworkͷు͖ग़͠λΠϛϯά͕஗͍ • CocoaPods͸஗͍ͷͱ৭ʑͳπϥϛΛ๊͑ΔͷͰ࢖͍ͨ͘ͳ͍(1KMMϥΠϒϥϦͷςετ༻ͱͯ͠͸໌ Β͔ʹToo Much)