2026-10-25 17:52:37 +00:00
|
|
|
// swift-tools-version: 6.0
|
2025-10-05 23:16:54 +00:00
|
|
|
|
2026-10-25 17:52:37 +00:00
|
|
|
// ===----------------------------------------------------------------------===
|
2025-10-05 23:16:54 +00:00
|
|
|
//
|
|
|
|
|
// This source file is part of the ASConnectService open source project
|
|
|
|
|
//
|
2026-03-26 01:07:23 +00:00
|
|
|
// Copyright (c) 2026 Röck+Cöde VoF. and the ASConnectService project authors
|
2026-10-25 17:52:37 +00:00
|
|
|
// Licensed under Apache license v2.0
|
2025-10-05 23:16:54 +00:00
|
|
|
//
|
|
|
|
|
// See LICENSE for license information
|
|
|
|
|
// See CONTRIBUTORS for the list of ASConnectService project authors
|
|
|
|
|
//
|
2026-10-25 17:52:37 +00:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
//
|
|
|
|
|
// ===----------------------------------------------------------------------===
|
2025-10-06 00:45:21 +02:00
|
|
|
|
2026-10-25 17:52:37 +00:00
|
|
|
import class Foundation.ProcessInfo
|
2025-10-06 00:45:21 +02:00
|
|
|
import PackageDescription
|
|
|
|
|
|
|
|
|
|
let package = Package(
|
2025-10-05 23:16:54 +00:00
|
|
|
name: AppStoreConnectService.package,
|
|
|
|
|
platforms: [
|
2026-10-25 17:52:37 +00:00
|
|
|
.iOS(.v14),
|
|
|
|
|
.macOS(.v11),
|
|
|
|
|
.tvOS(.v14),
|
2025-10-05 23:16:54 +00:00
|
|
|
.visionOS(.v1),
|
2026-10-25 17:52:37 +00:00
|
|
|
.watchOS(.v7)
|
2025-10-05 23:16:54 +00:00
|
|
|
],
|
2025-10-06 00:45:21 +02:00
|
|
|
products: [
|
|
|
|
|
.library(
|
2025-10-05 23:16:54 +00:00
|
|
|
name: AppStoreConnectService.package,
|
|
|
|
|
targets: [AppStoreConnectService.target]
|
2025-10-06 00:45:21 +02:00
|
|
|
),
|
|
|
|
|
],
|
2025-10-05 23:16:54 +00:00
|
|
|
dependencies: [
|
2026-10-25 17:52:37 +00:00
|
|
|
// 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")
|
2025-10-05 23:16:54 +00:00
|
|
|
],
|
2025-10-06 00:45:21 +02:00
|
|
|
targets: [
|
|
|
|
|
.target(
|
2025-10-05 23:16:54 +00:00
|
|
|
name: AppStoreConnectService.target,
|
2025-10-06 14:51:36 +00:00
|
|
|
dependencies: [
|
|
|
|
|
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
|
|
|
|
|
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
|
|
|
|
|
],
|
|
|
|
|
path: "Sources/ASConnectService",
|
2026-10-25 17:52:37 +00:00
|
|
|
exclude: [
|
|
|
|
|
"openapi.json",
|
|
|
|
|
"openapi-generator-config.yaml"
|
2025-10-06 14:51:36 +00:00
|
|
|
]
|
2025-10-06 00:45:21 +02:00
|
|
|
),
|
|
|
|
|
.testTarget(
|
2025-10-05 23:16:54 +00:00
|
|
|
name: AppStoreConnectService.test,
|
|
|
|
|
dependencies: [
|
|
|
|
|
.byName(name: AppStoreConnectService.target)
|
|
|
|
|
],
|
|
|
|
|
path: "Tests/ASConnectService"
|
2025-10-06 00:45:21 +02:00
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
)
|
2025-10-05 23:16:54 +00:00
|
|
|
|
2026-10-25 17:52:37 +00:00
|
|
|
// 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")
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-05 23:16:54 +00:00
|
|
|
// MARK: - Constants
|
|
|
|
|
|
|
|
|
|
enum AppStoreConnectService {
|
|
|
|
|
static let package = "asconnect-service"
|
|
|
|
|
static let target = "ASConnectService"
|
|
|
|
|
static let test = "\(AppStoreConnectService.target)Tests"
|
|
|
|
|
}
|