49 lines
1.5 KiB
Swift
49 lines
1.5 KiB
Swift
// swift-tools-version:5.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.17.0")),
|
|
.package(url: "https://github.com/jpsim/SourceKitten.git", .branch("master")),
|
|
.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", .upToNextMinor(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",
|
|
]
|
|
)
|
|
]
|
|
)
|