ttypic / swift-klib-plugin

Gradle Plugin for injecting Swift code into Kotlin Multiplatform Mobile shared module
MIT License
193 stars 9 forks source link

Use clang modules in cinterop instead of headers #32

Closed IlyaGulya closed 2 months ago

IlyaGulya commented 3 months ago

This PR is based on #31 and should be reviewed and merged after #31.

This change makes cinterop support usage of clang modules in Objective-C headers. This is required to be able to use any modern apple framework (including UIKit, AVFoundation, etc).

Basically, any Objective-C header containing @import directive requires modules to be enabled.

This change seems to be backwards compatible since we are generating cinterops for our own builds which are guaranteed to be clang modules.

Also, I've added iosX64 and iosSimulatorArm64 to list of targets which are required sdk path to be provided to swift build.

Finally, I've fixed all configuration cache issues.

Also, this fixes issue https://github.com/ttypic/swift-klib-plugin/issues/25

markst commented 2 months ago

@IlyaGulya awesome! does this fix #25?

IlyaGulya commented 2 months ago

@IlyaGulya awesome! does this fix #25?

Yes, it should be fixed. 🙂 Noted this in the description of PR, thanks!

markst commented 2 months ago

@IlyaGulya are we able to tag this release?

IlyaGulya commented 2 months ago

@IlyaGulya are we able to tag this release?

@IlyaGulya are we able to tag this release?

Sure, I'll try to do it later this week.

IlyaGulya commented 2 months ago

@markst this is available in latest release: https://github.com/ttypic/swift-klib-plugin/releases/tag/v0.6.2

markst commented 2 months ago

Thanks @IlyaGulya !