sergey.bogolepov
05/23/2024, 11:50 AMimport KtorClientCore
import KtorClientDarwin
import KtorClientSomeMore
Which is quite cumbersome compared to import KtorClient
. So we need to provide a Gradle DSL for users to configure a beautiful Swift modules. Figuring out such DSL is tricky and we need a few deliver-gather feedback-update iterations to get this right.
Classes and interfaces. (YouTrack ticket). As stated in the ticket, it is important to support classes and interfaces early on, because they are the basis for other features.
One important feature of the Objective-C export is cross-language inheritance: one can inherit ObjC/Swift classes from Kotlin ones, or adopt Kotlin interfaces. This feature is much harder to implement in Swift export because unlike ObjC, Swift does not provide public stable API to read runtime class metadata. We have a few ideas on how to approach this problem, but we need some time to explore them properly. In a meantime, we plan to prohibit this feature, ship interfaces and open classes without cross-language inheritance, and lift this restriction later.
How to try
1. Kotlin Playground
2. Sample project
3. Raw artifactsVincent Barthelemy
05/31/2024, 8:51 PMNoClassDefFoundError
. I tried to follow exactly what is explained in the "Raw artifacts" documentation you linked but without success.
I get java.lang.NoClassDefFoundError: org/jetbrains/kotlin/native/analysis/api/ReadKlibDeclarationAddressesKt
when calling runSwiftExport
. I thought it was an issue of compatibility between swiftExportVersion
and kotlinVersion
so I tried a couple of others, but without any luck for now.
Not sure if it's me that's doing something wrong, or if it's related to the "Versions of Swift export and Analysis API artifacts might not be the same" / "the not-yet-stable Analysis API".
Does anyone else have successfully to use the separate / raw artifacts? :)ursus
06/01/2024, 11:30 AMsergey.bogolepov
06/04/2024, 3:07 PMsergey.bogolepov
06/04/2024, 3:08 PMsergey.bogolepov
06/04/2024, 3:09 PMVincent Barthelemy
06/04/2024, 3:49 PMConsider using KGP instead like we do in the sample project.
But please note that Swift export is not yet ready for any non-trivial projects 🙂Duly noted 🫡 I will follow the progress on that topic closely 🙂 Good luck with all the work that needs to be done 💪