Shubhasai Mohapatra
04/13/2024, 1:09 PMShubhasai Mohapatra
04/13/2024, 1:09 PMimport org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
    kotlin("multiplatform")
    id("com.android.library")
    //kotlin("native.cocoapods")
    id("maven-publish")
    //id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3"
}
kotlin {
    android {
        compilations.all {
            kotlinOptions {
                jvmTarget = "1.8"
            }
        }
    }
    val xcf = XCFramework()
    ios {
        binaries.framework {
            baseName = "shared"
            xcf.add(this)
            isStatic = true
        }
    }
    sourceSets {
        val commonMain by getting
        val commonTest by getting
        val iosMain by getting {
            dependsOn(commonMain)
        }
        val iosTest by getting {
            dependsOn(commonTest)
        }
        // You might not need these if you're only using iosMain for all iOS targets
        val iosX64Main by getting {
            dependsOn(iosMain)
        }
        val iosArm64Main by getting {
            dependsOn(iosMain)
        }
        val iosSimulatorArm64Main by creating {
            dependsOn(iosMain)
        }
    }
}
android {
    namespace = "com.shubhasai.myapplication"
    compileSdk = 34
    defaultConfig {
        minSdk = 24
    }
}Shubhasai Mohapatra
04/13/2024, 1:11 PMFAILURE: Build completed with 5 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosArm64'.
> Parameter specified as non-null is null: method org.jetbrains.kotlin.gradle.tasks.ExternalDependenciesBuilder.<init>, parameter compilation
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosX64'.
> Parameter specified as non-null is null: method org.jetbrains.kotlin.gradle.tasks.ExternalDependenciesBuilder.<init>, parameter compilation
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':shared:linkReleaseFrameworkIosX64'.
> Parameter specified as non-null is null: method org.jetbrains.kotlin.gradle.tasks.ExternalDependenciesBuilder.<init>, parameter compilation
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
==============================================================================
4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':shared:linkReleaseFrameworkIosArm64'.
> Parameter specified as non-null is null: method org.jetbrains.kotlin.gradle.tasks.ExternalDependenciesBuilder.<init>, parameter compilation
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
==============================================================================
5: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.Pablichjenkov
04/13/2024, 6:00 PMShubhasai Mohapatra
04/13/2024, 6:57 PMPablichjenkov
04/14/2024, 12:20 AM