// swift-tools-version: 6.0 import PackageDescription let package = Package( name: "swift-hpa", platforms: [.macOS(.v14)], products: [ .executable(name: "hpa", targets: ["hpa"]), .library(name: "CodersClient", targets: ["CodersClient"]), .library(name: "CommandClient", targets: ["CommandClient"]), .library(name: "ConfigurationClient", targets: ["ConfigurationClient"]), .library(name: "FileClient", targets: ["FileClient"]), .library(name: "PlaybookClient", targets: ["PlaybookClient"]), .library(name: "PandocClient", targets: ["PandocClient"]), .library(name: "VaultClient", targets: ["VaultClient"]) ], dependencies: [ .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"), .package(url: "https://github.com/pointfreeco/swift-custom-dump.git", from: "1.3.3"), .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.2"), .package(url: "https://github.com/m-housh/swift-shell-client.git", from: "0.1.0"), .package(url: "https://git.housh.dev/michael/swift-cli-doc.git", from: "0.2.1"), .package(url: "https://github.com/m-housh/swift-cli-version.git", from: "0.1.0"), .package(url: "https://github.com/LebJe/TOMLKit.git", from: "0.5.0") ], targets: [ .executableTarget( name: "hpa", dependencies: [ "ConfigurationClient", "FileClient", "PandocClient", "PlaybookClient", "VaultClient", .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "CliDoc", package: "swift-cli-doc"), .product(name: "CustomDump", package: "swift-custom-dump"), .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ] ), .target( name: "CodersClient", dependencies: [ .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies"), .product(name: "TOMLKit", package: "TOMLKit") ] ), .target( name: "CommandClient", dependencies: [ "Constants", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ] ), .target(name: "Constants"), .target( name: "TestSupport", dependencies: [ "CommandClient", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ] ), .target( name: "ConfigurationClient", dependencies: [ "CodersClient", "CommandClient", "FileClient", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ], resources: [ .copy("Resources/hpa.toml") ] ), .testTarget( name: "ConfigurationClientTests", dependencies: [ "ConfigurationClient", "TestSupport" ] ), .target( name: "FileClient", dependencies: [ .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies") ] ), .testTarget( name: "FileClientTests", dependencies: ["FileClient", "TestSupport"] ), .target( name: "PandocClient", dependencies: [ "CommandClient", "ConfigurationClient", "PlaybookClient", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies") ] ), .testTarget( name: "PandocClientTests", dependencies: ["PandocClient", "TestSupport"] ), .target( name: "PlaybookClient", dependencies: [ "CommandClient", "CodersClient", "ConfigurationClient", "FileClient", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ] ), .testTarget( name: "PlaybookClientTests", dependencies: [ "PlaybookClient", "TestSupport" ] ), .target( name: "VaultClient", dependencies: [ "CommandClient", "ConfigurationClient", "FileClient", .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "DependenciesMacros", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") ] ), .testTarget( name: "VaultClientTests", dependencies: ["VaultClient", "TestSupport"] ) ] )