swift-libs/Package.swift
Javier Cicchelli 12add7bf30 [Feature] Coordinator protocols (#2)
This PR contains the work done to define the `Coordinator` and the `Router` public protocols, and also implemented a few concrete router implementations tailored for the **UIKit** framework.

To provide further details about the work done:
- [x] define a new, dedicated `Coordinator` target in the `Package` file;
- [x] define the `Coordinator` and the `Router` public protocols used to implement the coordinator pattern;
- [x] implemented some **UIKit** specific routers to use on the **iOS** platform: `ModalNavigationRouter`, `PushNavigationRouter` and the `WindowRouter` concrete routers.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: #2
2023-04-16 14:42:42 +00:00

58 lines
1.1 KiB
Swift

// swift-tools-version: 5.8
import PackageDescription
private var excludePlatforms: [String] = [.PlatformFolder.iOS]
#if os(iOS)
excludePlatforms = []
#endif
let package = Package(
name: "SwiftLibs",
products: [
.library(
name: "SwiftLibs",
targets: [
"Coordinator",
"Core"
]
),
],
dependencies: [],
targets: [
.target(
name: "Coordinator",
dependencies: [],
exclude: excludePlatforms
),
.target(
name: "Core",
dependencies: []
),
.testTarget(
name: "CoordinatorTests",
dependencies: [
"Coordinator"
],
path: "Tests/Coordinator",
exclude: excludePlatforms
),
.testTarget(
name: "CoreTests",
dependencies: [
"Core"
],
path: "Tests/Core"
),
]
)
// MARK: - String+Constants
private extension String {
enum PlatformFolder {
static let iOS = "Platform/iOS"
}
}