From ad433a75235389577eca1125ea9419a6ade8b253 Mon Sep 17 00:00:00 2001 From: Ankit Aggarwal Date: Thu, 26 Oct 2017 12:09:39 -0700 Subject: [PATCH] Update for Swift 4 --- Package.swift | 16 +++++++++++++++- README.md | 3 +-- Sources/{ => PlayingCard}/PlayingCard.swift | 0 Sources/{ => PlayingCard}/Rank.swift | 0 Sources/{ => PlayingCard}/Suit.swift | 0 5 files changed, 16 insertions(+), 3 deletions(-) rename Sources/{ => PlayingCard}/PlayingCard.swift (100%) rename Sources/{ => PlayingCard}/Rank.swift (100%) rename Sources/{ => PlayingCard}/Suit.swift (100%) diff --git a/Package.swift b/Package.swift index c8da1ed..b51182b 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,6 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + /* This source file is part of the Swift.org open source project @@ -11,5 +14,16 @@ import PackageDescription let package = Package( - name: "PlayingCard" + name: "PlayingCard", + products: [ + .library(name: "PlayingCard", targets: ["PlayingCard"]), + ], + targets: [ + .target( + name: "PlayingCard", + dependencies: []), + .testTarget( + name: "PlayingCardTests", + dependencies: ["PlayingCard"]), + ] ) diff --git a/README.md b/README.md index 9a5c3f5..d0d6362 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ This example package will be cloned and built as a dependency if you build the ` git clone https://github.com/apple/example-package-dealer.git cd example-package-dealer - swift build - .build/debug/Dealer + swift run Dealer # License diff --git a/Sources/PlayingCard.swift b/Sources/PlayingCard/PlayingCard.swift similarity index 100% rename from Sources/PlayingCard.swift rename to Sources/PlayingCard/PlayingCard.swift diff --git a/Sources/Rank.swift b/Sources/PlayingCard/Rank.swift similarity index 100% rename from Sources/Rank.swift rename to Sources/PlayingCard/Rank.swift diff --git a/Sources/Suit.swift b/Sources/PlayingCard/Suit.swift similarity index 100% rename from Sources/Suit.swift rename to Sources/PlayingCard/Suit.swift