Skip to content

Commit 1cb0112

Browse files
committed
chore: fix swift build fail on swift 5.5
1 parent 3637029 commit 1cb0112

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Package.swift

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
import PackageDescription
44

5+
let dependencies: [Package.Dependency]
6+
#if compiler(>=5.6) && swift(>=5.6)
7+
dependencies = [
8+
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
9+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
10+
.package(url: "https://github.com/apple/swift-format", from: "0.50600.1"),
11+
]
12+
#else
13+
dependencies = [
14+
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
15+
.package(url: "https://github.com/apple/swift-format", from: "0.50600.1"),
16+
]
17+
#endif
18+
519
let package = Package(
620
name: "AsyncObject",
721
platforms: [
@@ -16,11 +30,7 @@ let package = Package(
1630
targets: ["AsyncObject"]
1731
),
1832
],
19-
dependencies: [
20-
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
21-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
22-
.package(url: "https://github.com/apple/swift-format", from: "0.50600.1"),
23-
],
33+
dependencies: dependencies,
2434
targets: [
2535
.target(
2636
name: "AsyncObject",

0 commit comments

Comments
 (0)