Skip to content

Resolve Swift compatibility libraries at iOS link time - #5682

Open
Vendula Švastalová (svastven) wants to merge 1 commit into
masterfrom
svastven/ui-uikit-gradle-fix
Open

Resolve Swift compatibility libraries at iOS link time#5682
Vendula Švastalová (svastven) wants to merge 1 commit into
masterfrom
svastven/ui-uikit-gradle-fix

Conversation

@svastven

@svastven Vendula Švastalová (svastven) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Resolve the active Xcode toolchain’s Swift compatibility-library directory lazily when an iOS consumer links.

relates to JetBrains/compose-multiplatform-core#3274

Fixes CMP-10607 Resolve Swift compatibility libraries from the consumer’s active Xcode during iOS linking

Release Notes

N/A

@svastven Vendula Švastalová (svastven) changed the title wip Resolve Swift compatibility libraries at iOS link time Aug 1, 2026
Comment on lines +25 to +26
private fun KotlinNativeTarget.configureSwiftCompatibilityLinking() {
if (System.getProperty("os.name") != "Mac OS X") return

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Gradle caches the configuration phase, it must be aware of all environment variables and system properties that affect the build.

There is a proper API:
if (!OperatingSystem.current().isMacOsX) return

Comment on lines +42 to +46
.parentFile
.parentFile
.parentFile
.resolve("usr/lib/swift/$sdkName")
.absolutePath

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract and add a comment with an explanation, please.

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