-
Notifications
You must be signed in to change notification settings - Fork 320
/
Package.swift
52 lines (47 loc) · 1.61 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
49
50
51
52
// 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"),
]),
.testTarget(
name: "AirbnbSwiftFormatToolTests",
dependencies: ["AirbnbSwiftFormatTool"]),
.binaryTarget(
name: "swiftformat",
url: "https://github.com/calda/SwiftFormat/releases/download/0.55-beta-17/SwiftFormat.artifactbundle.zip",
checksum: "659bdcccc69a6e5ccbd273f0fb7b7af9655d5fa7acc17c4fb3deba6a7b1e9a5b"),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.55.1/SwiftLintBinary-macos.artifactbundle.zip",
checksum: "722a705de1cf4e0e07f2b7d2f9f631f3a8b2635a0c84cce99f9677b38aa4a1d6"),
])