PaGr0m / kotlin-spm-plugin

Gradle plugin for integration Kotlin with Swift package dependencies
MIT License
54 stars 5 forks source link

bundleXCFramework Failure on exported dependencies #6

Open demonar opened 1 year ago

demonar commented 1 year ago

🐛 Describe the bug

bundleXCFramework fails on exported kotlin dependencies

⚠️ Current behavior

When We try to create the xcFramework with the plugin, while we have the exported libraries in the dependencies as api elements we still get this error, this doesn't happen on the cocoapods podPublishXCFramework task.

✅ Expected behavior

The bundleXCFramework task should create the xcFramework without errors.

💣 Steps to reproduce

create a new project using kotlin 1.8.20, kotlinx.serialization and try to run the task.

Error:

Following dependencies exported in the releaseFramework binary are not specified as API-dependencies of a corresponding source set:

Files: [/Users/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-json-iosarm64/1.5.0/afa894fdb05ad5ab856deef2a5029727bbe7edc1/kotlinx-serialization-json.klib]

Please add them in the API-dependencies and rerun the build.

📱 Tech info