[Library] Foundation library setup (#3)

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: rock-n-code/app-reviews#3
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #3.
This commit is contained in:
2024-03-16 01:53:37 +00:00
committed by javier
parent 8fc4bb165e
commit 8fa5533426
7 changed files with 285 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
// 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"
}
}