forked from Quick/Quick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package@swift-5.9.swift
108 lines (106 loc) · 3.92 KB
/
Package@swift-5.9.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
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
99
100
101
102
103
104
105
106
107
108
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "Quick",
platforms: [
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .visionOS(.v1)
],
products: [
.library(name: "Quick", targets: ["Quick"]),
.executable(name: "quicklint", targets: ["QuickLint"]),
.plugin(name: "DefocusCommandPlugin", targets: ["DefocusCommandPlugin"]),
.plugin(name: "LintError", targets: ["LintError"]),
.plugin(name: "LintWarning", targets: ["LintWarning"]),
.plugin(name: "LintCommandPlugin", targets: ["LintCommandPlugin"]),
],
dependencies: [
.package(url: "https://github.com/Quick/Nimble.git", from: "13.2.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.1"),
.package(url: "https://github.com/apple/swift-algorithms.git", from: "1.2.0"),
.package(url: "https://github.com/Quick/swift-fakes.git", from: "0.0.1"),
],
targets: {
var targets: [Target] = [
.plugin(
name: "DefocusCommandPlugin",
capability: .command(intent: .sourceCodeFormatting(), permissions: [.writeToPackageDirectory(reason: "Remove focus from Quick tests")]),
dependencies: ["QuickLint"]
),
.plugin(
name: "LintError",
capability: .buildTool(),
dependencies: ["QuickLint"]
),
.plugin(
name: "LintWarning",
capability: .buildTool(),
dependencies: ["QuickLint"]
),
.plugin(
name: "LintCommandPlugin",
capability: .command(intent: .custom(verb: "quicklint", description: "Verify no focused tests in Quick tests"), permissions: []),
dependencies: ["QuickLint"]
),
.executableTarget(
name: "QuickLint",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Algorithms", package: "swift-algorithms"),
]
),
.testTarget(
name: "QuickTests",
dependencies: [ "Quick", "Nimble" ],
exclude: [
"QuickAfterSuiteTests/AfterSuiteTests+ObjC.m",
"QuickFocusedTests/FocusedTests+ObjC.m",
"QuickTests/FunctionalTests/ObjC",
"QuickTests/Helpers/QCKSpecRunner.h",
"QuickTests/Helpers/QCKSpecRunner.m",
"QuickTests/Helpers/QuickTestsBridgingHeader.h",
"QuickTests/QuickConfigurationTests.m",
"QuickFocusedTests/Info.plist",
"QuickTests/Info.plist",
"QuickAfterSuiteTests/Info.plist",
]
),
.testTarget(
name: "QuickIssue853RegressionTests",
dependencies: [ "Quick" ]
),
.testTarget(
name: "QuickLintTests",
dependencies: [
"QuickLint",
"Quick",
"Nimble",
.product(name: "Fakes", package: "swift-fakes"),
]
)
]
#if os(macOS)
targets.append(contentsOf: [
.target(name: "QuickObjCRuntime", dependencies: []),
.target(
name: "Quick",
dependencies: [ "QuickObjCRuntime" ],
exclude: [
"Info.plist",
]
),
])
#else
targets.append(contentsOf: [
.target(
name: "Quick",
dependencies: [],
exclude: [
"Info.plist"
]
),
])
#endif
return targets
}(),
swiftLanguageVersions: [.v5]
)