-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
52 lines (47 loc) · 1.2 KB
/
Package.swift
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
// swift-tools-version: 6.0
import PackageDescription
import CompilerPluginSupport
let package = Package(
name: "swift-once-macro",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.visionOS(.v1),
],
products: [
.library(name: "Once", targets: ["Once"]),
],
targets: [
.target(name: "Once", dependencies: ["OnceMacro"]),
.macro(
name: "OnceMacro",
dependencies: [
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
]
),
.testTarget(
name: "OnceMacroTests",
dependencies: [
"Once",
"OnceMacro",
.product(name: "MacroTesting", package: "swift-macro-testing"),
]
),
]
)
package.dependencies += [
.package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.6.0"),
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"),
]
for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings? += [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault"),
]
}