Skip to content

Commit

Permalink
Update for Swift 4.2 (lyft#148)
Browse files Browse the repository at this point in the history
* Update for Swift 4.2

There aren't any required syntax changes here, but I have updated the
Package.swift for breaking SwiftPM changes. Without this change you
cannot compile Mapper in Swift 4.2 mode if you depend on it with SwiftPM

* Build for iOS and tvOS 12
  • Loading branch information
keith authored Sep 12, 2018
1 parent 8b49f0d commit ddaf312
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:
env: ACTION=swiftpm-macOS

language: objective-c
osx_image: xcode9.3
osx_image: xcode10

script:
- make install-$ACTION && make test-$ACTION
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test-iOS:
-project Mapper.xcodeproj \
-scheme Mapper \
-configuration Release \
-destination "name=iPhone 7,OS=10.1" \
-destination "name=iPhone X,OS=12.0" \
test \
| xcpretty -ct

Expand All @@ -43,7 +43,7 @@ test-tvOS:
-project Mapper.xcodeproj \
-scheme Mapper \
-configuration Release \
-destination "platform=tvOS Simulator,name=Apple TV,OS=11.0" \
-destination "platform=tvOS Simulator,name=Apple TV,OS=12.0" \
test \
| xcpretty -ct

Expand Down
13 changes: 12 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// swift-tools-version:4.2
import PackageDescription

let package = Package(name: "Mapper")
let package = Package(
name: "Mapper",
products: [
.library(name: "Mapper", targets: ["Mapper"]),
],
targets: [
.target(name: "Mapper", path: "Sources"),
.testTarget(name: "MapperTests", dependencies: ["Mapper"]),
],
swiftLanguageVersions: [.v4, .v4_2]
)

0 comments on commit ddaf312

Please sign in to comment.