-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathPackage.swift
More file actions
69 lines (67 loc) · 2.17 KB
/
Package.swift
File metadata and controls
69 lines (67 loc) · 2.17 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
// swift-tools-version:6.2.4
import PackageDescription
let extraSettings: [SwiftSetting] = [
.enableExperimentalFeature("SuppressedAssociatedTypes"),
.enableExperimentalFeature("LifetimeDependence"),
.enableUpcomingFeature("LifetimeDependence"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("MemberImportVisibility"),
.enableUpcomingFeature("InternalImportsByDefault"),
// .treatAllWarnings(as: .error),
.strictMemorySafety(),
.enableExperimentalFeature("SafeInteropWrappers"),
.unsafeFlags(["-Xcc", "-fexperimental-bounds-safety-attributes"]),
]
let package = Package(
name: "authentication",
platforms: [
.macOS(.v26),
.macCatalyst(.v26),
.iOS(.v26),
.tvOS(.v26),
.watchOS(.v26),
.visionOS(.v26),
],
products: [
.library(name: "Authentication", targets: ["Authentication"])
],
traits: [
.trait(name: "bcrypt"),
.trait(name: "OTP"),
.trait(name: "PBKDF2"),
.default(enabledTraits: [
"bcrypt",
"OTP",
]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", from: "4.0.0")
],
targets: [
.target(
name: "CVaporAuthBcrypt",
cSettings: [
.define("ENABLE_C_BOUNDS_SAFETY")
],
swiftSettings: extraSettings,
),
.target(
name: "Authentication",
dependencies: [
.target(name: "CVaporAuthBcrypt", condition: .when(traits: ["bcrypt"])),
.product(name: "Crypto", package: "swift-crypto", condition: .when(traits: ["bcrypt", "OTP"])),
.product(name: "CryptoExtras", package: "swift-crypto", condition: .when(traits: ["PBKDF2"])),
],
swiftSettings: extraSettings
),
.testTarget(
name: "AuthenticationTests",
dependencies: [
"Authentication"
],
swiftSettings: extraSettings
),
],
)