With new `kotlin-platform-native` test compile tas...
# kotlin-native
t
With new
kotlin-platform-native
test compile task (
compileTestDebugKotlinNative
) is dynamic so you can access it only after configuration using
Copy code
task test(dependsOn: 'compileTestDebugKotlinNative', overwrite: true) {
    doLast {
        exec {
            def textExecutable = tasks["compileTestDebugKotlinNative"].outputFile
            commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable)
        }
    }
}
or
Copy code
afterEvaluate { project ->
    project.task('test', dependsOn: 'compileTestDebugKotlinNative', type: Exec, overwrite: true) {
        def textExecutable = tasks["compileTestDebugKotlinNative"].outputFile
        commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable)
    }
}
@ilya.matveev which option is better in your opinion? Or maybe you have some plans to 'fix' test task in plugin for simulator?
i
I think the second one is better. As for testing on a simulator, yes, there are some plans to support it.