Last active
March 5, 2020 08:56
-
-
Save haifengkao/938d461b208677f49c7e500a49503a73 to your computer and use it in GitHub Desktop.
Cocoapods to swift package manager example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-tools-version:5.2 | |
// The swift-tools-version declares the minimum version of Swift required to build this package. | |
import PackageDescription | |
let package = Package( | |
name: "MyProject", | |
products: [ | |
// Products define the executables and libraries produced by a package, and make them visible to other packages. | |
.library( | |
name: "MyProject", | |
targets: ["MyProject"]), | |
], | |
dependencies: [ | |
// Dependencies declare other packages that this package depends on. | |
.package(url: "https://github.com/Quick/Quick.git", from: "1.3.2"), | |
.package(url: "https://github.com/Quick/Nimble.git", from: "7.3.2") | |
], | |
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: "MyProject", | |
dependencies: [], | |
path: "MyProject/Classes"), | |
.testTarget( | |
name: "MyProjectTests", | |
dependencies: [ | |
"MyProject", | |
"Quick", | |
"Nimble" | |
], | |
path: "Example/Tests"), | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment