Skip to content

Commit

Permalink
Install rocket only on OSX and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
f-meloni committed Jun 24, 2020
1 parent bf53a98 commit 6437123
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

import PackageDescription

let rocketIfNeeded: [Package.Dependency]

#if os(OSX) || os(Linux)
rocketIfNeeded = [
.package(url: "https://github.com/shibapm/Rocket", .upToNextMajor(from: "1.0.0")) // dev
]
#else
rocketIfNeeded = []
#endif

let package = Package(
name: "Moya",
platforms: [
Expand All @@ -23,8 +33,7 @@ let package = Package(
.package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "2.0.0")), // dev
.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "8.0.0")), // dev
.package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0")), // dev
.package(url: "https://github.com/shibapm/Rocket", .upToNextMajor(from: "1.0.0")) // dev
],
] + rocketIfNeeded,
targets: [
.target(name: "Moya", dependencies: ["Alamofire"]),
.target(name: "CombineMoya", dependencies: ["Moya"]),
Expand Down

0 comments on commit 6437123

Please sign in to comment.