From 2e88331b4095970bbc253dc170f1eeed6d09f62d Mon Sep 17 00:00:00 2001 From: ShihabMehboob Date: Mon, 30 Oct 2017 18:48:30 +0000 Subject: [PATCH] Issue swift4 (#30) * Updated for Swift 4 * Updated for Swift4 --- .gitignore | 74 +++----------------------------------------------- .swift-version | 2 +- .travis.yml | 8 ------ Package.pins | 5 ---- Package.swift | 22 +++++++++++++-- README.md | 2 +- 6 files changed, 26 insertions(+), 87 deletions(-) delete mode 100644 Package.pins diff --git a/.gitignore b/.gitignore index 27aeb8d..b877b71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,70 +1,4 @@ -.DS_Store - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore -Kitura-CredentialsGitHub.xcodeproj/ - -## Build generated -.build/ -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xcuserstate - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -.build/ -Packages/ -Package.resolved - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output +*.xcodeproj/ +.build +build +Package.resolved \ No newline at end of file diff --git a/.swift-version b/.swift-version index 94ff29c..389f774 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1.1 +4.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 8680eb9..efc0b6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,17 +13,9 @@ matrix: - os: linux dist: trusty sudo: required - - os: linux - dist: trusty - sudo: required - env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT - - os: osx - osx_image: xcode8.3 - sudo: required - os: osx osx_image: xcode9 sudo: required - env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT before_install: - git clone https://github.com/IBM-Swift/Package-Builder.git diff --git a/Package.pins b/Package.pins deleted file mode 100644 index e0570d6..0000000 --- a/Package.pins +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autoPin": false, - "pins": [], - "version": 1 -} diff --git a/Package.swift b/Package.swift index 42bf498..d72d432 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,8 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + /** - * Copyright IBM Corporation 2016 + * Copyright IBM Corporation 2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +21,22 @@ import PackageDescription let package = Package( name: "Kitura-CredentialsGitHub", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "CredentialsGitHub", + targets: ["CredentialsGitHub"] + ) + ], dependencies: [ - .Package(url: "https://github.com/IBM-Swift/Kitura-Credentials.git", majorVersion: 1, minor: 7), + .package(url: "https://github.com/IBM-Swift/Kitura-Credentials.git", .upToNextMinor(from: "2.0.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: "CredentialsGitHub", + dependencies: ["Credentials"] + ) ] ) diff --git a/README.md b/README.md index 174a41b..6350799 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Plugin for [Kitura-Credentials](https://github.com/IBM-Swift/Kitura-Credentials) * [License](#license) ## Swift version -The latest version of Kitura-CredentialsGitHub requires **Swift 3**. You can download this version of the Swift binaries by following this [link](https://swift.org/download/). Compatibility with other Swift versions is not guaranteed. +The latest version of Kitura-CredentialsGitHub requires **Swift 4**. You can download this version of the Swift binaries by following this [link](https://swift.org/download/). Compatibility with other Swift versions is not guaranteed. ## Example of GitHub web login This guide assumes basic knowledge of `Kitura` app routing.