Skip to content

Commit

Permalink
Merge pull request #11 from akkyie/swiftpm
Browse files Browse the repository at this point in the history
Add SwiftPM Support
  • Loading branch information
marty-suzuki authored Oct 1, 2019
2 parents 1c32e51 + ebcaad1 commit c093a0e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ playground.xcworkspace
# Package.pins
# Package.resolved
.build/
.swiftpm/

# CocoaPods
#
Expand Down
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
language: objective-c
os: osx
osx_image: xcode11
env:
- CI_USE_SWIFTPM=true
- CI_USE_SWIFTPM=false
before_install:
- gem install xcpretty
- carthage update --no-use-binaries --platform ios
- |
if ! $CI_USE_SWIFTPM ; then
carthage update --no-use-binaries --platform ios
fi
before_script:
- set -o pipefail
script:
- xcodebuild test -project ./Unio.xcodeproj -scheme Unio -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=12.2,name=iPhone 8' | xcpretty -c
script: |
PROJECT_ARG=
if $CI_USE_SWIFTPM ; then
rm -rf *.xcodeproj
else
PROJECT_ARG="-project ./Unio.xcodeproj"
fi
xcodebuild test $PROJECT_ARG -scheme Unio -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=12.2,name=iPhone 8' | xcpretty -c
notifications:
email: false
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "b3e888b4972d9bc76495dd74d30a8c7fad4b9395",
"version": "5.0.1"
}
}
]
},
"version": 1
}
24 changes: 24 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// swift-tools-version:5.1

import PackageDescription

let package = Package(
name: "Unio",
platforms: [.iOS(.v9)],
products: [
.library(name: "Unio",
targets: ["Unio"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0")
],
targets: [
.target(name: "Unio",
dependencies: ["RxSwift", "RxRelay"],
path: "Unio"),
.testTarget(name: "UnioTests",
dependencies: ["Unio", "RxCocoa"],
path: "UnioTests"),
],
swiftLanguageVersions: [.v5]
)

0 comments on commit c093a0e

Please sign in to comment.