forked from apple/swift-async-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage@swift-5.8.swift
More file actions
98 lines (93 loc) · 2.6 KB
/
Copy pathPackage@swift-5.8.swift
File metadata and controls
98 lines (93 loc) · 2.6 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// swift-tools-version: 5.8
import PackageDescription
import CompilerPluginSupport
// Availability Macros
let availabilityMacros: [SwiftSetting] = [
.enableExperimentalFeature(
"AvailabilityMacro=AsyncAlgorithms 1.0:macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0"
),
.enableExperimentalFeature(
"AvailabilityMacro=AsyncAlgorithms 1.1:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"
),
]
let package = Package(
name: "swift-async-algorithms",
products: [
.library(name: "AsyncAlgorithms", targets: ["AsyncAlgorithms"])
],
targets: [
.target(
name: "AsyncAlgorithms",
dependencies: [
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "DequeModule", package: "swift-collections"),
],
swiftSettings: availabilityMacros + [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
.target(
name: "AsyncSequenceValidation",
dependencies: ["_CAsyncSequenceValidationSupport", "AsyncAlgorithms"],
swiftSettings: availabilityMacros + [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
.systemLibrary(name: "_CAsyncSequenceValidationSupport"),
.target(
name: "AsyncAlgorithms_XCTest",
dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation"],
swiftSettings: availabilityMacros + [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
.testTarget(
name: "AsyncAlgorithmsTests",
dependencies: [
.target(name: "AsyncAlgorithms"),
.target(
name: "AsyncSequenceValidation",
condition: .when(platforms: [
.macOS,
.iOS,
.tvOS,
.watchOS,
.visionOS,
.macCatalyst,
.android,
.linux,
.openbsd,
.wasi,
])
),
.target(
name: "AsyncAlgorithms_XCTest",
condition: .when(platforms: [
.macOS,
.iOS,
.tvOS,
.watchOS,
.visionOS,
.macCatalyst,
.android,
.linux,
.openbsd,
.wasi,
])
),
],
swiftSettings: availabilityMacros + [
.enableExperimentalFeature("StrictConcurrency=complete")
]
),
]
)
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0")
]
} else {
package.dependencies += [
.package(path: "../swift-collections")
]
}