|
| 1 | +// swift-tools-version:6.0 |
| 2 | +// The swift-tools-version declares the minimum version of Swift required to build this package. |
| 3 | + |
| 4 | +import PackageDescription |
| 5 | + |
| 6 | +// Base dependencies needed on all platforms |
| 7 | +var dependencies: [Package.Dependency] = [ |
| 8 | + .package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"), |
| 9 | + .package(url: "https://github.com/apple/swift-log.git", from: "1.5.0"), |
| 10 | + .package(url: "https://github.com/mattt/eventsource.git", from: "1.1.0"), |
| 11 | +] |
| 12 | + |
| 13 | +// Target dependencies needed on all platforms |
| 14 | +var targetDependencies: [Target.Dependency] = [ |
| 15 | + .product(name: "SystemPackage", package: "swift-system"), |
| 16 | + .product(name: "Logging", package: "swift-log"), |
| 17 | + .product( |
| 18 | + name: "EventSource", package: "eventsource", |
| 19 | + condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS])), |
| 20 | +] |
| 21 | + |
| 22 | +let package = Package( |
| 23 | + name: "mcp-swift-sdk", |
| 24 | + platforms: [ |
| 25 | + .macOS("13.0"), |
| 26 | + .macCatalyst("16.0"), |
| 27 | + .iOS("16.0"), |
| 28 | + .watchOS("9.0"), |
| 29 | + .tvOS("16.0"), |
| 30 | + .visionOS("1.0"), |
| 31 | + ], |
| 32 | + products: [ |
| 33 | + // Products define the executables and libraries a package produces, making them visible to other packages. |
| 34 | + .library( |
| 35 | + name: "MCP", |
| 36 | + targets: ["MCP"]) |
| 37 | + ], |
| 38 | + dependencies: dependencies, |
| 39 | + targets: [ |
| 40 | + // Targets are the basic building blocks of a package, defining a module or a test suite. |
| 41 | + // Targets can depend on other targets in this package and products from dependencies. |
| 42 | + .target( |
| 43 | + name: "MCP", |
| 44 | + dependencies: targetDependencies, |
| 45 | + ), |
| 46 | + .testTarget( |
| 47 | + name: "MCPTests", |
| 48 | + dependencies: ["MCP"] + targetDependencies), |
| 49 | + ] |
| 50 | +) |
0 commit comments