From 8d1b4acb6f62f26893c9321008d777e3e6e59064 Mon Sep 17 00:00:00 2001 From: Ildar Karimov Date: Fri, 15 Jun 2018 13:03:37 +0300 Subject: [PATCH] Native iOS test task --- greeting/ios/build.gradle | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/greeting/ios/build.gradle b/greeting/ios/build.gradle index a90f29b..a1a6472 100644 --- a/greeting/ios/build.gradle +++ b/greeting/ios/build.gradle @@ -9,6 +9,24 @@ konanArtifacts { // The multiplatform support is disabled by default. enableMultiplatform true } + + library('NativeLib') { + enableMultiplatform true + } + + program('NativeTest') { + srcDir 'src/test/kotlin' + commonSourceSet 'test' + libraries { + artifact 'NativeLib' + } + extraOpts '-tr' + } +} + +task test(dependsOn: 'compileKonanNativeTestIos_x64', type: Exec) { + def textExecutable = tasks["compileKonanNativeTestIos_x64"].artifactPath + commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable) } dependencies {