-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
113 lines (110 loc) · 3.94 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
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
// swift-tools-version: 6.0
import CompilerPluginSupport
import PackageDescription
let package = Package(
name: "FOSUtilities",
platforms: [
.iOS(.v17),
.macOS(.v14),
.macCatalyst(.v17),
.tvOS(.v17),
.watchOS(.v10),
.visionOS(.v1)
// .windows(),
// .linux(),
// .wasm()
],
products: [
.library(
name: "FOSFoundation",
targets: ["FOSFoundation"]
),
.library(
name: "FOSMVVM",
targets: ["FOSMVVM"]
),
.library(
name: "FOSTesting",
targets: ["FOSTesting"]
)
],
dependencies: [
// 🍎 frameworks
.package(url: "https://github.com/swiftlang/swift-testing.git", revision: "18c42c19cac3fafd61cab1156d4088664b7424ae"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.3"),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMajor(from: "3.10.0")),
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
// Third 🥳 frameworks
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "4.111.0")),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.1.3")
],
targets: [
.target(
name: "FOSFoundation",
dependencies: [
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [.linux]))
]
),
.macro(
name: "FOSMacros",
dependencies: [
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftDiagnostics", package: "swift-syntax"),
.byName(name: "FOSFoundation")
]
),
.target(
name: "FOSMVVM",
dependencies: [
.byName(name: "FOSFoundation"),
.byName(name: "FOSMacros"),
.product(name: "Vapor", package: "Vapor", condition: .when(platforms: [.macOS, .linux])),
.product(name: "Yams", package: "Yams")
]
),
.target(
name: "FOSTesting",
dependencies: [
.byName(name: "FOSFoundation"),
.byName(name: "FOSMVVM"),
.product(name: "Testing", package: "swift-testing")
]
),
.testTarget(
name: "FOSFoundationTests",
dependencies: [
.byName(name: "FOSFoundation"),
.byName(name: "FOSTesting"),
.product(name: "Testing", package: "swift-testing")
]
),
.testTarget(
name: "FOSMacrosTests",
dependencies: [
.byName(name: "FOSFoundation"),
.byName(name: "FOSMVVM"),
.byName(name: "FOSTesting"),
.byName(name: "FOSMacros"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
// 21-Dec-24 - Macros can only be tested with XCTest - https://forums.swift.org/t/swift-testing-support-for-macros/72720/6
]
),
.testTarget(
name: "FOSMVVMTests",
dependencies: [
.byName(name: "FOSFoundation"),
.byName(name: "FOSMVVM"),
.byName(name: "FOSTesting"),
.byName(name: "FOSMacros"),
.product(name: "Vapor", package: "Vapor", condition: .when(platforms: [.macOS, .linux])),
.product(name: "Testing", package: "swift-testing")
],
resources: [
.copy("TestYAML")
]
)
]
)