Skip to content

Commit 59115e5

Browse files
committed
Small refactor
1 parent 1255831 commit 59115e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build-plugins/kmp-conventions/src/main/kotlin/aws/sdk/kotlin/gradle/kmp/ConfigureIosSimulator.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import org.gradle.kotlin.dsl.withType
1010
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest
1111
import org.jetbrains.kotlin.konan.target.HostManager
1212

13+
private val DEFAULT_SIMULATOR_DEVICE_NAME = "iPhone 16"
14+
1315
/**
1416
* Disables standalone mode in simulator tests since it causes issues with TLS.
1517
* This means we need to manage the simulator state ourselves (booting, shutting down).
@@ -18,7 +20,7 @@ import org.jetbrains.kotlin.konan.target.HostManager
1820
public fun Project.configureIosSimulatorTasks() {
1921
if (!HostManager.hostIsMac) return
2022

21-
val simulatorDeviceName = project.findProperty("iosSimulatorDevice") as? String ?: "iPhone 16"
23+
val simulatorDeviceName = project.findProperty("iosSimulatorDevice") as? String ?: DEFAULT_SIMULATOR_DEVICE_NAME
2224
val xcrun = "/usr/bin/xcrun"
2325

2426
val bootTask = rootProject.tasks.maybeCreate("bootIosSimulatorDevice", Exec::class.java).apply {

0 commit comments

Comments
 (0)