forked from airbnb/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
48 lines (44 loc) · 1.51 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
41
42
43
44
45
46
47
48
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "AirbnbSwift",
platforms: [.macOS(.v10_13)],
products: [
.plugin(name: "FormatSwift", targets: ["FormatSwift"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.3"),
],
targets: [
.plugin(
name: "FormatSwift",
capability: .command(
intent: .custom(
verb: "format",
description: "Formats Swift source files according to the Airbnb Swift Style Guide"),
permissions: [
.writeToPackageDirectory(reason: "Format Swift source files"),
]),
dependencies: [
"AirbnbSwiftFormatTool",
"SwiftFormat",
"SwiftLintBinary",
]),
.executableTarget(
name: "AirbnbSwiftFormatTool",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
resources: [
.process("airbnb.swiftformat"),
.process("swiftlint.yml"),
]),
.binaryTarget(
name: "SwiftFormat",
url: "https://github.com/calda/SwiftFormat/releases/download/0.50-beta-4/SwiftFormat.artifactbundle.zip",
checksum: "b7dfc4e623c1a6686d51904f74f7898194b950cd1db65f831bd3c0e0e6e70749"),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.48.0/SwiftLintBinary-macos.artifactbundle.zip",
checksum: "9c255e797260054296f9e4e4cd7e1339a15093d75f7c4227b9568d63edddba50"),
])