-
Notifications
You must be signed in to change notification settings - Fork 77
/
Package.swift
126 lines (124 loc) · 5.95 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
114
115
116
117
118
119
120
121
122
123
124
125
126
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "XCMetrics",
platforms: [
.macOS(.v13),
], products: [
.executable(name: "XCMetrics", targets: ["XCMetricsApp"]),
.executable(name: "XCMetricsBackend", targets: ["XCMetricsBackend"]),
.library(name: "XCMetricsBackendLib", targets: ["XCMetricsBackendLib"]),
.library(name: "XCMetricsClient", targets: ["XCMetricsClient"]),
.library(name: "XCMetricsPlugins", targets: ["XCMetricsPlugins"]),
.library(name: "XCMetricsUtils", targets: ["XCMetricsUtils"]),
],
dependencies: [
.package(url: "https://github.com/MobileNativeFoundation/XCLogParser", from: "0.2.38"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", exact: "0.2.7"),
.package(url: "https://github.com/grpc/grpc-swift.git", exact: "1.0.0-alpha.9"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.3"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.15.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", .upToNextMajor(from: "2.10.0")),
.package(url: "https://github.com/Spotify/Mobius.swift", exact: "0.3.0"),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.3.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "3.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.65.2"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.5.0"),
.package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.4.0"),
.package(url: "https://github.com/vapor/queues-redis-driver.git", from: "1.0.0"),
.package(url: "https://github.com/vapor/queues.git", from: "1.5.1"),
.package(url: "https://github.com/vapor/redis.git", from: "4.0.0"),
.package(url: "https://github.com/vapor-community/google-cloud-kit.git", from: "1.0.0-rc.2"),
.package(url: "https://github.com/soto-project/soto.git", from: "4.0.0"),
],
targets: [
.target(
name: "XCMetricsClient",
dependencies: [
"XCMetricsProto",
"XCMetricsUtils",
"XCMetricsCommon",
.product(name: "XCLogParser", package: "XCLogParser"),
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP2", package: "swift-nio-http2"),
.product(name: "MobiusCore", package: "Mobius.swift"),
.product(name: "MobiusExtras", package: "Mobius.swift"),
.product(name: "CryptoSwift", package: "CryptoSwift"),
.product(name: "Yams", package: "Yams"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
.target(
name: "XCMetricsPlugins",
dependencies: [
"XCMetricsClient",
"XCMetricsUtils",
.product(name: "CryptoSwift", package: "CryptoSwift"),
]
),
.target(
name: "XCMetricsUtils",
dependencies: []
),
.target(
name: "XCMetricsProto",
dependencies: [
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP2", package: "swift-nio-http2")
]
),
.target(
name: "XCMetricsApp",
dependencies: ["XCMetricsClient"]
),
.target(
name: "XCMetricsCommon",
dependencies: []
),
.target(
name: "XCMetricsBackendLib",
dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "FluentPostgresDriver", package: "fluent-postgres-driver"),
.product(name: "Vapor", package: "vapor"),
.product(name: "Queues", package: "queues"),
.product(name: "QueuesRedisDriver", package: "queues-redis-driver"),
.product(name: "Redis", package: "redis"),
.product(name: "XCLogParser", package: "XCLogParser"),
.product(name: "CryptoSwift", package: "CryptoSwift"),
.product(name: "GoogleCloudKit", package: "google-cloud-kit"),
.product(name: "S3", package: "soto"),
"XCMetricsCommon"
],
swiftSettings: [
// Enable better optimizations when building in Release configuration. Despite the use of
// the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
// builds. See <https://github.com/swift-server/guides#building-for-production> for details.
.unsafeFlags(["-cross-module-optimization"], .when(configuration: .release))
]
),
.target(name: "XCMetricsBackend", dependencies: [.target(name: "XCMetricsBackendLib")]),
.testTarget(
name: "XCMetricsTests",
dependencies: [
"XCMetricsClient",
"XCMetricsProto",
.product(name: "MobiusTest", package: "Mobius.swift"),
.product(name: "SwiftToolsSupport", package: "swift-tools-support-core"),
]
),
.testTarget(
name: "XCMetricsPluginsTests",
dependencies: ["XCMetricsPlugins"]
),
.testTarget(name: "XCMetricsBackendLibTests", dependencies: [
.target(name: "XCMetricsBackendLib"),
.product(name: "XCTVapor", package: "vapor"),
.product(name: "XCTQueues", package: "queues")
]),
]
)