-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
code from project:
// now standard test task use --standalone but it broke network calls
val newTestTask = tasks.create("iosX64TestWithNetwork") {
val linkTask =
tasks.getByName("linkDebugTestIosX64") as org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
dependsOn(linkTask)
group = JavaBasePlugin.VERIFICATION_GROUP
description = "Runs tests for target 'ios' on an iOS simulator"
doLast {
val binary = linkTask.binary.outputFile
val device = "iPhone 8"
exec {
commandLine = listOf("xcrun", "simctl", "boot", device)
isIgnoreExitValue = true
}
exec {
val frameworksPath =
"${rootProject.buildDir.absolutePath}/cocoapods/UninstalledProducts/iphonesimulator"
environment("SIMCTL_CHILD_DYLD_FRAMEWORK_PATH", frameworksPath)
commandLine = listOf(
"xcrun",
"simctl",
"spawn",
device,
binary.absolutePath
)
}
exec {
commandLine = listOf("xcrun", "simctl", "shutdown", device)
}
}
}
with(tasks.getByName("iosX64Test")) {
dependsOn(newTestTask)
onlyIf { false }
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request