This PR contains the work done to create the new **Utility** package within the project, and also included in it the `NormalizeEmail` method, as it's not something that belongs to the **Infrastructure** package. Reviewed-on: rock-n-code/loud-amsterdam#29 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
148 lines
4.3 KiB
Swift
148 lines
4.3 KiB
Swift
// swift-tools-version: 6.3
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "Website",
|
|
defaultLocalization: "en",
|
|
platforms: [
|
|
.macOS(.v15),
|
|
.iOS(.v18),
|
|
.tvOS(.v18),
|
|
],
|
|
products: [
|
|
.executable(
|
|
name: "Website",
|
|
targets: [
|
|
"Website",
|
|
"WebsiteLibrary",
|
|
]
|
|
)
|
|
],
|
|
dependencies: [
|
|
.package(
|
|
path: "../../Packages/Infrastructure"
|
|
),
|
|
.package(
|
|
path: "../../Packages/Localization"
|
|
),
|
|
.package(
|
|
path: "../../Packages/Persistence"
|
|
),
|
|
.package(
|
|
path: "../../Packages/Utility"
|
|
),
|
|
.package(
|
|
url: "https://github.com/elementary-swift/elementary.git",
|
|
from: "0.6.0"
|
|
),
|
|
.package(
|
|
url: "https://github.com/hummingbird-community/hummingbird-elementary.git",
|
|
from: "0.3.0"
|
|
),
|
|
.package(
|
|
url: "https://github.com/hummingbird-project/hummingbird.git",
|
|
from: "2.25.0"
|
|
),
|
|
.package(
|
|
url: "https://github.com/hummingbird-project/hummingbird-compression.git",
|
|
from: "2.0.0"
|
|
),
|
|
.package(
|
|
url: "https://github.com/apple/swift-configuration.git",
|
|
from: "1.0.0",
|
|
traits: [
|
|
.defaults,
|
|
"CommandLineArguments",
|
|
]
|
|
),
|
|
],
|
|
targets: [
|
|
.executableTarget(
|
|
name: "Website",
|
|
dependencies: [
|
|
.byName(name: "Localization"),
|
|
.byName(name: "Persistence"),
|
|
.byName(name: "WebsiteLibrary"),
|
|
.product(
|
|
name: "Configuration",
|
|
package: "swift-configuration"
|
|
),
|
|
.product(
|
|
name: "Hummingbird",
|
|
package: "hummingbird"
|
|
),
|
|
.product(
|
|
name: "HummingbirdCompression",
|
|
package: "hummingbird-compression"
|
|
),
|
|
],
|
|
path: "Sources/App"
|
|
),
|
|
.target(
|
|
name: "WebsiteLibrary",
|
|
dependencies: [
|
|
.byName(name: "Infrastructure"),
|
|
.byName(name: "Localization"),
|
|
.byName(name: "Persistence"),
|
|
.byName(name: "Utility"),
|
|
.product(
|
|
name: "Configuration",
|
|
package: "swift-configuration"
|
|
),
|
|
.product(
|
|
name: "Elementary",
|
|
package: "elementary"
|
|
),
|
|
.product(
|
|
name: "Hummingbird",
|
|
package: "hummingbird"
|
|
),
|
|
.product(
|
|
name: "HummingbirdElementary",
|
|
package: "hummingbird-elementary"
|
|
),
|
|
],
|
|
path: "Sources/Library",
|
|
resources: [
|
|
// Copied verbatim rather than processed: the String Catalog is read as raw JSON at
|
|
// runtime so it resolves identically on Darwin and Linux (which cannot compile it).
|
|
.copy("Catalogs/Localizable.xcstrings")
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "WebsiteTests",
|
|
dependencies: [
|
|
.byName(name: "Infrastructure"),
|
|
.byName(name: "Website"),
|
|
.product(
|
|
name: "HummingbirdTesting",
|
|
package: "hummingbird"
|
|
),
|
|
],
|
|
path: "Tests/App"
|
|
),
|
|
.testTarget(
|
|
name: "WebsiteLibraryTests",
|
|
dependencies: [
|
|
.byName(name: "Infrastructure"),
|
|
.byName(name: "Persistence"),
|
|
.byName(name: "WebsiteLibrary"),
|
|
.product(
|
|
name: "Elementary",
|
|
package: "elementary"
|
|
),
|
|
.product(
|
|
name: "Hummingbird",
|
|
package: "hummingbird"
|
|
),
|
|
.product(
|
|
name: "HummingbirdTesting",
|
|
package: "hummingbird"
|
|
),
|
|
],
|
|
path: "Tests/Library"
|
|
),
|
|
]
|
|
)
|