From 3ffe2794d414d9d2d28a2d1d3ac8fc01167f83a3 Mon Sep 17 00:00:00 2001 From: Akio Yasui Date: Mon, 30 Sep 2019 20:47:59 +0900 Subject: [PATCH 1/2] Add Package.swift --- .gitignore | 1 + Package.resolved | 16 ++++++++++++++++ Package.swift | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 Package.resolved create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index fa42cbd..e28632a 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ playground.xcworkspace # Package.pins # Package.resolved .build/ +.swiftpm/ # CocoaPods # diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..e3afef8 --- /dev/null +++ b/Package.resolved @@ -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 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..e2d83f6 --- /dev/null +++ b/Package.swift @@ -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] +) From ebcaad1546860fc80a2ede09d5865bf7084af8d4 Mon Sep 17 00:00:00 2001 From: Akio Yasui Date: Mon, 30 Sep 2019 21:00:51 +0900 Subject: [PATCH 2/2] Add test with SwiftPM to .travis.yml --- .travis.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41625d4..246d618 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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