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