-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
97 lines (91 loc) · 2.97 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// swift-tools-version:5.3
import PackageDescription
let rocketIfNeeded: [Package.Dependency]
#if os(OSX) || os(Linux)
rocketIfNeeded = [
.package(url: "https://github.com/shibapm/Rocket", .upToNextMajor(from: "1.2.0")) // dev
]
#else
rocketIfNeeded = []
#endif
let package = Package(
name: "Moya",
platforms: [
.macOS(.v10_12),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3)
],
products: [
.library(name: "Moya", targets: ["Moya"]),
.library(name: "CombineMoya", targets: ["CombineMoya"]),
// .library(name: "ReactiveMoya", targets: ["ReactiveMoya"]),
// .library(name: "RxMoya", targets: ["RxMoya"])
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.0.0")),
// .package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", .upToNextMajor(from: "6.0.0")),
// .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")),
.package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "4.0.0")), // dev
.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "9.0.0")), // dev
.package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0")) // dev
] + rocketIfNeeded,
targets: [
.target(
name: "Moya",
dependencies: [
.product(name: "Alamofire", package: "Alamofire")
],
exclude: [
"Supporting Files/Info.plist"
]
),
.target(
name: "CombineMoya",
dependencies: [
"Moya"
]
),
// .target(
// name: "ReactiveMoya",
// dependencies: [
// "Moya",
// .product(name: "ReactiveSwift", package: "ReactiveSwift")
// ]
// ),
// .target(
// name: "RxMoya",
// dependencies: [
// "Moya",
// .product(name: "RxSwift", package: "RxSwift")
// ]
// ),
.testTarget( // dev
name: "MoyaTests", // dev
dependencies: [ // dev
"Moya", // dev
"CombineMoya", // dev
// "ReactiveMoya", // dev
// "RxMoya", // dev
.product(name: "Quick", package: "Quick"), // dev
.product(name: "Nimble", package: "Nimble"), // dev
.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs") // dev
] // dev
) // dev
]
)
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration([
"rocket": [
"before": [
"scripts/update_changelog.sh",
"scripts/update_podspec.sh"
],
"after": [
"rake create_release\\[\"$VERSION\"\\]",
"scripts/update_docs_website.sh"
]
]
]).write()
#endif