Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit 53afbd6 Oct 5, 2021 History
7 contributors

Users who have contributed to this file

@kzaher @gormster @freak4pc @rhx @devxoul @thedavidharris @sharplet
// swift-tools-version:5.1
import PackageDescription
let buildTests = false
extension Product {
static func allTests() -> [Product] {
if buildTests {
return [.executable(name: "AllTestz", targets: ["AllTestz"])]
} else {
return []
}
}
}
extension Target {
static func rxCocoa() -> [Target] {
#if os(Linux)
return [.target(name: "RxCocoa", dependencies: ["RxSwift", "RxRelay"])]
#else
return [.target(name: "RxCocoa", dependencies: ["RxSwift", "RxRelay", "RxCocoaRuntime"])]
#endif
}
static func rxCocoaRuntime() -> [Target] {
#if os(Linux)
return []
#else
return [.target(name: "RxCocoaRuntime", dependencies: ["RxSwift"])]
#endif
}
static func allTests() -> [Target] {
if buildTests {
return [.target(name: "AllTestz", dependencies: ["RxSwift", "RxCocoa", "RxBlocking", "RxTest"])]
} else {
return []
}
}
}
let package = Package(
name: "RxSwift",
platforms: [.iOS(.v9), .macOS(.v10_10), .watchOS(.v3), .tvOS(.v9)],
products: ([
[
.library(name: "RxSwift", targets: ["RxSwift"]),
.library(name: "RxCocoa", targets: ["RxCocoa"]),
.library(name: "RxRelay", targets: ["RxRelay"]),
.library(name: "RxBlocking", targets: ["RxBlocking"]),
.library(name: "RxTest", targets: ["RxTest"]),
.library(name: "RxSwift-Dynamic", type: .dynamic, targets: ["RxSwift"]),
.library(name: "RxCocoa-Dynamic", type: .dynamic, targets: ["RxCocoa"]),
.library(name: "RxRelay-Dynamic", type: .dynamic, targets: ["RxRelay"]),
.library(name: "RxBlocking-Dynamic", type: .dynamic, targets: ["RxBlocking"]),
.library(name: "RxTest-Dynamic", type: .dynamic, targets: ["RxTest"]),
],
Product.allTests()
] as [[Product]]).flatMap { $0 },
targets: ([
[
.target(name: "RxSwift", dependencies: []),
],
Target.rxCocoa(),
Target.rxCocoaRuntime(),
[
.target(name: "RxRelay", dependencies: ["RxSwift"]),
.target(name: "RxBlocking", dependencies: ["RxSwift"]),
.target(name: "RxTest", dependencies: ["RxSwift"]),
],
Target.allTests()
] as [[Target]]).flatMap { $0 },
swiftLanguageVersions: [.v5]
)