diff --git a/.travis.yml b/.travis.yml index efaba0a1..53d24f72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,17 @@ matrix: - bash <(curl -s https://codecov.io/bash) - os: osx language: objective-c - osx_image: xcode9.3 + osx_image: xcode9.4 + script: + - set -o pipefail + - xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk iphonesimulator -destination "name=iPhone 6s" ENABLE_TESTABILITY=YES | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk appletvsimulator -destination "name=Apple TV" ENABLE_TESTABILITY=YES | xcpretty -c + after_success: + - bash <(curl -s https://codecov.io/bash) + - os: osx + language: objective-c + osx_image: xcode10 script: - set -o pipefail - xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c @@ -32,7 +42,13 @@ matrix: - swift test - os: osx language: generic - osx_image: xcode9.3 + osx_image: xcode9.4 + script: + - swift build + - swift test + - os: osx + language: generic + osx_image: xcode10 script: - swift build - swift test diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 00000000..9021d1eb --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,24 @@ +// swift-tools-version:4.2 +import PackageDescription + +let package = Package( + name: "APIKit", + products: [ + .library(name: "APIKit", targets: ["APIKit"]), + ], + dependencies: [ + .package(url: "https://github.com/antitypical/Result.git", from: "4.0.0"), + ], + targets: [ + .target( + name: "APIKit", + dependencies: ["Result"], + exclude: ["BodyParameters/AbstractInputStream.m"] + ), + .testTarget( + name: "APIKitTests", + dependencies: ["APIKit"] + ), + ], + swiftLanguageVersions: [.v4, .v4_2] +) diff --git a/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift b/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift index 5282df3e..0b1e2d2d 100644 --- a/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift +++ b/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift @@ -317,12 +317,18 @@ public extension MultipartFormDataBodyParameters { set { } } - override func schedule(in aRunLoop: RunLoop, forMode mode: RunLoopMode) { + override func schedule(in aRunLoop: RunLoop, forMode mode: RunLoop.Mode) { } - override func remove(from aRunLoop: RunLoop, forMode mode: RunLoopMode) { + override func remove(from aRunLoop: RunLoop, forMode mode: RunLoop.Mode) { } } } + +#if !swift(>=4.2) +extension RunLoop { + internal typealias Mode = RunLoopMode +} +#endif