-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPackage.swift
More file actions
84 lines (75 loc) · 2.34 KB
/
Package.swift
File metadata and controls
84 lines (75 loc) · 2.34 KB
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
// swift-tools-version:6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import Foundation
let skipIsEnabled = (ProcessInfo.processInfo.environment["SKIP_ENABLED"] != nil)
let applePlatforms = TargetDependencyCondition.when(
platforms: [
.iOS,
.macOS,
.macCatalyst,
.tvOS,
.watchOS,
.visionOS
]
)
var packageDependencies: [Package.Dependency] = [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.18.7"),
.package(url: "https://github.com/theleftbit/BSWFoundation.git", from: "7.3.2"),
.package(url: "https://github.com/kean/Nuke.git", from: "12.8.0"),
]
if skipIsEnabled {
packageDependencies.append(contentsOf: [
.package(url: "https://source.skip.tools/skip.git", from: "1.8.0"),
.package(url: "https://source.skip.tools/skip-fuse-ui.git", from: "1.14.2"),
])
}
var targetDependencies: [Target.Dependency] = [
.product(name: "Nuke", package: "Nuke", condition: applePlatforms),
.product(name: "NukeExtensions", package: "Nuke", condition: applePlatforms),
.product(name: "NukeUI", package: "Nuke", condition: applePlatforms),
"BSWInterfaceKitObjC",
"BSWFoundation"
]
if skipIsEnabled {
targetDependencies.append(contentsOf: [
.product(name: "SkipFuseUI", package: "skip-fuse-ui"),
])
}
var plugins: [Target.PluginUsage] = [ ]
if skipIsEnabled {
plugins.append(
.plugin(name: "skipstone", package: "skip")
)
}
let package = Package(
name: "BSWInterfaceKit",
platforms: [
.iOS(.v17),
.macOS(.v15),
.watchOS(.v11)
],
products: [
.library(
name: "BSWInterfaceKit",
targets: ["BSWInterfaceKit", "BSWInterfaceKitObjC"]
),
],
dependencies: packageDependencies,
targets: [
.target(name: "BSWInterfaceKitObjC"),
.target(
name: "BSWInterfaceKit",
dependencies: targetDependencies,
plugins: plugins
),
.testTarget(
name: "BSWInterfaceKitTests",
dependencies: [
"BSWInterfaceKit",
.product(name: "SnapshotTesting", package: "swift-snapshot-testing")
],
exclude: ["Suite/__Snapshots__/"]
),
]
)