65 lines
2.4 KiB
Swift
65 lines
2.4 KiB
Swift
// swift-tools-version: 6.3
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let strictConcurrencySettings: [SwiftSetting] = [
|
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
|
]
|
|
|
|
// UI/executable-facing targets default to MainActor isolation on top of strict
|
|
// concurrency; data/service layers (e.g. LuminateAPI) stay nonisolated by default
|
|
// so they aren't implicitly pinned to the main actor.
|
|
let uiSwiftSettings: [SwiftSetting] = strictConcurrencySettings + [
|
|
.defaultIsolation(MainActor.self),
|
|
]
|
|
|
|
let package = Package(
|
|
name: "luminate",
|
|
platforms: [.macOS(.v26)],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
|
.executable(
|
|
name: "Luminate",
|
|
targets: ["Luminate"]
|
|
),
|
|
],
|
|
dependencies: [
|
|
.package(url: "https://git.bscubed.dev/gtk-swift/portico.git", branch: "main"),
|
|
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.13.0"),
|
|
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.12.0"),
|
|
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.3.1"),
|
|
],
|
|
targets: [
|
|
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
|
// Targets can depend on other targets in this package and products from dependencies.
|
|
.target(
|
|
name: "LuminateAPI",
|
|
dependencies: [
|
|
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
|
|
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
|
|
],
|
|
swiftSettings: strictConcurrencySettings,
|
|
plugins: [
|
|
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator")
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "Luminate",
|
|
dependencies: [
|
|
"LuminateAPI",
|
|
.product(name: "Portico", package: "portico")
|
|
],
|
|
swiftSettings: uiSwiftSettings
|
|
),
|
|
.testTarget(
|
|
name: "LuminateTests",
|
|
dependencies: [
|
|
"Luminate",
|
|
.product(name: "Portico", package: "portico")
|
|
],
|
|
swiftSettings: uiSwiftSettings
|
|
),
|
|
],
|
|
swiftLanguageModes: [.v6]
|
|
)
|