-
Notifications
You must be signed in to change notification settings - Fork 31
/
Package.swift
90 lines (85 loc) · 3.17 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import Foundation
let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-strict-concurrency=complete"]),
]
let package = Package(
name: "Scipio",
platforms: [
.macOS(.v13),
],
products: [
.executable(name: "scipio",
targets: ["scipio"]),
.library(
name: "ScipioKit",
targets: ["ScipioKit"]),
],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-package-manager.git",
branch: "release/6.0"),
.package(url: "https://github.com/apple/swift-log.git",
from: "1.5.2"),
.package(url: "https://github.com/apple/swift-collections",
from: "1.0.4"),
.package(url: "https://github.com/apple/swift-argument-parser.git",
from: "1.1.0"),
.package(url: "https://github.com/apple/swift-algorithms.git",
from: "1.0.0"),
.package(url: "https://github.com/onevcat/Rainbow",
.upToNextMinor(from: "4.0.1")),
.package(url: "https://github.com/giginet/scipio-cache-storage.git",
from: "1.0.0"),
],
targets: [
.executableTarget(
name: "scipio",
dependencies: [
.target(name: "ScipioKit"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
swiftSettings: swiftSettings
),
.target(
name: "ScipioKit",
dependencies: [
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
.product(name: "XCBuildSupport", package: "swift-package-manager"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Collections", package: "swift-collections"),
.product(name: "Algorithms", package: "swift-algorithms"),
.product(name: "Rainbow", package: "Rainbow"),
.product(name: "ScipioStorage", package: "scipio-cache-storage"),
],
swiftSettings: swiftSettings,
plugins: [
.plugin(name: "GenerateScipioVersion")
]
),
.plugin(
name: "GenerateScipioVersion",
capability: .buildTool()
),
.testTarget(
name: "ScipioKitTests",
dependencies: [
.target(name: "ScipioKit"),
],
exclude: ["Resources/Fixtures/"],
resources: [.copy("Resources/Fixtures")],
swiftSettings: swiftSettings
),
],
swiftLanguageModes: [.v6]
)
let isDevelopment = ProcessInfo.processInfo.environment["SCIPIO_DEVELOPMENT"] == "1"
// swift-docs is not needed for package users
if isDevelopment {
package.dependencies += [
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen.git", from: "0.0.6"),
]
}