Isolating kotlin api called by swift to iosapi module to improve compile time
From 14 minutes to 15 seconds!
This commit is contained in:
41
iosapi/build.gradle.kts
Normal file
41
iosapi/build.gradle.kts
Normal file
@@ -0,0 +1,41 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
// no Android app here; this module exists only to publish the iOS framework
|
||||
kotlin("native.cocoapods")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
// Only device if that's all you use:
|
||||
iosArm64()
|
||||
|
||||
// Cocoapods is used for 3rd party library dependencies in iOS
|
||||
cocoapods {
|
||||
version = "1.0.0" // Out version of the podspec
|
||||
ios.deploymentTarget = "14.0"
|
||||
summary = "iOS facade"
|
||||
homepage = "https://example.com"
|
||||
framework {
|
||||
baseName = "shared"
|
||||
isStatic = true
|
||||
}
|
||||
// This generates the cinterop => `platform.GoogleMaps.*`
|
||||
pod("GoogleMaps") // keep version unspecified to track latest podspec
|
||||
{
|
||||
// To support clang modules
|
||||
extraOpts += listOf("-compiler-option", "-fmodules")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(project(":shared"))
|
||||
}
|
||||
}
|
||||
val commonTest by getting
|
||||
val iosArm64Main by getting
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user