[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 <Cristian.Garcia-Marin@jetbrains.com> Merge-request: KT-MR-14804 Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
aaea1d6af2
commit
84e1ab1663
@@ -79,16 +79,16 @@ abstract class DevFrameworkPathValueSource : ValueSource<String, DevFrameworkPat
|
|||||||
*/
|
*/
|
||||||
fun registerCopyFrameworkTask(target: KonanTarget): TaskProvider<Sync> =
|
fun registerCopyFrameworkTask(target: KonanTarget): TaskProvider<Sync> =
|
||||||
tasks.register<Sync>("${target}FrameworkCopy") {
|
tasks.register<Sync>("${target}FrameworkCopy") {
|
||||||
|
into(layout.buildDirectory.dir("$target/Frameworks"))
|
||||||
from(
|
from(
|
||||||
providers.of(DevFrameworkPathValueSource::class) {
|
providers.of(DevFrameworkPathValueSource::class) {
|
||||||
parameters {
|
parameters {
|
||||||
konanTarget = target
|
konanTarget = target
|
||||||
}
|
}
|
||||||
}.map {
|
|
||||||
Paths.get(it).resolve("XCTest.framework")
|
|
||||||
}
|
}
|
||||||
)
|
) {
|
||||||
into(layout.buildDirectory.dir("$target/Frameworks/XCTest.framework"))
|
include("XCTest.framework/**")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
@@ -167,7 +167,7 @@ nativeTargets.forEach { target ->
|
|||||||
builtBy(cinteropKlibTask)
|
builtBy(cinteropKlibTask)
|
||||||
}
|
}
|
||||||
// Add a path to a directory that contains copied framework to share it with test infrastructure
|
// 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"
|
classifier = "${targetName}Frameworks"
|
||||||
builtBy(frameworkCopyTask)
|
builtBy(frameworkCopyTask)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user