forked from elastic/apm-agent-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
67 lines (65 loc) · 2.52 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
//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: "apm-agent-ios",
platforms: [
.iOS(.v13),
.macOS(.v10_13),
.tvOS(.v13),
.watchOS(.v4),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other package.
.library(name: "iOSAgent", type: .static, targets: ["iOSAgent"]),
.library(name: "MemorySampler", type: .static, targets: ["MemorySampler"]),
.library(name: "CPUSampler", type: .static, targets: ["CPUSampler"]),
],
dependencies: [
.package(url: "https://github.com/ashleymills/Reachability.swift", from: "5.1.0"),
.package(
url: "https://github.com/open-telemetry/opentelemetry-swift", exact: "1.7.0"),
.package(url: "https://github.com/elastic/TrueTime.swift.git", exact: "1.0.0"),
.package(
url: "https://github.com/microsoft/plcrashreporter.git", .upToNextMajor(from: "1.0.0")),
],
targets: [
.target(
name: "MemorySampler",
dependencies: [
.product(name: "OpenTelemetryApi", package: "opentelemetry-swift"),
.product(name: "OpenTelemetrySdk", package: "opentelemetry-swift"),
],
path: "Sources/Instrumentation/MemorySampler"),
.target(
name: "CPUSampler",
dependencies: [
.product(name: "OpenTelemetryApi", package: "opentelemetry-swift"),
.product(name: "OpenTelemetrySdk", package: "opentelemetry-swift"),
],
path: "Sources/Instrumentation/CPUSampler"),
.target(
name: "iOSAgent",
dependencies: [
.product(name: "OpenTelemetryProtocolExporter", package: "opentelemetry-swift"),
.product(name: "PersistenceExporter", package: "opentelemetry-swift"),
.product(name: "URLSessionInstrumentation", package: "opentelemetry-swift"),
.product(name: "ResourceExtension", package: "opentelemetry-swift"),
.product(name: "Reachability", package: "Reachability.swift"),
.product(name: "TrueTime", package: "TrueTime.swift"),
.product(name: "CrashReporter", package: "plcrashreporter"),
"MemorySampler",
"CPUSampler",
],
path: "Sources/apm-agent-ios"
),
.testTarget(
name: "iOSAgentTests",
dependencies: ["iOSAgent"],
path: "Sources/Tests/apm-agent-iosTests"),
.testTarget(
name: "MemorySamplerTests",
dependencies: ["MemorySampler"],
path: "Sources/Tests/memory-sampler-tests"),
]
)