mirror of
https://github.com/swift-server/swift-service-lifecycle
synced 2026-11-30 05:28:48 +00:00
## Summary As I was trying to add Wasm CI to Swift Configuration, I noticed it failed to build in Service Lifecycle, so adding that here first. ## Test Plan Haven't run locally, will fail for now. --------- Co-authored-by: Vladimir Kukushkin <kukushechkin@mac.com>
86 lines
2.2 KiB
Swift
86 lines
2.2 KiB
Swift
// swift-tools-version:6.0
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "swift-service-lifecycle",
|
|
products: [
|
|
.library(
|
|
name: "ServiceLifecycle",
|
|
targets: ["ServiceLifecycle"]
|
|
),
|
|
.library(
|
|
name: "ServiceLifecycleTestKit",
|
|
targets: ["ServiceLifecycleTestKit"]
|
|
),
|
|
.library(
|
|
name: "UnixSignals",
|
|
targets: ["UnixSignals"]
|
|
),
|
|
],
|
|
dependencies: [
|
|
.package(
|
|
url: "https://github.com/apple/swift-log.git",
|
|
from: "1.5.2"
|
|
),
|
|
.package(
|
|
url: "https://github.com/apple/swift-async-algorithms.git",
|
|
from: "1.1.3"
|
|
),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "ServiceLifecycle",
|
|
dependencies: [
|
|
.product(
|
|
name: "Logging",
|
|
package: "swift-log"
|
|
),
|
|
.product(
|
|
name: "AsyncAlgorithms",
|
|
package: "swift-async-algorithms"
|
|
),
|
|
.target(name: "UnixSignals"),
|
|
.target(name: "ConcurrencyHelpers"),
|
|
]
|
|
),
|
|
.target(
|
|
name: "ServiceLifecycleTestKit",
|
|
dependencies: [
|
|
.target(name: "ServiceLifecycle")
|
|
]
|
|
),
|
|
.target(
|
|
name: "UnixSignals",
|
|
dependencies: [
|
|
.target(name: "ConcurrencyHelpers")
|
|
]
|
|
),
|
|
.target(
|
|
name: "ConcurrencyHelpers"
|
|
),
|
|
.testTarget(
|
|
name: "ServiceLifecycleTests",
|
|
dependencies: [
|
|
.target(name: "ServiceLifecycle"),
|
|
.target(name: "ServiceLifecycleTestKit"),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "UnixSignalsTests",
|
|
dependencies: [
|
|
.target(name: "UnixSignals")
|
|
]
|
|
),
|
|
]
|
|
)
|
|
|
|
for target in package.targets {
|
|
#if compiler(<6.2)
|
|
// Needed since Sendable checking with isolated methods is not working correctly before 6.2
|
|
if target.swiftSettings == nil {
|
|
target.swiftSettings = []
|
|
}
|
|
target.swiftSettings?.append(.swiftLanguageMode(.v5))
|
|
#endif
|
|
}
|