-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
64 lines (60 loc) · 2.07 KB
/
Copy pathPackage.swift
File metadata and controls
64 lines (60 loc) · 2.07 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
// swift-tools-version: 6.2
import PackageDescription
import CompilerPluginSupport
let package = Package(
name: "swift-visual-testing",
platforms: [
.iOS(.v17),
.macOS(.v14),
.tvOS(.v17),
.watchOS(.v10),
],
products: [
.library(
name: "VisualTesting",
targets: ["VisualTesting"]
),
],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-syntax.git", .upToNextMajor(from: "602.0.0")),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.17.0"),
.package(url: "https://github.com/apple/swift-docc-plugin.git", .upToNextMajor(from: "1.4.0")),
],
targets: [
// MARK: - Macro Implementation
.macro(
name: "VisualTestingMacros",
dependencies: [
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
// MARK: - Client Library
.target(
name: "VisualTesting",
dependencies: [
"VisualTestingMacros",
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
]
),
// MARK: - Tests
.testTarget(
name: "VisualTestingMacrosTests",
dependencies: [
"VisualTestingMacros",
"VisualTesting",
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
]
),
// MARK: - Integration Tests (iOS only)
// Verifies that macros generate compilable code (catches issues assertMacroExpansion misses).
// Build with: xcodebuild build-for-testing -scheme swift-visual-testing -destination 'platform=iOS Simulator,...'
.testTarget(
name: "VisualTestingIntegrationTests",
dependencies: [
"VisualTesting",
]
),
]
)