Skip to content

Commit eb7d5b2

Browse files
committed
Revert temporary swift version and supported platform changes
feature/add-unmanaged-protocol-for-types-that-prefer-a-unique-id-other-than-ObjectID
1 parent 74f2ad5 commit eb7d5b2

1 file changed

Lines changed: 32 additions & 10 deletions

File tree

Package.swift

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:5.9
22

33
import Foundation
44
import PackageDescription
55

66
let package = Package(
77
name: "CoreDataRepository",
88
defaultLocalization: "en",
9-
platforms: [
10-
.iOS(.v16),
11-
.macOS(.v13),
12-
.tvOS(.v16),
13-
.watchOS(.v9),
14-
.macCatalyst(.v16),
15-
.visionOS(.v1),
16-
],
9+
platforms: .shared,
1710
products: [
1811
.library(
1912
name: "CoreDataRepository",
@@ -51,6 +44,30 @@ let package = Package(
5144
]
5245
)
5346

47+
extension [SupportedPlatform] {
48+
static let shared: Self = {
49+
if ProcessInfo.benchmarkingEnabled {
50+
[
51+
.iOS(.v15),
52+
.macOS(.v12),
53+
.tvOS(.v15),
54+
.watchOS(.v8),
55+
.macCatalyst(.v15),
56+
.visionOS(.v1),
57+
]
58+
} else {
59+
[
60+
.iOS(.v15),
61+
.macOS(.v13),
62+
.tvOS(.v15),
63+
.watchOS(.v8),
64+
.macCatalyst(.v15),
65+
.visionOS(.v1),
66+
]
67+
}
68+
}()
69+
}
70+
5471
extension [SwiftSetting] {
5572
static let swiftSix: Self = [
5673
.enableUpcomingFeature("BareSlashRegexLiterals"),
@@ -63,7 +80,7 @@ extension [SwiftSetting] {
6380
]
6481
}
6582

66-
if ["YES", "TRUE"].contains((ProcessInfo.processInfo.environment["BENCHMARKS"])?.uppercased()) {
83+
if ProcessInfo.benchmarkingEnabled {
6784
package.dependencies += [
6885
.package(
6986
url: "https://github.com/ordo-one/package-benchmark.git",
@@ -87,3 +104,8 @@ if ["YES", "TRUE"].contains((ProcessInfo.processInfo.environment["BENCHMARKS"])?
87104
),
88105
]
89106
}
107+
108+
extension ProcessInfo {
109+
static let benchmarkingEnabled: Bool = ["YES", "TRUE"]
110+
.contains((ProcessInfo.processInfo.environment["BENCHMARKS"])?.uppercased())
111+
}

0 commit comments

Comments
 (0)