diff --git a/Package.swift b/Package.swift index c0581511..6ccca6aa 100644 --- a/Package.swift +++ b/Package.swift @@ -29,9 +29,8 @@ let package = Package( dependencies: [ .package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "1.0.2"), .package(url: "https://github.com/StanfordBDHG/XCTRuntimeAssertions", from: "1.0.1"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.1"), - .package(url: "https://github.com/realm/SwiftLint.git", .upToNextMinor(from: "0.55.1")) - ], + .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.1") + ] + swiftLintPackage(), targets: [ .target( name: "Spezi", @@ -78,3 +77,11 @@ func swiftLintPlugin() -> [Target.PluginUsage] { [] } } + +func swiftLintPackage() -> [PackageDescription.Package.Dependency] { + if ProcessInfo.processInfo.environment["SPEZI_DEVELOPMENT_SWIFTLINT"] != nil { + [.package(url: "https://github.com/realm/SwiftLint.git", .upToNextMinor(from: "0.55.1"))] + } else { + [] + } +}