Files
ccn/Services/Website/Package.swift
T
javierandClaude Fable 5.1 916df7e2f0 Project updates from Template
This commit contains the latest updates from the generic Website template, which rework the compression and localization:

- Reworked the compression and localization in the Infrastructure package. (3c568e4)
- Adopted the reworked compression and localization in the Website service. (08cf3e3)

The template commit that only touched the root README (53676ed) was left out, as this project no longer carries that file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 12:45:58 +02:00

153 lines
4.6 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/adam-fowler/compress-nio.git",
from: "1.4.2"
),
.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"
),
],
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: "CompressNIO",
package: "compress-nio"
),
.product(
name: "HummingbirdTesting",
package: "hummingbird"
),
],
path: "Tests/App",
resources: [
// `Static` links to the service's `Resources/Static`, copying it into the test bundle at build
// time — the tests must not read the repository tree, which Xcode's test runner is denied.
.copy("Static")
]
),
.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"
),
]
)