Skip to content

Commit c325a4c

Browse files
committed
Upgrade to latest build plugin
1 parent c234561 commit c325a4c

File tree

2 files changed

+2
-50
lines changed

2 files changed

+2
-50
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
kotlin-version = "2.1.0"
33
dokka-version = "1.9.10"
44

5-
aws-kotlin-repo-tools-version = "0.4.23-kn"
5+
aws-kotlin-repo-tools-version = "0.4.24-kn"
66

77
# libs
88
coroutines-version = "1.9.0"

runtime/build.gradle.kts

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -116,54 +116,6 @@ subprojects {
116116
}
117117
}
118118
}
119-
120-
smithyConfigureIosSimulatorTasks()
121119
}
122120

123-
/**
124-
* Disables standalone mode in simulator tests since it causes issues with TLS.
125-
* This means we need to manage the simulator state ourselves (booting, shutting down).
126-
* https://youtrack.jetbrains.com/issue/KT-38317
127-
*/
128-
public fun Project.smithyConfigureIosSimulatorTasks() {
129-
if (!HostManager.hostIsMac) return
130-
131-
val simulatorDeviceName = project.findProperty("iosSimulatorDevice") as? String ?: "iPhone 15"
132-
val xcrun = "/usr/bin/xcrun"
133-
134-
val bootTask = rootProject.tasks.maybeCreate("bootIosSimulatorDevice", Exec::class.java).apply {
135-
isIgnoreExitValue = true
136-
commandLine(xcrun, "simctl", "boot", simulatorDeviceName)
137-
138-
doLast {
139-
val result = executionResult.get()
140-
val code = result.exitValue
141-
if (code != 148 && code != 149) { // ignore "simulator already running" errors
142-
result.assertNormalExitValue()
143-
}
144-
}
145-
}
146-
147-
val shutdownTask = rootProject.tasks.maybeCreate("shutdownIosSimulatorDevice", Exec::class.java).apply {
148-
isIgnoreExitValue = true
149-
commandLine(xcrun, "simctl", "shutdown", simulatorDeviceName)
150-
151-
doLast {
152-
val result = executionResult.get()
153-
val code = result.exitValue
154-
if (code != 148 && code != 149) { // ignore "simulator already shutdown" errors
155-
result.assertNormalExitValue()
156-
}
157-
}
158-
}
159-
160-
allprojects {
161-
val simulatorTasks = tasks.withType<KotlinNativeSimulatorTest>()
162-
simulatorTasks.configureEach {
163-
dependsOn(bootTask)
164-
standalone.set(false)
165-
device.set(simulatorDeviceName)
166-
}
167-
shutdownTask.mustRunAfter(simulatorTasks)
168-
}
169-
}
121+
configureIosSimulatorTasks()

0 commit comments

Comments
 (0)