ge-org / multiplatform-swiftpackage

Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.
Apache License 2.0
333 stars 49 forks source link

Building only xcframework without swifttools #30

Open vdelricco opened 3 years ago

vdelricco commented 3 years ago

Hi there! Great library, thank you for taking the time to start it.

For my use case, I'm only interested in generating xcframeworks.

This means that when setting up the plugin, I'm required to include configuration for swift packages, even though I don't build them.

In other words, in my Gradle file, I need to include the following lines:

multiplatformSwiftPackage {
   . . .
    swiftToolsVersion("5.3")
    targetPlatforms {
        iOS { v("13") }
    }
}

But really, I'm only interested in the createXCFramework / createZipFile tasks.

If I remove these lines and run the createXCFramework task, I receive the following error:

> Could not create task ':lib:createXCFramework'.
   > * Swift tools version is missing.
       Declare it by adding your Swift version to the plugin configuration block.

     * Target platforms are missing.
       Declare at least one platform by adding it to the plugin configuration block.

In theory, could these tasks exist without defining those configuration lines? If so, I would be willing to take a stab at implementing that change 😄