Skip to content

Commit

Permalink
Add support for SPM (#83)
Browse files Browse the repository at this point in the history
Add support for SPM
  • Loading branch information
fassko authored Oct 21, 2019
2 parents 478c6ce + 5e13ffa commit acc1a2a
Show file tree
Hide file tree
Showing 22 changed files with 661 additions and 168 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# master

# 4.1.0

- Add suport for Swift Package Manager

# 4.0.0

- Requires RxSwift 5 & Xcode 10.2.
Expand Down
81 changes: 81 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,69 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "7cd2f8cacc4d22f21bc0b2309c3b18acf7957b66",
"version": "1.2.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "c228db5d2ad1b01ebc84435e823e6cca4e3db98b",
"version": "1.2.0"
}
},
{
"package": "Logger",
"repositoryURL": "https://github.com/f-meloni/Logger",
"state": {
"branch": null,
"revision": "53c3ecca5abe8cf46697e33901ee774236d94cce",
"version": "0.2.3"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "6abeb3f5c03beba2b9e4dbe20886e773b5b629b6",
"version": "8.0.4"
}
},
{
"package": "PackageConfig",
"repositoryURL": "https://github.com/shibapm/PackageConfig.git",
"state": {
"branch": null,
"revision": "fd0829aac9851434b3d2db0890e27bc489fc973a",
"version": "0.12.2"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "33682c2f6230c60614861dfc61df267e11a1602f",
"version": "2.2.0"
}
},
{
"package": "Rocket",
"repositoryURL": "https://github.com/shibapm/Rocket",
"state": {
"branch": null,
"revision": "f75c9736733b489a3456b4f3a47cf13adb99f197",
"version": "0.9.2"
}
},
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
Expand All @@ -9,6 +72,24 @@
"revision": "b3e888b4972d9bc76495dd74d30a8c7fad4b9395",
"version": "5.0.1"
}
},
{
"package": "SwiftShell",
"repositoryURL": "https://github.com/kareman/SwiftShell",
"state": {
"branch": null,
"revision": "beebe43c986d89ea5359ac3adcb42dac94e5e08a",
"version": "4.1.2"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams",
"state": {
"branch": null,
"revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f",
"version": "2.0.0"
}
}
]
},
Expand Down
31 changes: 27 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,36 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")),
// Development
.package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "2.1.0")), // dev
.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "8.0.2")), // dev
.package(url: "https://github.com/shibapm/Rocket", .upToNextMajor(from: "0.4.0")) // dev
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(name: "RxOptional", dependencies: ["RxSwift"]),
.testTarget(name: "RxOptionalTests", dependencies: ["RxOptional"]),
]
.target(name: "RxOptional", dependencies: ["RxSwift", "RxCocoa"]),
.testTarget(name: "RxOptionalTests", dependencies: ["RxOptional", "Quick", "Nimble"]) // dev
],
swiftLanguageVersions: [.v4_2, .v5]
)

#if canImport(PackageConfig)
import PackageConfig

let config = PackageConfiguration([
"rocket": [
"before": [
"swift build",
"swift test",
"scripts/bootstrap-if-needed.sh",

],
"after": [
"pod lib lint --allow-warnings",
"pod trunk push --skip-tests --allow-warnings"
]
]
]).write()
#endif
2 changes: 1 addition & 1 deletion RxOptional.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = '3.0'
s.tvos.deployment_target = '9.0'

s.source_files = 'Source/*.swift'
s.source_files = 'Sources/*.swift'

s.dependency 'RxSwift', '~> 5'
s.dependency 'RxCocoa', '~> 5'
Expand Down
Loading

0 comments on commit acc1a2a

Please sign in to comment.