This PR contains the work done to define a `Libraries` package that includes its `Foundation` library in it, and integrated the former to the `Feed` framework and `App` targets in the project as well. Reviewed-on: #3 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
58 lines
1.1 KiB
Swift
58 lines
1.1 KiB
Swift
// swift-tools-version: 5.10
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: .Package.name,
|
|
platforms: [
|
|
.iOS(.v14)
|
|
],
|
|
products: [
|
|
.library(
|
|
name: .Product.name.kit,
|
|
targets: [
|
|
.Target.foundation
|
|
]
|
|
),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: .Target.foundation,
|
|
path: "Foundation/Kit"
|
|
),
|
|
.testTarget(
|
|
name: .Target.foundation.test,
|
|
dependencies: [
|
|
.byName(name: .Target.foundation)
|
|
],
|
|
path: "Foundation/Test"
|
|
),
|
|
]
|
|
)
|
|
|
|
// MARK: - String+Constants
|
|
private extension String {
|
|
enum Package {
|
|
static let name = "reviews-kit"
|
|
}
|
|
|
|
enum Product {
|
|
static let name = "Reviews"
|
|
}
|
|
|
|
enum Target {
|
|
static let foundation = "\(String.Product.name)Foundation"
|
|
}
|
|
}
|
|
|
|
// MARK: - String+Computed
|
|
private extension String {
|
|
var kit: String {
|
|
"\(self)Kit"
|
|
}
|
|
|
|
var test: String {
|
|
"\(self)Test"
|
|
}
|
|
}
|