forked from realm/SwiftLint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
48 lines (46 loc) · 1.49 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:4.0
import PackageDescription
#if canImport(CommonCrypto)
private let addCryptoSwift = false
#else
private let addCryptoSwift = true
#endif
let package = Package(
name: "SwiftLint",
products: [
.executable(name: "swiftlint", targets: ["swiftlint"]),
.library(name: "SwiftLintFramework", targets: ["SwiftLintFramework"])
],
dependencies: [
.package(url: "https://github.com/Carthage/Commandant.git", .upToNextMinor(from: "0.16.0")),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.24.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "2.0.0"),
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
] + (addCryptoSwift ? [.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.0.0")] : []),
targets: [
.target(
name: "swiftlint",
dependencies: [
"Commandant",
"SwiftLintFramework",
"SwiftyTextTable",
]
),
.target(
name: "SwiftLintFramework",
dependencies: [
"SourceKittenFramework",
"Yams",
] + (addCryptoSwift ? ["CryptoSwift"] : [])
),
.testTarget(
name: "SwiftLintFrameworkTests",
dependencies: [
"SwiftLintFramework"
],
exclude: [
"Resources",
]
)
]
)