https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
a

asarazan

01/26/2023, 5:01 AM
I’ve started using the
kotlinArtifacts
DSL to build our shared layer for iOS, and I was wondering if anybody has tips on how to improve incremental build performance? Right now it’s up to ~20sec per configuration/arch combo, so we’re pushing 40-50sec for an incremental debug iOS build. I also wonder if it would be feasible to have the individual framework tasks run in parallel… given that they don’t seem to have any dependency on each other?
s

Sebastian Sellmair [JB]

01/26/2023, 8:10 AM
cc @Konstantin Tskhovrebov
a

asarazan

01/26/2023, 4:43 PM
After sleeping on it-- I think the biggest thing I can do is to not use XCFrameworks in debug mode, but to aggressively modularize the codebase into many dynamic frameworks, and to build an arch-specific framework for the current xcode build arch (similar to what I believe syncFramework does)
k

Konstantin Tskhovrebov

01/26/2023, 11:30 PM
You are absolutely right. The Artifact dsl is designed for declaration of a final artifact to ship it on a CI or somewhere else. For a local continuous development you are supposed to use a direct integration between kotlin project and Xcode. Aka embedAndSign task
The integration task was designed to build only a required framework on demand.
XCFramework contains much more than you need for the local development but all that you need for a publication
a

asarazan

01/27/2023, 3:27 PM
Makes sense, thank you!
Pictured: Aaron sees a strong disclaimer regarding experimental KMM features
37 Views