Skip to content

Commit

Permalink
Update to full Swift 4.2 mode (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
djones6 committed Sep 28, 2018
1 parent 95733de commit b934464
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
4.1.2
4.2
17 changes: 8 additions & 9 deletions .travis.yml
Expand Up @@ -25,40 +25,39 @@ matrix:
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=4.1.3
- os: linux
dist: trusty
sudo: required
services: docker
env: DOCKER_IMAGE=ubuntu:16.04
- os: linux
dist: trusty
sudo: required
services: docker
env: DOCKER_IMAGE=ubuntu:16.04 KITURA_NIO=1
env: KITURA_NIO=1
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=4.2
services: docker
env: DOCKER_IMAGE=ubuntu:16.04
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=4.2 KITURA_NIO=1
services: docker
env: DOCKER_IMAGE=ubuntu:16.04 KITURA_NIO=1
- os: osx
osx_image: xcode9.2
sudo: required
env: SWIFT_SNAPSHOT=4.0.3
- os: osx
osx_image: xcode9.4
sudo: required
env: JAZZY_ELIGIBLE=true
env: SWIFT_SNAPSHOT=4.1.2 JAZZY_ELIGIBLE=true
- os: osx
osx_image: xcode10
sudo: required
env: SWIFT_SNAPSHOT=4.2
- os: osx
osx_image: xcode10
sudo: required
env: SWIFT_SNAPSHOT=4.2 KITURA_NIO=1
env: KITURA_NIO=1

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install libressl ; fi
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:4.0
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

/**
Expand Down
58 changes: 58 additions & 0 deletions Package@swift-4.0.swift
@@ -0,0 +1,58 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

/**
* Copyright IBM Corporation 2016, 2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

import PackageDescription
import Foundation

var kituraNetPackage: Package.Dependency

if ProcessInfo.processInfo.environment["KITURA_NIO"] != nil {
kituraNetPackage = .package(url: "https://github.com/IBM-Swift/Kitura-NIO.git", from: "1.0.0")
} else {
kituraNetPackage = .package(url: "https://github.com/IBM-Swift/Kitura-net.git", from: "2.1.0")
}

let package = Package(
name: "Kitura",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Kitura",
targets: ["Kitura"]
)
],
dependencies: [
kituraNetPackage,
.package(url: "https://github.com/IBM-Swift/Kitura-TemplateEngine.git", from: "2.0.0"),
.package(url: "https://github.com/IBM-Swift/KituraContracts.git", from: "1.0.0"),
.package(url: "https://github.com/IBM-Swift/TypeDecoder.git", from: "1.1.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Kitura",
dependencies: ["KituraNet", "KituraTemplateEngine", "KituraContracts", "TypeDecoder"]
),
.testTarget(
name: "KituraTests",
dependencies: ["Kitura", "KituraContracts", "TypeDecoder"]
)
]
)
58 changes: 58 additions & 0 deletions Package@swift-4.1.swift
@@ -0,0 +1,58 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

/**
* Copyright IBM Corporation 2016, 2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

import PackageDescription
import Foundation

var kituraNetPackage: Package.Dependency

if ProcessInfo.processInfo.environment["KITURA_NIO"] != nil {
kituraNetPackage = .package(url: "https://github.com/IBM-Swift/Kitura-NIO.git", from: "1.0.0")
} else {
kituraNetPackage = .package(url: "https://github.com/IBM-Swift/Kitura-net.git", from: "2.1.0")
}

let package = Package(
name: "Kitura",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Kitura",
targets: ["Kitura"]
)
],
dependencies: [
kituraNetPackage,
.package(url: "https://github.com/IBM-Swift/Kitura-TemplateEngine.git", from: "2.0.0"),
.package(url: "https://github.com/IBM-Swift/KituraContracts.git", from: "1.0.0"),
.package(url: "https://github.com/IBM-Swift/TypeDecoder.git", from: "1.1.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Kitura",
dependencies: ["KituraNet", "KituraTemplateEngine", "KituraContracts", "TypeDecoder"]
),
.testTarget(
name: "KituraTests",
dependencies: ["Kitura", "KituraContracts", "TypeDecoder"]
)
]
)

0 comments on commit b934464

Please sign in to comment.