Isolating kotlin api called by swift to iosapi module to improve compile time

From 14 minutes to 15 seconds!
This commit is contained in:
Olof Hedman
2025-10-15 19:32:23 +02:00
parent 2c662dbb4c
commit cef1f50c56
666 changed files with 25147 additions and 73 deletions

View File

@@ -45,46 +45,16 @@ kotlin {
}
}
// For iOS targets, this is also where you should
// configure native binary output. For more information, see:
// https://kotlinlang.org/docs/multiplatform-build-native-binaries.html#build-xcframeworks
// Only building for iosArm64 to save time
iosArm64()
// A step-by-step guide on how to include this library in an XCode
// project can be found here:
// https://developer.android.com/kotlin/multiplatform/migrate
val xcfName = "shared"
val xcf = XCFramework()
// iosX64 {
// binaries.framework {
// baseName = xcfName
// isStatic = true
// xcf.add(this)
// }
// }
iosArm64 {
binaries.framework {
baseName = xcfName
isStatic = true
xcf.add(this)
}
}
// iosSimulatorArm64 {
// binaries.framework {
// baseName = xcfName
// isStatic = true
// xcf.add(this)
// }
// }
// Cocoapods is used for 3rd party library dependencies in iOS
cocoapods {
version = "1.0.0" // Out version of the podspec
ios.deploymentTarget = "14.0"
framework {
baseName = xcfName
baseName = "shared"
isStatic = true
}
// This generates the cinterop => `platform.GoogleMaps.*`