Skip to content

Commit b262ddd

Browse files
M0rtyMerrfreak4pc
authored andcommitted
Add Swift Package Manager support (#230)
1 parent c8cce63 commit b262ddd

File tree

9 files changed

+37
-0
lines changed

9 files changed

+37
-0
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- run:
3434
name: Test tvOS
3535
command: set -o pipefail && xcodebuild test -scheme RxSwiftExt-tvOS -workspace RxSwiftExt.xcworkspace -sdk appletvsimulator -destination "name=Apple TV 4K (at 1080p)" | xcpretty -c -r html --output $XCODE_TEST_REPORTS/tvOS.html
36+
- run:
37+
name: Test SPM
38+
command: swift test
3639
- store_artifacts:
3740
path: /tmp/xcode-test-results
3841
"RxSwiftExt Release":

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ Carthage
4141
Pods/
4242
Podfile.lock
4343
Demo/RxSwiftExtDemo/RxSwiftExtPlayground.playground/Pages/not.xcplaygroundpage/timeline.xctimeline
44+
Package.resolved

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Changelog
77
- `once` now uses a `NSRecursiveLock` instead of the deprecated `OSAtomicOr32OrigBarrier`
88
- added `merge(with:)` for `Observable`
99
- removed `flatMapSync` operator
10+
- added SPM support
1011

1112
5.0.0
1213
-----

Package.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// swift-tools-version:5.0
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "RxSwiftExt",
7+
platforms: [
8+
.iOS(.v8), .tvOS(.v9), .macOS(.v10_11)
9+
],
10+
products: [
11+
.library(name: "RxSwiftExt", targets: ["RxSwiftExt"]),
12+
],
13+
dependencies: [
14+
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")),
15+
],
16+
targets: [
17+
.target(name: "RxSwiftExt", dependencies: ["RxSwift", "RxCocoa"], path: "Source"),
18+
.testTarget(name: "RxSwiftExtTests", dependencies: ["RxSwiftExt", "RxTest"], path: "Tests"),
19+
],
20+
swiftLanguageVersions: [.v4_2, .v5]
21+
)

RxSwiftExt.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
780CB21C20A0EE8300FD3F39 /* MapManyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapManyTests.swift; sourceTree = "<group>"; };
360360
78199612228449CA00340AF4 /* UIScrollView+reachedBottom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+reachedBottom.swift"; sourceTree = "<group>"; };
361361
7819961422844E9D00340AF4 /* UIScrollView+reachedBottomTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+reachedBottomTests.swift"; sourceTree = "<group>"; };
362+
781C53FD23122554005CB85A /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
362363
782485922298A702005CF8CC /* mergeWith.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mergeWith.swift; sourceTree = "<group>"; };
363364
782485942298A785005CF8CC /* MergeWithTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MergeWithTests.swift; sourceTree = "<group>"; };
364365
782485B6229952FD005CF8CC /* TestErrors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestErrors.swift; path = Tests/TestErrors.swift; sourceTree = "<group>"; };
@@ -467,6 +468,7 @@
467468
18EE7A0F1C47B12F00C7256C = {
468469
isa = PBXGroup;
469470
children = (
471+
781C53FD23122554005CB85A /* Package.swift */,
470472
188C6D921C47B2B20092101A /* Sources */,
471473
3D638DF21DC2B2EE0089A590 /* Tests */,
472474
9DAB77991D6763AC007E85BC /* Frameworks */,

RxSwiftExt.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/RxCocoa/UIScrollView+reachedBottom.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2019 RxSwift Community. All rights reserved.
77
//
88

9+
#if canImport(UIKit)
910
import UIKit
1011
import RxSwift
1112
import RxCocoa
@@ -29,3 +30,4 @@ public extension Reactive where Base: UIScrollView {
2930
return ControlEvent(events: source)
3031
}
3132
}
33+
#endif

Tests/RxCocoa/UIScrollView+reachedBottomTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2019 RxSwift Community. All rights reserved.
77
//
88

9+
#if canImport(UIKit)
910
import XCTest
1011
import RxCocoa
1112
import RxSwift
@@ -85,3 +86,4 @@ private extension UIScrollViewReachedBottomTests {
8586
}
8687
}
8788
}
89+
#endif

Tests/RxCocoa/UIViewPropertyAnimatorTests+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2017 RxSwift Community. All rights reserved.
77
//
88

9+
#if canImport(UIKit)
910
import XCTest
1011
import RxSwift
1112
import RxCocoa
@@ -59,3 +60,4 @@ class UIViewPropertyAnimatorTests: XCTestCase {
5960
XCTAssertEqual(animator.fractionComplete, 0.5)
6061
}
6162
}
63+
#endif

0 commit comments

Comments
 (0)