mirror of
https://github.com/phranck/TUIkit.git
synced 2026-05-21 09:50:35 +00:00
1db0e36bea
- 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)
57 lines
3.7 KiB
Swift
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"]),
|
|
]
|
|
)
|