Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Xcode Meets Gradle
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
RyuNen344
August 01, 2023
Programming
470
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Xcode Meets Gradle
RyuNen344
August 01, 2023
Transcript
25 slides
Xcode Meets Gradle 2023.08.01 Mobileษڧձ Wantedly × νʔϜϥϘ #10 Bunjiro
Miyoshi
About Me • teamLab Inc.ॴଐ • (ࣗশ)ϚϧνϓϥοτϑΥʔϜܳਓ • 6݄ʹങͬͨMacBook ProͷηοτΞοϓΛӬԕʹ์ஔͯ͠Δ্ʹ࠷
ۙങͬͨPixel Fold์ஔؾຯ
͢͜ͱɾ͞ͳ͍͜ͱ • ͢͜ͱ • KMMͷςετΛ࣮ߦ͢ΔࡍͷͭΒΈ • xcode, xctest gradle pluginʹ͍ͭͯ
• gradle-xcodePlugin • ͞ͳ͍͜ͱ • Tink/Obj-Cͷ1.7.0ΛCocoaPodsʹpublishͯ͘͠Εͳ͍͜ͱͷෆຬ • ͦͷ͍ͤͰbazelೖ͢Δ͜ͱʹͳͬͨɾɾɾɾ • xcodebuildίϚϯυɺXCTestͷৄࡉͳ͋Ε͜Ε
Tink KMM࡞ͬͯ·͢
Tink KMM࡞ͬͯ·͢ • Google/TinkΛKMMͰ͑ΔΑ͏ʹ͢Δϥούʔ • android͚JavaɺiOS͚C++(obj-c)Ͱ࣮͞Ε͍ͯΔͷΛ ϥοϓ͍ͯ͠Δ • ͜ΕΛ͑಄ΘͣʹAES-GCM−256Λ͑ΔΑ͏ʹͳΔ
KMMͷςετΛ࣮ߦ͢ΔࡍͷͭΒΈ • iosX64Test, iosSimulatorArm64Test͡ΌͩΊͳͷʁ →Swiftఏڙ͢ΔAPI(Obj-C header)ͷมߋ(Ҿ໊ͱ͔)ΛײͰ͖ͳ ͍ • iOSΞϓϦͰͪΌΜͱಈ࡞͢ΔΑ͏ʹͳ͍ͬͯΔͷ͔ෆ҆ →LinkerपΓͷ࠷ऴతͳ֬ೝ͕͍ͨ͠
KMMͷςετΛ࣮ߦ͢ΔࡍͷͭΒΈ • ͱʹ͔͘iOSͷInstrumented TestΛ͖Ε͍ʹཧ͍ͨ͠ • Android StudioͷProject WizardͰ࡞͢Δͱɾɾɾ • XcodeͰ։͘
• shellͰxcodebuildίϚϯυΛ͏ શ෦GradleͰͳΜͱ͔ͨ͠ʔ͍ʂ
Gradleͱ • JVMͰ࣮ߦͰ͖ΔBuild Tool • ͷ͘͢͝ࡶʹݴ͏ͱiOSͰ͍͏ͱ͜ΖͷFastlane • ϓϩδΣΫτߏɺґଘཧɺϏϧυɺςετͳͲͳΜͰ͜ͳ͢ • ݩʑGroovyͰॻ͘ͷ͕ͩͬͨ࠷ۙKotlinͰॻ͘ͷ͕ਪ͞ΕͯΔ
Gradleͱ • PluginʹΑΔػೳ֦ு͕ڧྗ • *͍͍ͩͨͳΜͰͰ͖Δ • android, KMM(Kotlin Multiplatform)PluginʹΑͬͯͨΒ͞Ε͍ͯ Δ
• ެࣜͷPlugin͕αϙʔτ͍ͯ͠ΔͷͬͯҰମԿ͕ɾɾɾɾʁ
Gradleͱ ͍ͬͺ͍͋Δ😋 (ଞʹ͍ͬͺ͍͋Δ)
macOSͱLinux͚ͷ ͋Ε͜Ε͔͠ͳʔ͍😂
FastlaneͰղܾɾɾɾɾ ͍ɺRubyΛࠞࡏͤͨ͘͞ͳʔ͍😂
OSSͷxcodebuildίϚϯυΛϥοϓͯ͘͠ΕΔ openbakery/gradle-xcodePluginΛΈ߹ΘͤΔ
openbakery/gradle-xcodePlugin • xcodebuildίϚϯυΛϥοϓͯ͘͠ΕΔ • archive, KeyChainपΓͷূ໌ॻཧɺplistಡΈࠐΈ࡞ɺॺ໊ɺ Carthage, CocoaPodsपΓؚΊͯϥοϓ͢Δ • App
Store, Deploy Gateͷ৴Ͱ͖Δ • ෳcon fi gɺschemeΛରԠ͢Δʹͪΐͬͱඞཁ(ࠓճ৮Εͳ ͍)
openbakery Tipsᶃ • gradle-xcodePlugin͕͍͔ͭ͘ͷϏϧυ࣌ڥมΛઃఆ͢Δ͕ૉͷ ··Ͱ௨Βͳ͍ͷͰՃઃఆ͕ඞཁ • DerivedDataPath, DSTROOT, OBJROOT, SYMROOT,
SHARED_PRECOMPS_DIR -> plugin͕GradleͷbuildDirʹมߋ͞ΕΔ • SYMROOT͕มΘΔӨڹͰXCTest࣮ߦ࣌ʹappΛಡΈࠐΊͳ͘ͳΔ
openbakery Tipsᶃ ͓͋ʔ😇
openbakery Tipsᶃ additionalParamʹڥมઃఆΛͯ͠ா৲Λ߹ΘͤΔ
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)
openbakery Tipsᶄ • Gradle TaskͷґଘΛͬͯղܾ͢Δ :iosApp:xcodetestΛ:kmm:assembleXCFrameworkʹґଘͤ͞Δ
openbakery Tipsᶄ tasks.dependsOnͰඞͣXCFrameworkੜ͕ઌʹ࣮ߦ͞ΕΔΑ͏ʹ͢Δ
͜͏ͳͬͨ 👇 Ճ͑ͯIDEͷGradleλϒͰϙνϙνͯ͠XCTestΛ࣮ߦͰ͖ΔΑ͏ʹͳͬͨ (ςετ͚ͩ͡Όͳ͘ɺී௨ͷϏϧυϙνϙνͰ࣮ߦͰ͖Δ)
·ͱΊ • Gradleͷxcode, xctest pluginiOSʹରԠ͍ͯ͠ͳ͍ • ͍͔ͭ͘᠘͕͋Δ͕gradle-xcodePluginΛ༻͢ΕXcodeͱ Android StudioͱTerminalΛߦͬͨΓདྷͨΓ͢ΔճΛݮΒͤͨ •
CI্ͰίϚϯυҰൃͰKMMͷϏϧυͱXCTestͷ࣮ߦ͕Ͱ͖ΔΑ͏ʹ ͳͬͯخ͍͠
࠷ޙʹᶃ GitHubͷStar͍ͩ͘͞😉
࠷ޙʹᶄ LTલʹͦΜͳͰ͔͍Ϳͬ͜·Εͯ😇
Ҿ༻ • https://docs.gradle.org/current/userguide/xcode_plugin.html • https://docs.gradle.org/current/userguide/ xctest_plugin.html#xctest_plugin • https://github.com/openbakery/gradle-xcodePlugin • https://github.com/RyuNen344/tink-kmm/pull/116
More Decks by RyuNen344
See All by RyuNen344
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
440
せめて、ネイティブらしく
ryunen344
2
3.3k
Cache Me If You Can
ryunen344
3
9.4k
WindowInsetsだってテストしたい
ryunen344
2
450
サプライチェーン攻撃に備える
ryunen344
1
4.1k
Okioに愛を込めて
ryunen344
3
3.1k
Firebase Hostingを使ってPasskeyをandroidアプリで試してみよう
ryunen344
2
2.3k
わかった気になる、Coroutine1.7.0のチャンネルのパフォーマンス向上
ryunen344
0
490
Other Decks in Programming
See All in Programming
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
眠らない開発チームの作り方
biwakonbu
0
110
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
1
120
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
670
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
110
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
810
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
600
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Building an army of robots
kneath
307
47k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490