Skip to content

Commit

Permalink
Merge pull request #18 from PromiseKit/swift-5
Browse files Browse the repository at this point in the history
Swift 5 manifest & tests
  • Loading branch information
mxcl authored Feb 1, 2019
2 parents 9e1d760 + 5999228 commit 04b196a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2
name: Linux / Swift 4.2
- <<: *linux
env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.0-DEVELOPMENT-SNAPSHOT-2019-01-22-a
name: Linux / Swift 5.0 (2019-01-22)

- &swiftpm
stage: compile
Expand Down
2 changes: 1 addition & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"state": {
"branch": null,
"revision": "9e5bc43281cae89ab0b6e47df3ea25a2c44af7f0",
"version": "6.5.0"
"version": "6.8.3"
}
}
]
Expand Down
36 changes: 36 additions & 0 deletions Package@swift-5.0.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// swift-tools-version:5.0

import PackageDescription

let pkg = Package(name: "PMKFoundation")
pkg.products = [
.library(name: "PMKFoundation", targets: ["PMKFoundation"]),
]
pkg.dependencies = [
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.8.3")
]
pkg.swiftLanguageVersions = [.v4, .v4_2, .v5]

let target: Target = .target(name: "PMKFoundation")
target.path = "Sources"
target.exclude = ["NSNotificationCenter", "NSTask", "NSURLSession"].flatMap {
["\($0)+AnyPromise.m", "\($0)+AnyPromise.h"]
}
target.exclude.append("PMKFoundation.h")

target.dependencies = [
"PromiseKit"
]

#if os(Linux)
target.exclude += [
"afterlife.swift",
"NSObject+Promise.swift"
]
#endif

pkg.targets = [target]

pkg.platforms = [
.macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v2)
]

0 comments on commit 04b196a

Please sign in to comment.