multiplatform-swiftpackage
multiplatform-swiftpackage copied to clipboard
Adding this plugin breaks the project
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.

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?