|
1 | | -// swift-tools-version: 5.6 |
| 1 | +// swift-tools-version: 5.8 |
| 2 | +// The swift-tools-version declares the minimum version of Swift required to build this package. |
| 3 | + |
2 | 4 | import PackageDescription |
3 | 5 |
|
4 | 6 | let package = Package( |
5 | | - name: "AirbnbSwift", |
6 | | - platforms: [.macOS(.v10_13)], |
7 | | - products: [ |
8 | | - .plugin(name: "FormatSwift", targets: ["FormatSwift"]), |
9 | | - ], |
10 | | - dependencies: [ |
11 | | - .package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.3"), |
12 | | - ], |
13 | | - targets: [ |
14 | | - .plugin( |
15 | | - name: "FormatSwift", |
16 | | - capability: .command( |
17 | | - intent: .custom( |
18 | | - verb: "format", |
19 | | - description: "Formats Swift source files according to the Airbnb Swift Style Guide"), |
20 | | - permissions: [ |
21 | | - .writeToPackageDirectory(reason: "Format Swift source files"), |
22 | | - ]), |
23 | | - dependencies: [ |
24 | | - "AirbnbSwiftFormatTool", |
25 | | - "SwiftFormat", |
26 | | - "SwiftLintBinary", |
27 | | - ]), |
28 | | - |
29 | | - .executableTarget( |
30 | | - name: "AirbnbSwiftFormatTool", |
31 | | - dependencies: [ |
32 | | - .product(name: "ArgumentParser", package: "swift-argument-parser"), |
33 | | - ], |
34 | | - resources: [ |
35 | | - .process("airbnb.swiftformat"), |
36 | | - .process("swiftlint.yml"), |
37 | | - ]), |
38 | | - |
39 | | - .binaryTarget( |
40 | | - name: "SwiftFormat", |
41 | | - url: "https://github.com/calda/SwiftFormat/releases/download/0.51-beta-6/SwiftFormat.artifactbundle.zip", |
42 | | - checksum: "8583456d892c99f970787b4ed756a7e0c83a0d9645e923bb4dae10d581c59bc3"), |
43 | | - |
44 | | - .binaryTarget( |
45 | | - name: "SwiftLintBinary", |
46 | | - url: "https://github.com/realm/SwiftLint/releases/download/0.48.0/SwiftLintBinary-macos.artifactbundle.zip", |
47 | | - checksum: "9c255e797260054296f9e4e4cd7e1339a15093d75f7c4227b9568d63edddba50"), |
48 | | - ]) |
49 | | - |
50 | | -// Emit an error on Linux, so Swift Package Manager's platform support detection doesn't say this package supports Linux |
51 | | -// https://github.com/airbnb/swift/discussions/197#discussioncomment-4055303 |
52 | | -#if os(Linux) |
53 | | -#error("Linux is currently not supported") |
54 | | -#endif |
| 7 | + name: "TiseFormatter", |
| 8 | + platforms: [.macOS(.v12)], |
| 9 | + products: [ |
| 10 | + // Products define the executables and libraries a package produces, and make them visible to other packages. |
| 11 | + .plugin(name: "TiseFormatterPlugin", targets: ["TiseFormatterPlugin"]), |
| 12 | + ], |
| 13 | + targets: [ |
| 14 | + .plugin( |
| 15 | + name: "TiseFormatterPlugin", |
| 16 | + capability: .buildTool(), |
| 17 | + dependencies: [ |
| 18 | + .target(name: "SwiftLintBinary", condition: .when(platforms: [.macOS])), |
| 19 | + .target(name: "SwiftFormatBinary", condition: .when(platforms: [.macOS])), |
| 20 | + ] |
| 21 | + ), |
| 22 | + .binaryTarget( |
| 23 | + name: "SwiftLintBinary", |
| 24 | + url: "https://github.com/realm/SwiftLint/releases/download/0.51.0/SwiftLintBinary-macos.artifactbundle.zip", |
| 25 | + checksum: "9fbfdf1c2a248469cfbe17a158c5fbf96ac1b606fbcfef4b800993e7accf43ae" |
| 26 | + ), |
| 27 | + .binaryTarget( |
| 28 | + name: "SwiftFormatBinary", |
| 29 | + url: "https://github.com/nicklockwood/SwiftFormat/releases/download/0.51.7/swiftformat.artifactbundle.zip", |
| 30 | + checksum: "644d46307c87e516b38681b7ea986e09397ff11951ee4b76607bb8369bcbe438" |
| 31 | + ) |
| 32 | + ] |
| 33 | +) |
0 commit comments