How does the new Kotlin Multiplatform Plugin for I...
# multiplatform
m
How does the new Kotlin Multiplatform Plugin for Intellij detect Xcode projects? In my repository, I have 4 library projects that I created gradle targets to build and interop using cinterop. I have 5 app projects that build and consume the KMP libraries. Three of the library projects on Objective-C libraries, and the other is Swift. Only the Swift one is being detected by the plugin. All the other projects including the app are not detected.
e
What do you mean by Xcode projects?
m
Projects that I created in Xcode either libraries or apps. These all predate this plugin. So a bunch of
.xcodeproj
and some
xcworkspace
directories.
e
you need to connect your project to Kotlin/native compiler with script
m
This Xcode projects through a
Run Script
phase or something that builds the Xcode projects through a gradle script?
e
build phase script section, create a new build script if not found called
Compile Kotlin Framework
m
One of the projects has that and is not detected. The others are called
Run Script
, and I've found no way to rename them.
e
Copy code
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
  echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
  exit 0
fi
cd "$SRCROOT/.."
./gradlew :{yourPackageModule}:embedAndSignAppleFrameworkForXcode
m
Yeah, that's what I have
With a few extra things added to it