-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
57 lines (51 loc) · 1.54 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
53
54
55
56
57
// swift-tools-version:4.0
import PackageDescription
typealias PDependency = Package.Dependency
typealias TDependency = Target.Dependency
extension Package {
convenience init(
name: String,
dependencies: [Package.Dependency],
targets: [Target])
{
self.init(
name: name,
products: [
.library(
name: name,
targets: [
name
]
)
],
dependencies: dependencies,
targets: targets
)
}
}
// Will stick with Alamofire as it is the best for Networking tools
// easier than making my own to do the same purpose
let dependencies: [PDependency] = [
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.0")),
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.5.1")),
.package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", .upToNextMinor(from: "17.0.0"))
]
let targetDependencies: [TDependency] = [
.byNameItem(name: "HeliumLogger"),
.byNameItem(name: "Alamofire"),
.byNameItem(name: "SwiftyJSON")
]
let package = Package(
name: "SwiftyCouchDB",
dependencies: dependencies,
targets: [
.target(
name: "SwiftyCouchDB",
dependencies: targetDependencies,
path: "./Sources"),
.testTarget(
name: "SwiftyCouchDBTests",
dependencies: ["SwiftyCouchDB"],
path: "./Tests")
]
)