Skip to content

Commit 29c5899

Browse files
committed
Revert "Update package swift file"
This reverts commit 2181b05.
1 parent 2181b05 commit 29c5899

File tree

1 file changed

+43
-40
lines changed

1 file changed

+43
-40
lines changed

Package.swift

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ import MSVCRT
99

1010
import PackageDescription
1111

12-
let products: [Product] = [
12+
var products: [Product] = [
1313
.library(name: "Sentry", targets: ["Sentry", "SentryCppHelper"]),
1414
.library(name: "Sentry-Dynamic", targets: ["Sentry-Dynamic"]),
1515
.library(name: "Sentry-Dynamic-WithARM64e", targets: ["Sentry-Dynamic-WithARM64e"]),
1616
.library(name: "Sentry-WithoutUIKitOrAppKit", targets: ["Sentry-WithoutUIKitOrAppKit", "SentryCppHelper"]),
1717
.library(name: "Sentry-WithoutUIKitOrAppKit-WithARM64e", targets: ["Sentry-WithoutUIKitOrAppKit-WithARM64e", "SentryCppHelper"]),
1818
.library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI", "SentryCppHelper"]),
19-
.library(name: "SentryDistribution", targets: ["SentryDistribution"]),
20-
.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"])
19+
.library(name: "SentryDistribution", targets: ["SentryDistribution"])
2120
]
2221

23-
let targets: [Target] = [
22+
var targets: [Target] = [
2423
.binaryTarget(
2524
name: "Sentry",
2625
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.0.0-alpha.0/Sentry.xcframework.zip",
@@ -72,44 +71,48 @@ let targets: [Target] = [
7271
]
7372
),
7473
.target(name: "SentryDistribution", path: "Sources/SentryDistribution"),
75-
.testTarget(name: "SentryDistributionTests", dependencies: ["SentryDistribution"], path: "Sources/SentryDistributionTests"),
76-
// At least one source file is required, therefore we use a dummy class to satisfy the SPM build system
77-
.target(
78-
name: "SentryHeaders",
79-
path: "Sources/Sentry",
80-
sources: ["SentryDummyPublicEmptyClass.m"],
81-
publicHeadersPath: "Public"
82-
),
83-
.target(
84-
name: "_SentryPrivate",
85-
dependencies: ["SentryHeaders"],
86-
path: "Sources/Sentry",
87-
sources: ["SentryDummyPrivateEmptyClass.m"],
88-
publicHeadersPath: "include",
89-
cSettings: [.headerSearchPath("include/HybridPublic")]),
90-
.target(
91-
name: "SentrySwift",
92-
dependencies: ["_SentryPrivate", "SentryHeaders"],
93-
path: "Sources/Swift",
94-
swiftSettings: [
95-
.unsafeFlags(["-enable-library-evolution"])
96-
]),
97-
.target(
98-
name: "SentryObjc",
99-
dependencies: ["SentrySwift"],
100-
path: "Sources",
101-
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"],
102-
cSettings: [
103-
.headerSearchPath("Sentry/include/HybridPublic"),
104-
.headerSearchPath("Sentry"),
105-
.headerSearchPath("SentryCrash/Recording"),
106-
.headerSearchPath("SentryCrash/Recording/Monitors"),
107-
.headerSearchPath("SentryCrash/Recording/Tools"),
108-
.headerSearchPath("SentryCrash/Installations"),
109-
.headerSearchPath("SentryCrash/Reporting/Filters"),
110-
.headerSearchPath("SentryCrash/Reporting/Filters/Tools")])
74+
.testTarget(name: "SentryDistributionTests", dependencies: ["SentryDistribution"], path: "Sources/SentryDistributionTests")
11175
]
11276

77+
products.append(.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"]))
78+
targets.append(contentsOf: [
79+
// At least one source file is required, therefore we use a dummy class to satisfy the SPM build system
80+
.target(
81+
name: "SentryHeaders",
82+
path: "Sources/Sentry",
83+
sources: ["SentryDummyPublicEmptyClass.m"],
84+
publicHeadersPath: "Public"
85+
),
86+
.target(
87+
name: "_SentryPrivate",
88+
dependencies: ["SentryHeaders"],
89+
path: "Sources/Sentry",
90+
sources: ["SentryDummyPrivateEmptyClass.m"],
91+
publicHeadersPath: "include",
92+
cSettings: [.headerSearchPath("include/HybridPublic")]),
93+
.target(
94+
name: "SentrySwift",
95+
dependencies: ["_SentryPrivate", "SentryHeaders"],
96+
path: "Sources/Swift",
97+
swiftSettings: [
98+
.unsafeFlags(["-enable-library-evolution"])
99+
]),
100+
.target(
101+
name: "SentryObjc",
102+
dependencies: ["SentrySwift"],
103+
path: "Sources",
104+
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"],
105+
cSettings: [
106+
.headerSearchPath("Sentry/include/HybridPublic"),
107+
.headerSearchPath("Sentry"),
108+
.headerSearchPath("SentryCrash/Recording"),
109+
.headerSearchPath("SentryCrash/Recording/Monitors"),
110+
.headerSearchPath("SentryCrash/Recording/Tools"),
111+
.headerSearchPath("SentryCrash/Installations"),
112+
.headerSearchPath("SentryCrash/Reporting/Filters"),
113+
.headerSearchPath("SentryCrash/Reporting/Filters/Tools")])
114+
])
115+
113116
let package = Package(
114117
name: "Sentry",
115118
platforms: [.iOS(.v15), .macOS(.v12), .tvOS(.v15), .watchOS(.v8)],

0 commit comments

Comments
 (0)