From 31a58c7aa1a13e81ac7b6fac3e6237d44add45d5 Mon Sep 17 00:00:00 2001 From: Joe Fabisevich Date: Sat, 12 Oct 2024 19:46:29 -0400 Subject: [PATCH 1/2] Adding distinct Package.swift files for Swift 5 and 6 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 9bf11c2..fe25fb9 100755 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.0.0 +// swift-tools-version:5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From b75056785ee5d001c168d0bb40fb91713366738a Mon Sep 17 00:00:00 2001 From: Joe Fabisevich Date: Sat, 12 Oct 2024 21:58:28 -0400 Subject: [PATCH 2/2] Adding Swift 6 Package.swift --- Package@swift-6.0.swift | 74 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 Package@swift-6.0.swift diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift new file mode 100755 index 0000000..9bf11c2 --- /dev/null +++ b/Package@swift-6.0.swift @@ -0,0 +1,74 @@ +// swift-tools-version:6.0.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +#if os(Linux) +let dependencies: [PackageDescription.Package.Dependency] = [ + // URLSession on Linux is notoriously unreliable and freezes, so this is used instead (only for Linux) + .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.22.0"), + + // SwiftSoup is used to parse the HTML tree + .package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.3.7") +] + +let targetDependencies: [Target.Dependency] = [ + "SwiftSoup", + .product(name: "AsyncHTTPClient", package: "async-http-client") +] + +let plugins: [Target.PluginUsage] = [ + +] + +#else +let dependencies: [PackageDescription.Package.Dependency] = [ + // SwiftSoup is used to parse the HTML tree + .package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.3.7"), + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.3"), + .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.55.1") +] + +let targetDependencies: [Target.Dependency] = [ + "SwiftSoup" +] + +let plugins: [Target.PluginUsage] = [ + .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins") +] + +#endif + +let package = Package( + name: "FaviconFinder", + platforms: [ + .iOS(.v15), + .macOS(.v12), + .watchOS(.v8), + .tvOS(.v15) + ], + products: [ + .library( + name: "FaviconFinder", + targets: [ + "FaviconFinder" + ] + ) + ], + dependencies: dependencies, + targets: [ + .target( + name: "FaviconFinder", + dependencies: targetDependencies, + plugins: plugins + ), + + .testTarget( + name: "FaviconFinderTests", + dependencies: [ + "FaviconFinder" + ], + plugins: plugins + ) + ] +)