-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPackage.swift
More file actions
71 lines (63 loc) · 1.88 KB
/
Package.swift
File metadata and controls
71 lines (63 loc) · 1.88 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
// 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/kishikawakatsumi/KeychainAccess.git", from: "4.2.2"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.12.3"),
]
if skipIsEnabled {
packageDependencies.append(contentsOf: [
.package(url: "https://source.skip.tools/skip-fuse.git", from: "1.0.2"),
.package(url: "https://source.skip.tools/skip-keychain.git", from: "0.3.0"),
])
}
var targetDependencies: [Target.Dependency] = [
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "KeychainAccess", package: "KeychainAccess", condition: applePlatforms),
]
if skipIsEnabled {
targetDependencies.append(contentsOf: [
.product(name: "SkipKeychain", package: "skip-keychain"),
.product(name: "SkipFuse", package: "skip-fuse"),
])
}
let package = Package(
name: "BSWFoundation",
platforms: [
.iOS(.v17),
.tvOS(.v17),
.macOS(.v15),
.macCatalyst(.v17),
.watchOS(.v11),
],
products: [
.library(
name: "BSWFoundation",
targets: ["BSWFoundation"]
),
],
dependencies: packageDependencies,
targets: [
.target(
name: "BSWFoundation",
dependencies: targetDependencies
),
.testTarget(
name: "BSWFoundationTests",
dependencies: ["BSWFoundation"]
),
],
swiftLanguageModes: [.v6],
)