Files
TUIkit/Package.swift
T
phranck 1db0e36bea Chore: Read TUIkit version from bundled VERSION file
- Add Sources/TUIkit/VERSION as single source of truth for version string
- Read version at runtime via Bundle.module instead of hardcoded string
- Remove unused TUIkitVersion constant from Package.swift
- Fix version mismatch (was 0.1.0, actual is 0.4.0)
2026-02-15 23:59:00 +01:00

57 lines
3.7 KiB
Swift

// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "TUIkit",
// Minimum deployment targets for Apple platforms
// Linux is automatically supported (no platform specification needed)
platforms: [
.macOS(.v14)
],
products: [
// Low-level (no deps)
.library(name: "TUIkitCore", targets: ["TUIkitCore"]),
.library(name: "TUIkitStyling", targets: ["TUIkitStyling"]),
// Mid-level
.library(name: "TUIkitView", targets: ["TUIkitView"]),
.library(name: "TUIkitImage", targets: ["TUIkitImage"]),
// High-level (aggregates all)
.library(name: "TUIkit", targets: ["TUIkit"]),
// App
.executable(name: "TUIkitExample", targets: ["TUIkitExample"]),
],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.4.3"),
],
targets: [
// Low-level (no deps)
.target(name: "CSTBImage", publicHeadersPath: "include"),
.target(name: "TUIkitCore"),
.target(name: "TUIkitStyling"),
// Mid-level
.target(name: "TUIkitView", dependencies: ["TUIkitCore"]),
.target(name: "TUIkitImage", dependencies: ["CSTBImage", "TUIkitStyling"]),
// High-level (aggregates all)
.target(
name: "TUIkit",
dependencies: ["TUIkitCore", "TUIkitStyling", "TUIkitImage", "TUIkitView"],
resources: [.copy("Localization/translations"), .copy("VERSION")]
),
// App & Tests
.executableTarget(
name: "TUIkitExample",
dependencies: ["TUIkit"],
resources: [.copy("Resources")]
),
.testTarget(name: "TUIkitTests", dependencies: ["TUIkit"]),
]
)