-
-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathPackage.swift
More file actions
164 lines (156 loc) · 6.4 KB
/
Copy pathPackage.swift
File metadata and controls
164 lines (156 loc) · 6.4 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// swift-tools-version:6.0
#if canImport(Darwin)
import Darwin.C
#elseif canImport(Glibc)
import Glibc
#elseif canImport(MSVCRT)
import MSVCRT
#endif
import PackageDescription
var products: [Product] = [
// BEGIN:BINARY_PRODUCTS
.library(name: "Sentry", targets: ["Sentry", "SentryCppHelper"]),
.library(name: "Sentry-Dynamic", targets: ["Sentry-Dynamic"]),
.library(name: "Sentry-Dynamic-WithARM64e", targets: ["Sentry-Dynamic-WithARM64e"]),
.library(name: "Sentry-WithoutUIKitOrAppKit", targets: ["Sentry-WithoutUIKitOrAppKit", "SentryCppHelper"]),
.library(name: "Sentry-WithoutUIKitOrAppKit-WithARM64e", targets: ["Sentry-WithoutUIKitOrAppKit-WithARM64e", "SentryCppHelper"]),
.library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI", "SentryCppHelper"]),
.library(name: "SentryObjC-Dynamic", targets: ["SentryObjC-Dynamic"]),
.library(name: "SentryObjC-Static", targets: ["SentryObjC-Static"]),
// END:BINARY_PRODUCTS
.library(name: "SentryDistribution", targets: ["SentryDistribution"])
]
var targets: [Target] = [
// BEGIN:BINARY_TARGETS
.binaryTarget(
name: "Sentry",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/Sentry.xcframework.zip",
checksum: "c565f064a1fd3a267b01ea1e84de4f15f5769bd2deed4c14636949ceaa2f4498" //Sentry-Static
),
.binaryTarget(
name: "Sentry-Dynamic",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/Sentry-Dynamic.xcframework.zip",
checksum: "ce17869a97088972a9e64592ef212857d2f28b6e9d4b8cf6356dc3769f39b993" //Sentry-Dynamic
),
.binaryTarget(
name: "Sentry-Dynamic-WithARM64e",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/Sentry-Dynamic-WithARM64e.xcframework.zip",
checksum: "06487bb5e76fc594ccf3522a8f71c0444c62d677f6aef25a7cde42656ed38d0c" //Sentry-Dynamic-WithARM64e
),
.binaryTarget(
name: "Sentry-WithoutUIKitOrAppKit",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/Sentry-WithoutUIKitOrAppKit.xcframework.zip",
checksum: "ba4102f7e4ecb0929f510b32753943bc69a624ffcd80db3e6db8685c6bfd633f" //Sentry-WithoutUIKitOrAppKit
),
.binaryTarget(
name: "Sentry-WithoutUIKitOrAppKit-WithARM64e",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip",
checksum: "29a3c9e9ed42d9828b7550b98b3c6a1304b330e23654e8a1719e42a1769fa8c9" //Sentry-WithoutUIKitOrAppKit-WithARM64e
),
.binaryTarget(
name: "SentryObjC-Dynamic",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/SentryObjC-Dynamic.xcframework.zip",
checksum: "a7e2cd5a66c546e0746ac61cff857fdc94716dc64c52f8a94ac5596221fc979b" //SentryObjC-Dynamic
),
.binaryTarget(
name: "SentryObjC-Static",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.17.1/SentryObjC-Static.xcframework.zip",
checksum: "17324ae51ff9fe5f9a7ee368fb70c8bbe2aeee574a24b71307f79ee76d1d2c22" //SentryObjC-Static
),
.target(
name: "SentrySwiftUI",
dependencies: ["Sentry"],
path: "Sources/SentrySwiftUI",
exclude: ["module.modulemap"],
linkerSettings: [
.linkedFramework("Sentry")
]
),
.target(
name: "SentryCppHelper",
path: "Sources/SentryCppHelper",
linkerSettings: [
.linkedLibrary("c++")
]
),
// END:BINARY_TARGETS
.target(name: "SentryDistribution", path: "Sources/SentryDistribution"),
.testTarget(name: "SentryDistributionTests", dependencies: ["SentryDistribution"], path: "Sources/SentryDistributionTests")
]
// Targets required to support compile-from-source builds via SPM.
products.append(.library(name: "SentrySPM", targets: ["SentryObjCInternal"]))
targets += [
// At least one source file is required, therefore we use a dummy class to satisfy the SPM build system
.target(
name: "SentryHeaders",
path: "Sources/Sentry",
sources: ["SentryDummyPublicEmptyClass.m"],
publicHeadersPath: "Public"
),
.target(
name: "_SentryPrivate",
dependencies: ["SentryHeaders"],
path: "Sources/Sentry",
sources: ["SentryDummyPrivateEmptyClass.m"],
publicHeadersPath: "include"),
.target(
name: "SentrySwift",
dependencies: ["_SentryPrivate", "SentryHeaders"],
path: "Sources/Swift",
swiftSettings: [
.unsafeFlags(["-enable-library-evolution"])
]),
// SentryObjCInternal compiles all ObjC/C sources from the repo. Named "Internal"
// to reserve "SentryObjC" for a future public Objective-C wrapper around the SDK.
.target(
name: "SentryObjCInternal",
dependencies: ["SentrySwift"],
path: "Sources",
exclude: [
"Sentry/SentryDummyPublicEmptyClass.m",
"Sentry/SentryDummyPrivateEmptyClass.m",
"Swift",
"SentrySwiftUI",
"Resources",
"Configuration",
"SentryCppHelper",
"SentryDistribution",
"SentryDistributionTests",
"SentryObjC",
"SentryObjCCompat"
],
cSettings: [
.headerSearchPath("Sentry"),
.headerSearchPath("SentryCrash/Recording"),
.headerSearchPath("SentryCrash/Recording/Monitors"),
.headerSearchPath("SentryCrash/Recording/Tools"),
.headerSearchPath("SentryCrash/Installations"),
.headerSearchPath("SentryCrash/Reporting/Filters"),
.headerSearchPath("SentryCrash/Reporting/Filters/Tools")])
]
// BEGIN:OBJC_WRAPPER
products.append(.library(name: "SentryObjC", targets: ["SentryObjC"]))
targets += [
.target(
name: "SentryObjCCompat",
dependencies: ["SentryObjCInternal"],
path: "Sources/SentryObjCCompat"),
.target(
name: "SentryObjC",
dependencies: ["SentryObjCCompat"],
path: "Sources/SentryObjC",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath("Public")
]
)
]
// END:OBJC_WRAPPER
let package = Package(
name: "Sentry",
platforms: [.iOS(.v15), .macOS(.v10_14), .tvOS(.v15), .watchOS(.v8), .visionOS(.v1)],
products: products,
targets: targets,
swiftLanguageModes: [.v5],
cxxLanguageStandard: .cxx14
)