-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathPackage.swift
40 lines (38 loc) · 1.36 KB
/
Package.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
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "SwiftLintPlugins",
platforms: [
.macOS(.v12)
],
products: [
.plugin(name: "SwiftLintBuildToolPlugin", targets: ["SwiftLintBuildToolPlugin"]),
.plugin(name: "SwiftLintCommandPlugin", targets: ["SwiftLintCommandPlugin"])
],
targets: [
.plugin(
name: "SwiftLintBuildToolPlugin",
capability: .buildTool(),
dependencies: [.target(name: "SwiftLintBinary")],
packageAccess: false
),
.plugin(
name: "SwiftLintCommandPlugin",
capability: .command(
intent: .custom(verb: "swiftlint", description: "SwiftLint Command Plugin"),
permissions: [
.writeToPackageDirectory(
reason: "When this command is run with the `--fix` option it may modify source files."
),
]
),
dependencies: [.target(name: "SwiftLintBinary")],
packageAccess: false
),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.58.2/SwiftLintBinary.artifactbundle.zip",
checksum: "f2de7c148dba39bf0ad55ada8f60b15dde383c643c69f7eb2448bd2ed532f659"
)
]
)