diff --git a/.travis.yml b/.travis.yml index 5c66c8d..35b5cc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Package.resolved b/Package.resolved index 0f8aecf..3028ee7 100644 --- a/Package.resolved +++ b/Package.resolved @@ -7,7 +7,7 @@ "state": { "branch": null, "revision": "9e5bc43281cae89ab0b6e47df3ea25a2c44af7f0", - "version": "6.5.0" + "version": "6.8.3" } } ] diff --git a/Package@swift-5.0.swift b/Package@swift-5.0.swift new file mode 100644 index 0000000..9800d38 --- /dev/null +++ b/Package@swift-5.0.swift @@ -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) +]