Updated the setup of the Package.swift file.

This commit is contained in:
2025-10-06 00:56:06 +02:00
parent 817cf9fe95
commit b204d81def
3 changed files with 27 additions and 11 deletions
+27 -11
View File
@@ -1,26 +1,42 @@
// swift-tools-version: 6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "asconnect-service",
name: AppStoreConnectService.package,
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.visionOS(.v1),
.watchOS(.v6)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "asconnect-service",
targets: ["asconnect-service"]
name: AppStoreConnectService.package,
targets: [AppStoreConnectService.target]
),
],
dependencies: [],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "asconnect-service"
name: AppStoreConnectService.target,
path: "Sources/ASConnectService"
),
.testTarget(
name: "asconnect-serviceTests",
dependencies: ["asconnect-service"]
name: AppStoreConnectService.test,
dependencies: [
.byName(name: AppStoreConnectService.target)
],
path: "Tests/ASConnectService"
),
]
)
// MARK: - Constants
enum AppStoreConnectService {
static let package = "asconnect-service"
static let target = "ASConnectService"
static let test = "\(AppStoreConnectService.target)Tests"
}