-
Notifications
You must be signed in to change notification settings - Fork 1
/
Package.swift
40 lines (37 loc) · 1.2 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "DemoKit",
platforms: [
.iOS(.v15)
],
products: [
.library(name: "DemoKit", targets: ["DemoKit"]),
.library(name: "DemoKitSnapshot", targets: ["DemoKitSnapshot"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", exact: "1.16.0")
],
targets: [
.target(
name: "DemoKit",
swiftSettings: .strictConcurrency
),
.target(
name: "DemoKitSnapshot",
dependencies: [
"DemoKit",
.product(name: "SnapshotTesting", package: "swift-snapshot-testing")
],
swiftSettings: .strictConcurrency
)
]
)
// https://forums.swift.org/t/concurrency-checking-in-swift-packages-unsafeflags/61135/14
// https://github.com/apple/swift/pull/66991
@available(swift, deprecated: 6.0, message: "Strict concurrency should be enabled by default in Swift 6")
extension Array where Element == SwiftSetting {
static var strictConcurrency: [SwiftSetting] {
[SwiftSetting.enableExperimentalFeature("StrictConcurrency")]
}
}