mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
d413d8cfa1
Move MasKitTests module to masTests. Rename MasKit enum as Mas. Upgrade swift-tools-version from 5.3 to 5.6.1. swift-tools-version 5.5+ is necessary to allow test code to import executable target code, to allow MasKit library code to be moved into the mas executable. Upgrade to swift-tools-version to 5.6.1 instead of to 5.5 because they support all the same macOS versions. Standardize comments. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
63 lines
2.3 KiB
Swift
63 lines
2.3 KiB
Swift
// swift-tools-version:5.6.1
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "mas",
|
|
platforms: [
|
|
.macOS(.v10_11)
|
|
],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
|
.executable(
|
|
name: "mas",
|
|
targets: ["mas"]
|
|
)
|
|
],
|
|
dependencies: [
|
|
// Dependencies declare other packages that this package depends on.
|
|
.package(url: "https://github.com/Carthage/Commandant.git", from: "0.18.0"),
|
|
.package(url: "https://github.com/Quick/Nimble.git", from: "10.0.0"),
|
|
.package(url: "https://github.com/Quick/Quick.git", from: "5.0.0"),
|
|
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.16.2"),
|
|
.package(url: "https://github.com/mxcl/Version.git", from: "2.0.1"),
|
|
.package(url: "https://github.com/sharplet/Regex.git", from: "2.1.1"),
|
|
],
|
|
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 this package depends on.
|
|
.executableTarget(
|
|
name: "mas",
|
|
dependencies: [
|
|
"Commandant",
|
|
"PromiseKit",
|
|
"Regex",
|
|
"Version",
|
|
],
|
|
swiftSettings: [
|
|
.unsafeFlags([
|
|
"-I", "Sources/PrivateFrameworks/CommerceKit",
|
|
"-I", "Sources/PrivateFrameworks/StoreFoundation",
|
|
])
|
|
],
|
|
linkerSettings: [
|
|
.linkedFramework("CommerceKit"),
|
|
.linkedFramework("StoreFoundation"),
|
|
.unsafeFlags(["-F", "/System/Library/PrivateFrameworks"]),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "masTests",
|
|
dependencies: ["mas", "Nimble", "Quick"],
|
|
resources: [.copy("JSON")],
|
|
swiftSettings: [
|
|
.unsafeFlags([
|
|
"-I", "Sources/PrivateFrameworks/CommerceKit",
|
|
"-I", "Sources/PrivateFrameworks/StoreFoundation",
|
|
])
|
|
]
|
|
),
|
|
],
|
|
swiftLanguageVersions: [.v5]
|
|
)
|