This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathPackage.swift
65 lines (55 loc) · 1.81 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
58
59
60
61
62
63
64
65
// swift-tools-version:5.1
import Foundation
import PackageDescription
let package = Package(
name: "Harvest",
platforms: [
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)
],
products: [
.library(
name: "Harvest",
targets: ["Harvest"]),
.library(
name: "HarvestStore",
targets: ["HarvestStore"]),
.library(
name: "HarvestOptics",
targets: ["HarvestOptics"]),
],
dependencies: [
.package(url: "https://github.com/inamiy/FunOptics", from: "1.0.2"),
],
targets: [
.target(
name: "Harvest",
dependencies: []),
.target(
name: "HarvestStore",
dependencies: ["Harvest"]),
.target(
name: "HarvestOptics",
dependencies: ["Harvest", "FunOptics"]),
]
)
// `$ HARVEST_SPM_TEST=1 swift package generate-xcodeproj`
//
// NOTE:
// `$ HARVEST_SPM_TEST=1 swift test` won't work since using Combine,
// so instead comment-out this if-condition check to enable Xcode-testing.
if ProcessInfo.processInfo.environment.keys.contains("HARVEST_SPM_TEST") {
package.targets.append(
.testTarget(
name: "HarvestTests",
dependencies: ["Harvest", "Quick", "Nimble", "Thresher"])
)
package.dependencies.append(
contentsOf: [
.package(url: "https://github.com/Quick/Quick.git", from: "2.1.0"),
// NOTE: Avoid using Nimble 8.0.3 or above which `CwlPreconditionTesting` dependency doesn't work.
// https://github.com/Quick/Nimble/issues/696
.package(url: "https://github.com/Quick/Nimble.git", "8.0.0" ... "8.0.2"),
.package(url: "https://github.com/mluisbrown/Thresher.git", .branch("master"))
]
)
}