From 18550254e32642cb960febcab33bf384291ab857 Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Wed, 26 Jun 2024 15:15:33 +0200 Subject: [PATCH] Make sure it works for both compiler versions --- Package.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 6ccca6aa..2af3e524 100644 --- a/Package.swift +++ b/Package.swift @@ -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", @@ -40,7 +46,7 @@ let package = Package( .product(name: "OrderedCollections", package: "swift-collections") ], swiftSettings: [ - .enableUpcomingFeature("StrictConcurrency") + swiftConcurrency ], plugins: [] + swiftLintPlugin() ), @@ -50,7 +56,7 @@ let package = Package( .target(name: "Spezi") ], swiftSettings: [ - .enableUpcomingFeature("StrictConcurrency") + swiftConcurrency ], plugins: [] + swiftLintPlugin() ), @@ -62,7 +68,7 @@ let package = Package( .product(name: "XCTRuntimeAssertions", package: "XCTRuntimeAssertions") ], swiftSettings: [ - .enableUpcomingFeature("StrictConcurrency") + swiftConcurrency ], plugins: [] + swiftLintPlugin() )