Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Swift 4.2 #25

Merged
merged 3 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.2
4.2
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ matrix:
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=4.1.3
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=swift-4.2-DEVELOPMENT-SNAPSHOT-2018-06-23-a
- os: linux
dist: trusty
sudo: required
Expand All @@ -32,6 +32,10 @@ matrix:
- os: osx
osx_image: xcode9.4
sudo: required
env: SWIFT_SNAPSHOT=4.1.2
- os: osx
osx_image: xcode10
sudo: required

before_install:
- git clone https://github.com/IBM-Swift/Package-Builder.git
Expand Down
27 changes: 10 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// 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.

//
// Package.swift
// CryptorRSA
//
// Copyright © 2017 IBM. All rights reserved.
// Copyright © 2017,2018 IBM. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -22,19 +22,14 @@

import PackageDescription

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)

let CryptoLibUrl = "https://github.com/IBM-Swift/CommonCrypto.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.0")

#elseif os(Linux)

let CryptoLibUrl = "https://github.com/IBM-Swift/OpenSSL.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.1")
var dependencies: [Package.Dependency] = []
var targetDependencies: [Target.Dependency] = []


#else
#if os(Linux)

fatalError("Unsupported OS")
dependencies.append(.package(url: "https://github.com/IBM-Swift/OpenSSL.git", from: "2.0.0"))
targetDependencies.append(.byName(name: "OpenSSL"))

#endif

Expand All @@ -47,15 +42,13 @@ let package = Package(
targets: ["CryptorRSA"]
)
],
dependencies: [
.package(url: CryptoLibUrl, CryptoLibVersion)
],
dependencies: dependencies,
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: "CryptorRSA",
dependencies: []
dependencies: targetDependencies
),
.testTarget(
name: "CryptorRSATests",
Expand Down
58 changes: 0 additions & 58 deletions [email protected]

This file was deleted.

9 changes: 6 additions & 3 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@

import PackageDescription

var targetDependencies: [Target.Dependency] = []

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)

let CryptoLibUrl = "https://github.com/IBM-Swift/CommonCrypto.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.0")

#elseif os(Linux)

let CryptoLibUrl = "https://github.com/IBM-Swift/OpenSSL.git"
let CryptoLibUrl = "https://github.com/IBM-Swift/OpenSSL.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.1")
targetDependencies.append(.byName(name: "OpenSSL"))

#else

fatalError("Unsupported OS")
fatalError("Unsupported OS")

#endif

Expand All @@ -55,7 +58,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "CryptorRSA",
dependencies: []
dependencies: targetDependencies
),
.testTarget(
name: "CryptorRSATests",
Expand Down
9 changes: 6 additions & 3 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@

import PackageDescription

var targetDependencies: [Target.Dependency] = []

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)

let CryptoLibUrl = "https://github.com/IBM-Swift/CommonCrypto.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.0")

#elseif os(Linux)

let CryptoLibUrl = "https://github.com/IBM-Swift/OpenSSL.git"
let CryptoLibUrl = "https://github.com/IBM-Swift/OpenSSL.git"
let CryptoLibVersion: Package.Dependency.Requirement = .upToNextMajor(from: "1.0.1")
targetDependencies.append(.byName(name: "OpenSSL"))

#else

fatalError("Unsupported OS")
fatalError("Unsupported OS")

#endif

Expand All @@ -55,7 +58,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "CryptorRSA",
dependencies: []
dependencies: targetDependencies
),
.testTarget(
name: "CryptorRSATests",
Expand Down