|
1 | | -// swift-tools-version:5.2 |
| 1 | +// swift-tools-version:5.10 |
2 | 2 |
|
3 | 3 | import PackageDescription |
4 | 4 |
|
5 | 5 | let package = Package( |
6 | 6 | name: "LyricsKit", |
7 | 7 | platforms: [ |
8 | 8 | .macOS(.v10_15), |
9 | | - .iOS(.minimalToolChainSupported), |
10 | | - .tvOS(.v9), |
11 | | - .watchOS(.v2), |
| 9 | + .iOS(.v13), |
| 10 | + .tvOS(.v13), |
| 11 | + .watchOS(.v6), |
12 | 12 | ], |
13 | 13 | products: [ |
14 | 14 | .library( |
15 | 15 | name: "LyricsKit", |
16 | | - targets: ["LyricsCore", "LyricsService", "LyricsServiceUI"]), |
| 16 | + targets: ["LyricsCore", "LyricsService", "LyricsServiceUI"] |
| 17 | + ), |
17 | 18 | ], |
18 | 19 | dependencies: [ |
19 | | - .package(url: "https://github.com/MxIris-LyricsX-Project/CXShim", .branchItem("master")), |
20 | | - .package(url: "https://github.com/MxIris-LyricsX-Project/CXExtensions", .branchItem("master")), |
| 20 | + .package(url: "https://github.com/MxIris-LyricsX-Project/CXShim", branch: "master"), |
| 21 | + .package(url: "https://github.com/MxIris-LyricsX-Project/CXExtensions", branch: "master"), |
21 | 22 | .package(url: "https://github.com/ddddxxx/Regex", from: "1.0.1"), |
22 | | - .package(url: "https://github.com/MxIris-Library-Forks/SwiftCF", .branchItem("master")), |
23 | | - .package(name: "Gzip", url: "https://github.com/1024jp/GzipSwift", from: "5.0.0"), |
| 23 | + .package(url: "https://github.com/MxIris-Library-Forks/SwiftCF", branch: "master"), |
| 24 | + .package(url: "https://github.com/1024jp/GzipSwift", from: "5.0.0"), |
24 | 25 | .package(url: "https://github.com/kishikawakatsumi/KeychainAccess", .upToNextMajor(from: "4.0.0")), |
| 26 | + .package(url: "https://github.com/MxIris-Library-Forks/Schedule", branch: "master"), |
25 | 27 | ], |
26 | 28 | targets: [ |
27 | 29 | .target( |
28 | 30 | name: "LyricsCore", |
29 | | - dependencies: ["Regex", "SwiftCF"]), |
| 31 | + dependencies: [ |
| 32 | + .product(name: "Regex", package: "Regex"), |
| 33 | + .product(name: "SwiftCF", package: "SwiftCF"), |
| 34 | + ] |
| 35 | + ), |
30 | 36 | .target( |
31 | 37 | name: "LyricsService", |
32 | 38 | dependencies: [ |
33 | | - "LyricsCore", "CXShim", "CXExtensions", "Regex", "Gzip", |
| 39 | + "LyricsCore", |
| 40 | + .product(name: "CXShim", package: "CXShim"), |
| 41 | + .product(name: "CXExtensions", package: "CXExtensions"), |
| 42 | + .product(name: "Regex", package: "Regex"), |
| 43 | + .product(name: "Gzip", package: "GzipSwift"), |
34 | 44 | ] |
35 | 45 | ), |
36 | 46 | .target( |
37 | 47 | name: "LyricsServiceUI", |
38 | 48 | dependencies: [ |
39 | 49 | "LyricsCore", |
40 | 50 | "LyricsService", |
41 | | - "KeychainAccess", |
| 51 | + .product(name: "KeychainAccess", package: "KeychainAccess"), |
| 52 | + .product(name: "Schedule", package: "Schedule"), |
42 | 53 | ] |
43 | 54 | ), |
44 | 55 | .testTarget( |
45 | 56 | name: "LyricsKitTests", |
46 | | - dependencies: ["LyricsCore", "LyricsService"]), |
| 57 | + dependencies: [ |
| 58 | + "LyricsCore", |
| 59 | + "LyricsService", |
| 60 | + ] |
| 61 | + ), |
47 | 62 | ] |
48 | 63 | ) |
49 | 64 |
|
50 | | -extension SupportedPlatform.IOSVersion { |
51 | | - #if compiler(>=5.3) |
52 | | - static var minimalToolChainSupported = SupportedPlatform.IOSVersion.v9 |
53 | | - #else |
54 | | - static var minimalToolChainSupported = SupportedPlatform.IOSVersion.v8 |
55 | | - #endif |
56 | | -} |
57 | | - |
58 | 65 | enum CombineImplementation { |
59 | | - |
60 | 66 | case combine |
61 | 67 | case combineX |
62 | 68 | case openCombine |
63 | | - |
| 69 | + |
64 | 70 | static var `default`: CombineImplementation { |
65 | 71 | return .combineX |
66 | 72 | } |
67 | | - |
| 73 | + |
68 | 74 | init?(_ description: String) { |
69 | 75 | let desc = description.lowercased().filter(\.isLetter) |
70 | 76 | switch desc { |
71 | | - case "combine": self = .combine |
72 | | - case "combinex": self = .combineX |
| 77 | + case "combine": self = .combine |
| 78 | + case "combinex": self = .combineX |
73 | 79 | case "opencombine": self = .openCombine |
74 | | - default: return nil |
| 80 | + default: return nil |
75 | 81 | } |
76 | 82 | } |
77 | 83 | } |
78 | 84 |
|
79 | 85 | extension ProcessInfo { |
80 | | - |
81 | 86 | var combineImplementation: CombineImplementation { |
82 | 87 | return environment["CX_COMBINE_IMPLEMENTATION"].flatMap(CombineImplementation.init) ?? .default |
83 | 88 | } |
|
0 commit comments