我正在尝试使用swift build
包.swift
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:x.x
import PackageDescription
let package = Package(
name: "MyKituraApp",
dependencies: [
.package(url: "https://github.com/IBM-Swift/Kitura", from: "2.7.0")
],
targets: [
.target(
name: "MyKituraApp",
dependencies: ["Kitura"],
path: "Sources"),
.testTarget(
name: "MyKituraAppTests",
dependencies: ["MyKituraApp"],
path: "Test")
]
)
但是,尽管我确实添加了 path 属性,但出现以下错误。
“MyKituraApp”/src:错误:找不到目标的源文件:MyKituraAppTests;使用 Swift 4 清单中的“路径”属性设置自定义目标路径