-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 1.79 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
// swift-tools-version: 5.10
// swiftlint:disable explicit_top_level_acl
// swiftlint:disable prefixed_toplevel_constant
// swiftlint:disable explicit_acl
import CompilerPluginSupport
import PackageDescription
let swiftSettings = [
SwiftSetting.enableUpcomingFeature("BareSlashRegexLiterals"),
SwiftSetting.enableUpcomingFeature("ConciseMagicFile"),
SwiftSetting.enableUpcomingFeature("ExistentialAny"),
SwiftSetting.enableUpcomingFeature("ForwardTrailingClosures"),
SwiftSetting.enableUpcomingFeature("ImplicitOpenExistentials"),
SwiftSetting.enableUpcomingFeature("StrictConcurrency"),
SwiftSetting.enableUpcomingFeature("DisableOutwardActorInference"),
SwiftSetting.enableExperimentalFeature("StrictConcurrency")
]
let package = Package(
name: "Options",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macCatalyst(.v13),
.visionOS(.v1)
],
products: [
.library(
name: "Options",
targets: ["Options"]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax", from: "510.0.0")
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0")
],
targets: [
.target(
name: "Options",
dependencies: ["OptionsMacros"],
swiftSettings: swiftSettings
),
.macro(
name: "OptionsMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
],
swiftSettings: swiftSettings
),
.testTarget(
name: "OptionsTests",
dependencies: ["Options"]
)
]
)
// swiftlint:enable explicit_top_level_acl
// swiftlint:enable prefixed_toplevel_constant
// swiftlint:enable explicit_acl