Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
64 lines (62 loc) · 2.98 KB
/
Copy pathPackage.swift
File metadata and controls
64 lines (62 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// swift-tools-version: 6.4
import PackageDescription
/// The Swift 6 language mode with the main actor as the default isolation, and the two features that
/// SWIFT_APPROACHABLE_CONCURRENCY adds to it in project.yml. Keep the two files in step.
let concurrency: [SwiftSetting] = [
.swiftLanguageMode(.v6),
.defaultIsolation(MainActor.self),
.enableUpcomingFeature("InferIsolatedConformances"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
]
let package = Package(
name: "Floe",
defaultLocalization: "en",
platforms: [.macOS(.v26)],
dependencies: [
// Keep in step with project.yml.
.package(url: "https://github.com/thaw-app/ThawUI", exact: "1.5.1"),
.package(url: "https://github.com/sparkle-project/Sparkle", exact: "2.10.0"),
.package(url: "https://github.com/swiftlang/swift-subprocess", exact: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-markdown", exact: "0.9.0"),
.package(url: "https://github.com/apple/swift-argument-parser", exact: "1.8.2"),
.package(url: "https://github.com/apple/swift-algorithms", exact: "1.2.1"),
.package(url: "https://github.com/apple/swift-async-algorithms", exact: "1.1.3"),
// Held back because 1.7 does not build with the Xcode 27 beta.
.package(url: "https://github.com/apple/swift-collections", exact: "1.6.0"),
.package(url: "https://github.com/apple/swift-http-types", exact: "1.8.0"),
.package(path: "Vendor/FloeRust"),
],
targets: [
.executableTarget(
name: "Floe",
dependencies: [
"ThawUI",
.product(name: "Sparkle", package: "Sparkle"),
.product(name: "Subprocess", package: "swift-subprocess"),
.product(name: "Markdown", package: "swift-markdown"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Algorithms", package: "swift-algorithms"),
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
.product(name: "DequeModule", package: "swift-collections"),
.product(name: "HTTPTypesFoundation", package: "swift-http-types"),
.product(name: "FloeRust", package: "FloeRust"),
],
resources: [.process("Resources")],
swiftSettings: concurrency
),
// The test bundle links the app's code, so it loads Sparkle.framework too. SwiftPM puts the
// framework beside the bundle, three levels above the bundle's binary, and adds no rpath for it.
.testTarget(
name: "FloeTests",
dependencies: [
"Floe",
"ThawUI",
.product(name: "FloeRust", package: "FloeRust"),
],
swiftSettings: concurrency,
linkerSettings: [
.unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@loader_path/../../.."]),
]
),
]
)