swift-libs/Package.swift

102 lines
2.2 KiB
Swift
Raw Normal View History

2023-04-15 00:45:32 +02:00
// swift-tools-version: 5.8
import PackageDescription
private var excludePlatforms: [String] = [.PlatformFolder.iOS]
#if os(iOS)
excludePlatforms = []
#endif
2023-04-15 00:45:32 +02:00
let package = Package(
name: "SwiftLibs",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6)
],
2023-04-15 00:45:32 +02:00
products: [
.library(
name: "SwiftLibs",
targets: [
"Communications",
"Coordination",
"Core",
"Dependencies",
"Persistence"
2023-04-15 00:45:32 +02:00
]
),
],
dependencies: [],
targets: [
// MARK: Targets
.target(
name: "Communications",
dependencies: []
),
.target(
name: "Coordination",
dependencies: [],
exclude: excludePlatforms
),
2023-04-15 00:45:32 +02:00
.target(
name: "Core",
dependencies: []
),
.target(
name: "Dependencies",
dependencies: []
),
.target(
name: "Persistence",
dependencies: []
),
// MARK: Test targets
.testTarget(
name: "CommunicationsTests",
dependencies: [
"Communications"
],
path: "Tests/Communications"
),
.testTarget(
name: "CoordinationTests",
2023-04-15 00:45:32 +02:00
dependencies: [
"Coordination"
],
path: "Tests/Coordination",
exclude: excludePlatforms
2023-04-15 00:45:32 +02:00
),
.testTarget(
name: "CoreTests",
2023-04-15 00:45:32 +02:00
dependencies: [
"Core"
],
path: "Tests/Core"
2023-04-15 00:45:32 +02:00
),
.testTarget(
name: "DependenciesTests",
dependencies: [
"Dependencies"
],
path: "Tests/Dependencies"
),
.testTarget(
name: "PersistenceTests",
dependencies: [
"Persistence"
],
path: "Tests/Persistence"
),
2023-04-15 00:45:32 +02:00
]
)
// MARK: - String+Constants
private extension String {
enum PlatformFolder {
static let iOS = "Platform/iOS"
}
}