-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathPackage@swift-5.10.swift
More file actions
124 lines (118 loc) · 4.37 KB
/
Copy pathPackage@swift-5.10.swift
File metadata and controls
124 lines (118 loc) · 4.37 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import Foundation
import PackageDescription
let strictConcurrencyEnabled = true
extension Array<SwiftSetting> {
static var common: Self {
[
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ForwardTrailingClosures"),
]
}
static var libraryTarget: Self {
if strictConcurrencyEnabled {
return common + [
.enableExperimentalFeature("StrictConcurrency=complete"),
.enableExperimentalFeature("IsolatedAny"),
.enableUpcomingFeature("InferSendableFromCaptures"),
.enableUpcomingFeature("IsolatedDefaultValues"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableUpcomingFeature("GlobalConcurrency"),
.enableUpcomingFeature("RegionBasedIsolation"),
]
} else {
return common
}
}
static var testTarget: Self {
common
}
}
var package = Package(
name: "OktaClient",
defaultLocalization: "en",
platforms: [
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v7),
.visionOS(.v1),
.macOS(.v10_15),
.macCatalyst(.v13)
],
products: [
.library(name: "AuthFoundation", targets: ["AuthFoundation"]),
.library(name: "OAuth2Auth", targets: ["OAuth2Auth"]),
.library(name: "OktaDirectAuth", targets: ["OktaDirectAuth"]),
.library(name: "OktaIdxAuth", targets: ["OktaIdxAuth"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.0")
],
targets: [
.target(name: "AuthFoundation",
dependencies: [],
resources: [.process("Resources")],
swiftSettings: .libraryTarget),
.target(name: "OAuth2Auth",
dependencies: [
.target(name: "AuthFoundation")
],
resources: [.process("Resources")],
swiftSettings: .libraryTarget),
.target(name: "OktaDirectAuth",
dependencies: [
.target(name: "AuthFoundation")
],
resources: [.process("Resources")],
swiftSettings: .libraryTarget),
.target(name: "OktaIdxAuth",
dependencies: [
.target(name: "AuthFoundation")
],
resources: [.process("Resources")],
swiftSettings: .libraryTarget),
] + [
.target(name: "TestCommon",
dependencies: ["AuthFoundation"],
path: "Tests/TestCommon",
swiftSettings: .testTarget),
.testTarget(name: "AuthFoundationTests",
dependencies: ["AuthFoundation", "TestCommon"],
resources: [
.copy("MockResponses"),
.copy("ConfigResources"),
],
swiftSettings: .testTarget),
.testTarget(name: "OAuth2AuthTests",
dependencies: ["OAuth2Auth", "TestCommon"],
resources: [ .copy("MockResponses") ],
swiftSettings: .testTarget),
.testTarget(name: "OktaDirectAuthTests",
dependencies: ["OktaDirectAuth", "TestCommon"],
resources: [ .copy("MockResponses") ],
swiftSettings: .testTarget),
.testTarget(name: "OktaIdxAuthTests",
dependencies: ["OktaIdxAuth", "TestCommon"],
resources: [.copy("MockResponses")],
swiftSettings: .testTarget),
],
swiftLanguageVersions: [.v5]
)
#if canImport(UIKit) || canImport(AppKit)
package.targets.append(contentsOf: [
.target(name: "BrowserSignin",
dependencies: [
.target(name: "OAuth2Auth")
],
resources: [.process("Resources")],
swiftSettings: .libraryTarget),
.testTarget(name: "BrowserSigninTests",
dependencies: ["BrowserSignin", "TestCommon"],
resources: [ .copy("MockResponses") ],
swiftSettings: .testTarget)
])
package.products.append(
.library(name: "BrowserSignin", targets: ["BrowserSignin"])
)
#endif