forked from mxcl/swift-sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
52 lines (50 loc) · 1.83 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.1
import PackageDescription
let package = Package(
name: "swift-sh",
platforms: [
.macOS(.v10_12)
],
products: [
.executable(name: "swift-sh", targets: ["swift-sh"]),
.library(name: "Script", targets: ["Script"]),
.library(name: "Utility", targets: ["Utility"]),
.library(name: "Command", targets: ["Command"]),
],
dependencies: [
.package(url: "https://github.com/mxcl/Path.swift", from: "1.0.1"),
.package(url: "https://github.com/mxcl/StreamReader", from: "1.0.0"),
.package(url: "https://github.com/mxcl/LegibleError", from: "1.0.0"),
.package(url: "https://github.com/mxcl/Version", from: "2.0.0"),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift", "1.3.0"..<"1.4.0"),
],
targets: [
.target(
name: "swift-sh",
dependencies: ["Command", "LegibleError"],
path: "Sources",
exclude: ["Script", "Utility", "Command", "swift-sh-edit"],
sources: ["main.swift"]),
.target(
name: "Script",
dependencies: ["Utility", "StreamReader"]),
.target(
name: "Utility",
dependencies: [
.product(name: "Path", package: "Path.swift"),
"Version",
"CryptoSwift"
]),
.target(
name: "Command",
dependencies: ["Script"]),
.testTarget(
name: "All",
dependencies: ["swift-sh"]),
]
)
#if os(macOS)
package.products.append(.executable(name: "swift-sh-edit", targets: ["swift-sh-edit"]))
package.targets.append(.target(name: "swift-sh-edit", dependencies: ["XcodeProj", "Utility"]))
package.dependencies.append(.package(url: "https://github.com/tuist/xcodeproj", from: "7.0.0"))
#endif