-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathPackage.swift
More file actions
98 lines (76 loc) · 2.28 KB
/
Package.swift
File metadata and controls
98 lines (76 loc) · 2.28 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:6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import CompilerPluginSupport
import PackageDescription
let package = Package(
name: "Vexil",
platforms: [
.iOS(.v15),
.macOS(.v12),
.tvOS(.v15),
.watchOS(.v8),
],
products: [
.library(name: "Vexil", targets: [ "Vexil" ]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.60.1"),
.package(url: "https://github.com/swiftlang/swift-syntax.git", "600.0.0" ..< "604.0.0"),
],
targets: [
// Vexil
.target(
name: "Vexil",
dependencies: [
.target(name: "VexilMacros"),
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
],
),
.testTarget(
name: "VexilTests",
dependencies: [
.target(name: "Vexil"),
],
),
// Macros
.macro(
name: "VexilMacros",
dependencies: [
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
],
),
],
swiftLanguageModes: [
.v6,
],
)
#if !os(Linux)
// MARK: - Vexillographer
// Vexillographer is not supported on Linux
package.products.append(
.library(name: "Vexillographer", targets: [ "Vexillographer" ]),
)
package.targets.append(
.target(
name: "Vexillographer",
dependencies: [
.target(name: "Vexil"),
],
),
)
// MARK: - Macro Testing
// We can't disable macro validation using `swift test` so these are guaranteed to fail on Linux
package.targets.append(
.testTarget(
name: "VexilMacroTests",
dependencies: [
.target(name: "VexilMacros"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
],
),
)
#endif