Javier Cicchelli cb90b3730d [Libraries] Dependency (#6)
This PR contains the work that implements the Dependency service, which is used as a dependency injection mechanism in the application.

To give further details on what was done:
- [x] created the `Dependency` library into the **Libraries** package;
- [x] defined the `DependencyKey` protocol;
- [x] implemented the `DependencyService` service;
- [x] implemented the `Dependency` property wrapper.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#6
2023-04-11 00:41:07 +00:00

67 lines
1.3 KiB
Swift

// swift-tools-version: 5.8
import PackageDescription
let package = Package(
name: "Libraries",
platforms: [
.iOS(.v16)
],
products: [
.library(
name: "Libraries",
targets: [
"Dependency",
"Locations",
"Persistence"
]
),
],
dependencies: [],
targets: [
.target(
name: "APICore",
dependencies: []
),
.target(
name: "Dependency",
dependencies: []
),
.target(
name: "Locations",
dependencies: [
"APICore"
]
),
.target(
name: "Persistence",
dependencies: []
),
.testTarget(
name: "APICoreTests",
dependencies: [
"APICore"
]
),
.testTarget(
name: "DependencyTests",
dependencies: [
"Dependency"
]
),
.testTarget(
name: "LocationsTests",
dependencies: [
"APICore",
"Locations"
]
),
.testTarget(
name: "PersistenceTests",
dependencies: [
"Persistence"
]
),
]
)