Added support for the Crypto and CommonCrypto libraries for the GenerateHashUseCase use case in the library target, so this code builds for non-apple platforms.

This commit is contained in:
2025-10-05 23:54:21 +02:00
parent 40e6973681
commit b547126708
2 changed files with 34 additions and 5 deletions
+4 -4
View File
@@ -30,21 +30,21 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.13.0"),
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.13.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0")
],
targets: [
.target(
name: MarvelService.target,
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [
.android, .linux, .openbsd, .windows
]))
])),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
],
path: "Sources/MarvelService",
plugins: [