Skip to content

Migrate from swiftklib to native Kotlin SwiftPM import#4

Draft
Copilot wants to merge 8 commits intomainfrom
copilot/migrate-swiftklib-to-kotlin
Draft

Migrate from swiftklib to native Kotlin SwiftPM import#4
Copilot wants to merge 8 commits intomainfrom
copilot/migrate-swiftklib-to-kotlin

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Replaces the third-party swiftklib plugin with native Kotlin SwiftPM import support introduced in Kotlin 2.4.0-titan-214.

Configuration Changes

  • settings.gradle.kts: Point to packages.jetbrains.team/maven/p/kt/dev
  • libs.versions.toml: Kotlin 2.0.212.4.0-titan-214, remove swiftklib
  • build.gradle.kts: Add KGP version constraint via buildscript block

Build Script Migration

// Before (swiftklib)
swiftklib {
    create("RadioPlayer") {
        path = file("native/RadioPlayer")
        packageName("dev.markturnip.radioplayer")
        minIos = 14
    }
}

// After (native SwiftPM)
swiftPMDependencies {
    iosDeploymentVersion.set("14.0")
    localPackage(
        path = projectDir.resolve("native/RadioPlayer"),
        products = listOf("RadioPlayer")
    )
}

Import Namespace Change

// Before
import dev.markturnip.radioplayer.MediaPlayController

// After
import swiftPMImport.dev.markturnip.radioplayer.MediaPlayController

Framework changed to dynamic (isStatic = false) per SwiftPM integration requirements.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: markst <274318+markst@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate usage of swiftklib to new kotlin SwiftPM import Migrate from swiftklib to spm4Kmp for Swift/Kotlin interop Feb 22, 2026
Copilot AI and others added 2 commits February 22, 2026 16:17
Co-authored-by: markst <274318+markst@users.noreply.github.com>
Co-authored-by: markst <274318+markst@users.noreply.github.com>
Copilot AI changed the title Migrate from swiftklib to spm4Kmp for Swift/Kotlin interop Migrate from swiftklib to native Kotlin SwiftPM import Feb 22, 2026
Copilot AI requested a review from markst February 22, 2026 16:20
@markst
Copy link
Owner

markst commented Mar 2, 2026

Seems I'm unable to run integrateLinkagePackage:

radioplayer-kt % ./gradlew radioplayer:integrateEmbedAndSign
Reusing configuration cache.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':radioplayer:generateSyntheticLinkageSwiftPMImportProjectForLinkageForCli'.
> Cannot query the value of task ':radioplayer:generateSyntheticLinkageSwiftPMImportProjectForLinkageForCli' property 'syntheticImportProjectRoot' because it has no value available.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 332ms
Configuration cache entry reused.
radioplayer-kt % ./gradlew radioplayer:integrateLinkagePackage
Reusing configuration cache.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':radioplayer:generateSyntheticLinkageSwiftPMImportProjectForLinkageForCli'.
> Cannot query the value of task ':radioplayer:generateSyntheticLinkageSwiftPMImportProjectForLinkageForCli' property 'syntheticImportProjectRoot' because it has no value available.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 332ms
Configuration cache entry reused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants