Skip to content

Commit

Permalink
Make sure it works for both compiler versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jun 26, 2024
1 parent cc71484 commit 1855025
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
import class Foundation.ProcessInfo
import PackageDescription

#if swift(<6)
let swiftConcurrency: SwiftSetting = .enableExperimentalFeature("SwiftConcurrency")
#else
let swiftConcurrency: SwiftSetting = .enableUpcomingFeature("SwiftConcurrency")
#endif


let package = Package(
name: "Spezi",
Expand Down Expand Up @@ -40,7 +46,7 @@ let package = Package(
.product(name: "OrderedCollections", package: "swift-collections")
],
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency")
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
Expand All @@ -50,7 +56,7 @@ let package = Package(
.target(name: "Spezi")
],
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency")
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
Expand All @@ -62,7 +68,7 @@ let package = Package(
.product(name: "XCTRuntimeAssertions", package: "XCTRuntimeAssertions")
],
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency")
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
)
Expand Down

0 comments on commit 1855025

Please sign in to comment.