multiplatform-swiftpackage icon indicating copy to clipboard operation
multiplatform-swiftpackage copied to clipboard

Adding this plugin breaks the project

Open MrAsterisco opened this issue 3 years ago • 0 comments

First of all, thanks for building this plugin!

I was looking for a simple solution to build an XCFramework for my project, but unfortunately I'm having an issue as soon as I add the plugin reference. I have a medium-sized project that targets JVM, JS and iOS, but to keep it simple, I created a new project using the IntelliJ wizard and I'm seeing the same issue.

As soon as I add your plugin, the entire project "breaks" and it is no longer recognized as Multiplatform project. All the platform modules disappear and I don't see any of the usual Gradle tasks anymore.

Screenshot 2021-07-15 at 14 16 26

This is my build.gradle.kts (I am using Kotlin 1.5.21 and Gradle 6.8:

plugins {
    kotlin("multiplatform") version "1.5.21"
    id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3"
}

group = "me.alex"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

kotlin {
    jvm {
        compilations.all {
            kotlinOptions.jvmTarget = "1.8"
        }
        testRuns["test"].executionTask.configure {
            useJUnit()
        }
    }
    js(LEGACY) {
        browser {
            commonWebpackConfig {
                cssSupport.enabled = true
            }
        }
    }
    ios {
        binaries {
            framework {
                baseName = "library"
            }
        }
    }
    sourceSets {
        val commonMain by getting
        val commonTest by getting {
            dependencies {
                implementation(kotlin("test"))
            }
        }
        val jvmMain by getting
        val jvmTest by getting
        val jsMain by getting
        val jsTest by getting
        val iosMain by getting
        val iosTest by getting
    }
}

As said, this is a brand new project, so the configuration should be pretty standard.

Is this a known issue? Am I using versions of Kotlin or Gradle that are not compatible with this plugin?

MrAsterisco avatar Jul 15 '21 12:07 MrAsterisco