Files
ccn/Packages/Localization/Package.swift
T

49 lines
1.5 KiB
Swift
Raw Normal View History

2026-10-25 11:55:43 +01:00
// swift-tools-version: 6.4
2026-08-19 22:55:00 +02:00
import PackageDescription
let package = Package(
name: "Localization",
defaultLocalization: "en",
platforms: [
.macOS(.v15),
],
products: [
.library(
name: "Localization",
targets: [
"Localization"
]
)
],
targets: [
.target(
name: "Localization",
path: "Sources",
),
.testTarget(
name: "LocalizationTests",
dependencies: [
.byName(name: "Localization")
],
path: "Tests",
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")
]
),
]
)
2026-10-25 11:55:43 +01:00
// Applied to every target: strict memory safety and warnings as errors as guardrails — deprecations stay warnings, so a
// dependency update cannot break the build — plus the upcoming concurrency features Swift 7 turns on by default.
for target in package.targets {
target.swiftSettings = (target.swiftSettings ?? []) + [
.strictMemorySafety(),
.treatAllWarnings(as: .error),
.treatWarning("DeprecatedDeclaration", as: .warning),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
]
}