thevery
08/05/2018, 6:32 PMkotlin-platform-native
test compile task (compileTestDebugKotlinNative
) is dynamic so you can access it only after configuration using
task test(dependsOn: 'compileTestDebugKotlinNative', overwrite: true) {
doLast {
exec {
def textExecutable = tasks["compileTestDebugKotlinNative"].outputFile
commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable)
}
}
}
or
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?ilya.matveev
08/06/2018, 4:22 AM