File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
ios/src/main/kotlin/com/rees46/ios Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -5,32 +5,37 @@ import org.gradle.api.Project
55import org.gradle.kotlin.dsl.configure
66import org.gradle.kotlin.dsl.create
77import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
8+ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
89
910class 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 }
You can’t perform that action at this time.
0 commit comments