From 84e1ab16637de3f26ed87307f0f0bf5b40ee54b5 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Tue, 12 Mar 2024 13:24:30 +0000 Subject: [PATCH] [K/N] XCTest support build script fix Fix XCTest destination in the cinterop setup. `-iframework` should point to the directory containing the framework. Co-authored-by: Cristian Garcia Merge-request: KT-MR-14804 Merged-by: Pavel Punegov --- native/kotlin-test-native-xctest/build.gradle.kts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/native/kotlin-test-native-xctest/build.gradle.kts b/native/kotlin-test-native-xctest/build.gradle.kts index 52358c2b3df..1f47078cda5 100644 --- a/native/kotlin-test-native-xctest/build.gradle.kts +++ b/native/kotlin-test-native-xctest/build.gradle.kts @@ -79,16 +79,16 @@ abstract class DevFrameworkPathValueSource : ValueSource = tasks.register("${target}FrameworkCopy") { + into(layout.buildDirectory.dir("$target/Frameworks")) from( providers.of(DevFrameworkPathValueSource::class) { parameters { konanTarget = target } - }.map { - Paths.get(it).resolve("XCTest.framework") } - ) - into(layout.buildDirectory.dir("$target/Frameworks/XCTest.framework")) + ) { + include("XCTest.framework/**") + } } // endregion @@ -167,7 +167,7 @@ nativeTargets.forEach { target -> builtBy(cinteropKlibTask) } // Add a path to a directory that contains copied framework to share it with test infrastructure - add(kotlinTestNativeXCTest.name, frameworkCopyTask.map { it.destinationDir.parentFile }) { + add(kotlinTestNativeXCTest.name, frameworkCopyTask.map { it.destinationDir }) { classifier = "${targetName}Frameworks" builtBy(frameworkCopyTask) }