From ae89841ca83a5af2c3f77337af4c93bca563040e Mon Sep 17 00:00:00 2001 From: David Rodrigues Date: Sat, 17 Nov 2018 14:06:17 +0000 Subject: [PATCH] Add support for Swift Package Manager (#34) * Add support for Swift Package Manager * Update CI to test Swift Package Manager support --- .circleci/config.yml | 9 +++++++++ .gitignore | 6 ++++++ Package.resolved | 43 +++++++++++++++++++++++++++++++++++++++++++ Package.swift | 18 ++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 Package.resolved create mode 100644 Package.swift diff --git a/.circleci/config.yml b/.circleci/config.yml index 043a9be..52dfa9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,6 +36,14 @@ references: paths: - Carthage + - &swift_package_manager + run: + name: Swift Package Manager validation + command: | + swift --version + swift build + swift test + jobs: build: macos: @@ -74,4 +82,5 @@ jobs: command: | pod lib lint --use-libraries carthage build --no-skip-current --cache-builds + - *swift_package_manager diff --git a/.gitignore b/.gitignore index 2f3bde0..dcb0b14 100644 --- a/.gitignore +++ b/.gitignore @@ -189,3 +189,9 @@ backboneLocalizationBuilder fastlane/README.md fastlane/report.xml vendor/ + + +# SwiftPackageManager # +Packages +.build/ +DerivedData/ diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..f83f93d --- /dev/null +++ b/Package.resolved @@ -0,0 +1,43 @@ +{ + "object": { + "pins": [ + { + "package": "Nimble", + "repositoryURL": "https://github.com/Quick/Nimble.git", + "state": { + "branch": null, + "revision": "cd6dfb86f496fcd96ce0bc6da962cd936bf41903", + "version": "7.3.1" + } + }, + { + "package": "Quick", + "repositoryURL": "https://github.com/Quick/Quick.git", + "state": { + "branch": null, + "revision": "5fbf13871d185526993130c3a1fad0b70bfe37ce", + "version": "1.3.2" + } + }, + { + "package": "ReactiveSwift", + "repositoryURL": "https://github.com/ReactiveCocoa/ReactiveSwift", + "state": { + "branch": null, + "revision": "4f6a12ae6762e825b0e19a4f7076eafa43847e6e", + "version": "4.0.0" + } + }, + { + "package": "Result", + "repositoryURL": "https://github.com/antitypical/Result.git", + "state": { + "branch": null, + "revision": "8fc088dcf72802801efeecba76ea8fb041fb773d", + "version": "4.0.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8ff620f --- /dev/null +++ b/Package.swift @@ -0,0 +1,18 @@ +// swift-tools-version:4.0 +import PackageDescription + +let package = Package( + name: "ReactiveFeedback", + products: [ + .library(name: "ReactiveFeedback", targets: ["ReactiveFeedback"]), + ], + dependencies: [ + .package(url: "https://github.com/ReactiveCocoa/ReactiveSwift", from: "4.0.0"), + .package(url: "https://github.com/Quick/Nimble.git", from: "7.0.0"), + ], + targets: [ + .target(name: "ReactiveFeedback", dependencies: ["ReactiveSwift"], path: "ReactiveFeedback"), + .testTarget(name: "ReactiveFeedbackTests", dependencies: ["ReactiveFeedback", "ReactiveSwift", "Nimble"], path: "ReactiveFeedbackTests"), + ], + swiftLanguageVersions: [4] +)