// swift-tools-version: 5.10 //===----------------------------------------------------------------------=== // // This source file is part of the ASConnectService open source project // // Copyright (c) 2026 Röck+Cöde VoF. and the ASConnectService project authors // Licensed under the EUPL 1.2 or later. // // See LICENSE for license information // See CONTRIBUTORS for the list of ASConnectService project authors // //===----------------------------------------------------------------------=== import class Foundation.ProcessInfo import PackageDescription let package = Package( name: AppStoreConnectService.package, platforms: [ .iOS(.v13), .macOS(.v10_15), .tvOS(.v13), .visionOS(.v1), .watchOS(.v6) ], products: [ .library( name: AppStoreConnectService.package, targets: [AppStoreConnectService.target] ), ], dependencies: [ // Must be at least the runtime version required by the generator in `Tools`. .package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.11.0"), .package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2") ], targets: [ .target( name: AppStoreConnectService.target, dependencies: [ .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession") ], path: "Sources/ASConnectService", exclude: [ "openapi.json", "openapi-generator-config.yaml" ] ), .testTarget( name: AppStoreConnectService.test, dependencies: [ .byName(name: AppStoreConnectService.target) ], path: "Tests/ASConnectService" ), ] ) // Only added by the documentation targets, so consumers don't resolve it. if ProcessInfo.processInfo.environment["ENABLE_DOCC_PLUGIN"] != nil { package.dependencies.append( .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0") ) } // MARK: - Constants enum AppStoreConnectService { static let package = "asconnect-service" static let target = "ASConnectService" static let test = "\(AppStoreConnectService.target)Tests" }