Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager compatibility #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "RxWebKit",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: "RxWebKit",
name: "RxWebKit",
platforms: [.iOS(.v8)],

products: [
.library(name: "RxWebKit", targets: ["RxWebKit"])
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift", from: "4.5.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to target 5.0.1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed, thank you!

],
targets: [
.target(name: "RxWebKit", dependencies: ["RxSwift", "RxCocoa"], path: "RxWebKit")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RxWebKit has tests - the Package.swift file should have a test target as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand, tests targets should not be exposed in the SPM manifest file should they?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK Package.swift targets are used for public targets but test targets are only for running “Swift test” etc.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.target(name: "RxWebKit", dependencies: ["RxSwift", "RxCocoa"], path: "RxWebKit")
.target(name: "RxWebKit", dependencies: ["RxSwift", "RxCocoa"], path: "RxWebKit"),
.testTarget(name: "RxWebKitTests", dependencies: ["RxWebKit", "RxSwift", "RxCocoa", "RxTest", "Quick", "Nimble"], path: "RxWebKitTests")

]
)