forked from tddworks/ClaudeBar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
101 lines (97 loc) · 3.3 KB
/
Package.swift
File metadata and controls
101 lines (97 loc) · 3.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "ClaudeBar",
platforms: [
.macOS(.v15),
],
products: [
.executable(name: "ClaudeBar", targets: ["ClaudeBar"]),
.library(name: "Domain", targets: ["Domain"]),
.library(name: "Infrastructure", targets: ["Infrastructure"]),
],
dependencies: [
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.8.1"),
.package(url: "https://github.com/Kolos65/Mockable.git", from: "0.5.0"),
],
targets: [
// MARK: - Domain Layer (Rich domain models, business logic, ports)
// Uses domain-driven terminology: UsageQuota, AIProvider, QuotaMonitor
.target(
name: "Domain",
dependencies: [
.product(name: "Mockable", package: "Mockable"),
],
path: "Sources/Domain",
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency"),
.define("MOCKING", .when(configuration: .debug)),
]
),
// MARK: - Infrastructure Layer (Technical implementations)
// Uses technical terminology: PTYCommandRunner, JSONParser, FileSystem
.target(
name: "Infrastructure",
dependencies: [
"Domain",
.product(name: "Mockable", package: "Mockable"),
],
path: "Sources/Infrastructure",
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency"),
.define("MOCKING", .when(configuration: .debug)),
]
),
// MARK: - Main Application (UI directly exposes domain)
// SwiftUI views directly use rich domain models - no ViewModel layer
.executableTarget(
name: "ClaudeBar",
dependencies: [
"Domain",
"Infrastructure",
.product(name: "Sparkle", package: "Sparkle"),
],
path: "Sources/App",
exclude: [
"Info.plist",
"entitlements.plist",
"AppIcon.icns",
],
resources: [
.process("Resources"),
],
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency"),
.define("ENABLE_SPARKLE"),
]
),
// MARK: - Tests
.testTarget(
name: "DomainTests",
dependencies: [
"Domain",
.product(name: "Mockable", package: "Mockable"),
],
path: "Tests/DomainTests",
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency"),
.enableExperimentalFeature("Testing"),
.define("MOCKING"),
]
),
.testTarget(
name: "InfrastructureTests",
dependencies: [
"Infrastructure",
"Domain",
.product(name: "Mockable", package: "Mockable"),
],
path: "Tests/InfrastructureTests",
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency"),
.enableExperimentalFeature("Testing"),
.define("MOCKING"),
]
),
]
)