IDEA plugin: Don't create iOS test in the share lib project template

Since 1.3.70 an iOS simulator test task is created by the MPP Gradle
plugin out of the box. So we stop creating such a task manually in
the shared library project template.

Issue #KT-35560 Fixed.
This commit is contained in:
Ilya Matveev
2020-01-09 13:50:59 +07:00
parent c084dfa1d7
commit 68d64f1b5c
@@ -146,7 +146,7 @@ class KotlinGradleMobileSharedMultiplatformModuleBuilder : KotlinGradleAbstractM
kotlin {
jvm()
// This is for iPhone emulator
// This is for iPhone simulator
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
iosX64("$nativeTargetName") {
binaries {
@@ -183,20 +183,6 @@ class KotlinGradleMobileSharedMultiplatformModuleBuilder : KotlinGradleAbstractM
}
}
task $nativeTestName {
def device = project.findProperty("${nativeTargetName}Device")?.toString() ?: "iPhone 8"
dependsOn kotlin.targets.$nativeTargetName.binaries.getTest('DEBUG').linkTaskName
group = JavaBasePlugin.VERIFICATION_GROUP
description = "Runs tests for target '$nativeTargetName' on an iOS simulator"
doLast {
def binary = kotlin.targets.$nativeTargetName.binaries.getTest('DEBUG').outputFile
exec {
commandLine 'xcrun', 'simctl', 'spawn', device, binary.absolutePath
}
}
}
configurations {
compileClasspath
}