// swift-tools-version: 6.0 // VorleserKit — all testable logic for Vorleser. The macOS app target (App/) is generated by XcodeGen // from project.yml and links the library products below. See docs/ARCHITECTURE.md §3. import PackageDescription let strictSettings: [SwiftSetting] = [ .enableUpcomingFeature("ExistentialAny"), ] let package = Package( name: "VorleserKit", platforms: [.macOS(.v14)], products: [ .library(name: "VorleserCore", targets: ["VorleserCore"]), .library(name: "VorleserCapture", targets: ["VorleserCapture"]), .executable(name: "vorleser-cli", targets: ["vorleser-cli"]), ], dependencies: [ // CLI harness only (ADR-006). The app target must not depend on it. .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), ], targets: [ // Leaf modules — must not depend on each other. .target(name: "VorleserText", swiftSettings: strictSettings), .target(name: "VorleserOllama", swiftSettings: strictSettings), .target(name: "VorleserAudio", swiftSettings: strictSettings), // Composition of leaf modules via protocols. .target( name: "VorleserCore", dependencies: ["VorleserText", "VorleserOllama", "VorleserAudio"], swiftSettings: strictSettings ), // Only module allowed to use Accessibility / ApplicationServices. .target(name: "VorleserCapture", dependencies: ["VorleserCore"], swiftSettings: strictSettings), // Fakes shared by tests (FakeSynthesizer, FakeAudioPlayer, FakeCatalog, FakePasteboard, FakeAXClient). .target( name: "VorleserTestSupport", dependencies: ["VorleserCore", "VorleserCapture"], swiftSettings: strictSettings ), .executableTarget( name: "vorleser-cli", dependencies: [ "VorleserCore", .product(name: "ArgumentParser", package: "swift-argument-parser"), ], swiftSettings: strictSettings ), .testTarget(name: "VorleserTextTests", dependencies: ["VorleserText"], resources: [.copy("Fixtures")]), .testTarget(name: "VorleserOllamaTests", dependencies: ["VorleserOllama"], resources: [.copy("Fixtures")]), .testTarget(name: "VorleserAudioTests", dependencies: ["VorleserAudio"]), .testTarget(name: "VorleserCoreTests", dependencies: ["VorleserCore", "VorleserTestSupport"]), .testTarget(name: "VorleserCaptureTests", dependencies: ["VorleserCapture", "VorleserTestSupport"]), // Opt-in tests against a real local Ollama: VORLESER_LIVE=1 swift test --filter VorleserLiveTests .testTarget(name: "VorleserLiveTests", dependencies: ["VorleserCore"]), ] )