Skip to content

Commit 8ff9b94

Browse files
feat(release): sync
1 parent 3838b78 commit 8ff9b94

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ios/src/main/kotlin/com/rees46/ios/IosPlugin.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,37 @@ import org.gradle.api.Project
55
import org.gradle.kotlin.dsl.configure
66
import org.gradle.kotlin.dsl.create
77
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
8+
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
89

910
class IosPlugin : Plugin<Project> {
1011
override fun apply(target: Project) {
1112
with(target) {
1213
val extension = extensions.create<IosPluginExtension>("iosConfig")
13-
1414
pluginManager.apply("org.jetbrains.kotlin.multiplatform")
1515

1616
afterEvaluate {
17-
1817
val xcFrameworkName = extension.baseName.get()
18+
val xcFramework = XCFramework(xcFrameworkName)
1919

2020
extensions.configure<KotlinMultiplatformExtension> {
21-
iosX64 {
21+
iosX64().apply {
2222
binaries.framework {
2323
baseName = xcFrameworkName
24+
xcFramework.add(this)
2425
}
2526
}
26-
iosArm64 {
27+
28+
iosArm64().apply {
2729
binaries.framework {
2830
baseName = xcFrameworkName
31+
xcFramework.add(this)
2932
}
3033
}
31-
iosSimulatorArm64 {
34+
35+
iosSimulatorArm64().apply {
3236
binaries.framework {
3337
baseName = xcFrameworkName
38+
xcFramework.add(this)
3439
}
3540
}
3641
}

0 commit comments

Comments
 (0)