From b2b79fc1d63f2227e72fe65fee8e454cb6b99401 Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Wed, 26 Jun 2024 14:34:41 +0200 Subject: [PATCH] Don't pull in the package by default --- Package.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 { + [] + } +}