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:
+1
-15
@@ -146,7 +146,7 @@ class KotlinGradleMobileSharedMultiplatformModuleBuilder : KotlinGradleAbstractM
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
// This is for iPhone emulator
|
// This is for iPhone simulator
|
||||||
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
|
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
|
||||||
iosX64("$nativeTargetName") {
|
iosX64("$nativeTargetName") {
|
||||||
binaries {
|
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 {
|
configurations {
|
||||||
compileClasspath
|
compileClasspath
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user