Skip to content

Commit 7e84877

Browse files
Update Swift Package Manager manifest and Dockerfile to Swift 4.0.
Add note regarding version compatibility to the README.
1 parent a110351 commit 7e84877

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build and test Open Location Code for Swift in Linux.
2-
FROM swift:3.1
2+
FROM swift:4.0
33
RUN mkdir /OpenLocationCode
44
WORKDIR /OpenLocationCode
55
ADD . /OpenLocationCode

Package.swift

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// swift-tools-version:4.0
2+
13
//===-- OpenLocationCodeTests.swift - Tests for OpenLocationCode.swift ----===//
24
//
35
// Copyright 2017 Google Inc.
@@ -20,13 +22,27 @@
2022
//
2123
//===----------------------------------------------------------------------===//
2224

23-
// swift-tools-version:3.1
24-
2525
import PackageDescription
2626

27-
let package = Package(
27+
let packages = Package(
2828
name: "OpenLocationCode",
29-
exclude: ["Framework",
30-
"Tests/OpenLocationCodeObjCTests",
31-
"Source/OpenLocationCodeObjCBridge.swift"]
29+
products: [
30+
.library(
31+
name: "OpenLocationCode",
32+
targets: ["OpenLocationCode"]),
33+
],
34+
targets: [
35+
.target(
36+
name: "OpenLocationCode",
37+
path: ".",
38+
exclude: ["Source/OpenLocationCodeObjCBridge.swift", "Framework", "Tests", "test_data"],
39+
sources: ["Source"]
40+
),
41+
.testTarget(
42+
name: "OpenLocationCodeTests",
43+
dependencies: ["OpenLocationCode"],
44+
path: "Tests",
45+
exclude: ["OpenLocationCodeObjCTests"]
46+
)
47+
]
3248
)

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ This library is provided as a Swift and Objective-C Cocoa Framework
4040
for iOS, macOS, tvOS and watchOS, and as a pure Swift module
4141
for macOS and Linux.
4242

43+
## Swift Versions
44+
45+
* Versions 1.x of Open Location Code for Swift are designed for Swift 3.2.
46+
* Versions 2.x of Open Location Code for Swift are designed for Swift 4.0.
47+
48+
Choose the latest 1.x release for greater compatability, or the latest 2.x
49+
release if you're fully in the Swift 4 world!
50+
4351
## Building
4452

4553
### Cocoa Framework

0 commit comments

Comments
 (0)