2026-05-15 17:05:13 -07:00
|
|
|
// swift-tools-version: 5.9
|
|
|
|
|
import PackageDescription
|
|
|
|
|
|
|
|
|
|
let package = Package(
|
|
|
|
|
name: "MacSync",
|
|
|
|
|
platforms: [
|
|
|
|
|
.macOS(.v13)
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
.package(path: "../../@packages/@swift/@macos/agent-core"),
|
|
|
|
|
.package(path: "../../@packages/@swift/@macos/menu-bar"),
|
|
|
|
|
.package(path: "../../@packages/@swift/@macos/sync-framework"),
|
|
|
|
|
.package(path: "../../@packages/@swift/@foundations/logging"),
|
|
|
|
|
.package(path: "../../@packages/@swift/@foundations/settings"),
|
|
|
|
|
.package(path: "../../@packages/@tray/tray-resources"),
|
|
|
|
|
.package(url: "https://github.com/groue/GRDB.swift.git", from: "6.24.0"),
|
|
|
|
|
.package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.9.0"),
|
|
|
|
|
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "5.0.0"),
|
|
|
|
|
.package(url: "https://github.com/httpswift/swifter.git", from: "1.5.0"),
|
|
|
|
|
],
|
|
|
|
|
targets: [
|
|
|
|
|
// MARK: Shared infrastructure
|
|
|
|
|
.target(
|
|
|
|
|
name: "MacSyncShared",
|
|
|
|
|
dependencies: [
|
|
|
|
|
.product(name: "LilithAgentCore", package: "agent-core"),
|
|
|
|
|
.product(name: "LilithMenuBar", package: "menu-bar"),
|
|
|
|
|
.product(name: "LilithSyncFramework", package: "sync-framework"),
|
|
|
|
|
.product(name: "LilithLogging", package: "logging"),
|
|
|
|
|
.product(name: "LilithSettings", package: "settings"),
|
|
|
|
|
.product(name: "LilithTrayResources", package: "tray-resources"),
|
|
|
|
|
.product(name: "Alamofire", package: "Alamofire"),
|
|
|
|
|
.product(name: "SwiftyJSON", package: "SwiftyJSON"),
|
|
|
|
|
.product(name: "Swifter", package: "swifter"),
|
|
|
|
|
],
|
2026-05-15 17:05:39 -07:00
|
|
|
path: "@packages/shared/Sources/MacSyncShared",
|
|
|
|
|
linkerSettings: [
|
|
|
|
|
.linkedFramework("Contacts"),
|
|
|
|
|
.linkedFramework("Photos"),
|
|
|
|
|
.linkedFramework("EventKit"),
|
|
|
|
|
.linkedFramework("ScriptingBridge"),
|
|
|
|
|
]
|
2026-05-15 17:05:13 -07:00
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iMessage module
|
|
|
|
|
.target(
|
|
|
|
|
name: "IMessageSync",
|
|
|
|
|
dependencies: [
|
|
|
|
|
"MacSyncShared",
|
|
|
|
|
.product(name: "GRDB", package: "GRDB.swift"),
|
|
|
|
|
],
|
|
|
|
|
path: "@packages/imessage/Sources/IMessageSync"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iPhoto module
|
|
|
|
|
.target(
|
|
|
|
|
name: "IPhotoSync",
|
|
|
|
|
dependencies: [
|
|
|
|
|
"MacSyncShared",
|
|
|
|
|
.product(name: "GRDB", package: "GRDB.swift"),
|
|
|
|
|
],
|
|
|
|
|
path: "@packages/iphoto/Sources/IPhotoSync"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iMail module
|
|
|
|
|
.target(
|
|
|
|
|
name: "IMailSync",
|
|
|
|
|
dependencies: ["MacSyncShared"],
|
|
|
|
|
path: "@packages/imail/Sources/IMailSync",
|
|
|
|
|
linkerSettings: [
|
|
|
|
|
.linkedFramework("ScriptingBridge"),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iCal module
|
|
|
|
|
.target(
|
|
|
|
|
name: "ICalSync",
|
|
|
|
|
dependencies: ["MacSyncShared"],
|
|
|
|
|
path: "@packages/ical/Sources/ICalSync",
|
|
|
|
|
linkerSettings: [
|
|
|
|
|
.linkedFramework("EventKit"),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
2026-05-15 18:02:04 -07:00
|
|
|
// MARK: iReminders module
|
|
|
|
|
.target(
|
|
|
|
|
name: "IReminderSync",
|
|
|
|
|
dependencies: ["MacSyncShared"],
|
|
|
|
|
path: "@packages/ireminders/Sources/IReminderSync",
|
|
|
|
|
linkerSettings: [
|
|
|
|
|
.linkedFramework("EventKit"),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iNotes module
|
|
|
|
|
.target(
|
|
|
|
|
name: "INoteSync",
|
|
|
|
|
dependencies: ["MacSyncShared"],
|
|
|
|
|
path: "@packages/inotes/Sources/INoteSync"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: Pure-function contacts core (no Contacts framework — fully testable on Linux/CI)
|
2026-05-15 17:05:13 -07:00
|
|
|
.target(
|
2026-05-15 17:05:39 -07:00
|
|
|
name: "ContactsSyncCore",
|
|
|
|
|
dependencies: [],
|
|
|
|
|
path: "@packages/contacts-sync-core/Sources/ContactsSyncCore"
|
2026-05-15 17:05:13 -07:00
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: App executable
|
|
|
|
|
.executableTarget(
|
|
|
|
|
name: "MacSyncApp",
|
|
|
|
|
dependencies: [
|
|
|
|
|
"MacSyncShared",
|
2026-05-15 17:05:39 -07:00
|
|
|
"ContactsSyncCore",
|
2026-05-15 17:05:13 -07:00
|
|
|
"IMessageSync",
|
|
|
|
|
"IPhotoSync",
|
|
|
|
|
"IMailSync",
|
|
|
|
|
"ICalSync",
|
2026-05-15 18:02:04 -07:00
|
|
|
"IReminderSync",
|
|
|
|
|
"INoteSync",
|
2026-05-15 17:05:13 -07:00
|
|
|
],
|
|
|
|
|
path: "src/client",
|
|
|
|
|
exclude: ["Resources"]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "MacSyncSharedTests",
|
|
|
|
|
dependencies: ["MacSyncShared"],
|
|
|
|
|
path: "@packages/shared/Tests/MacSyncSharedTests"
|
|
|
|
|
),
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "IMessageSyncTests",
|
|
|
|
|
dependencies: ["IMessageSync"],
|
|
|
|
|
path: "@packages/imessage/Tests/IMessageSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iPhoto Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "IPhotoSyncTests",
|
|
|
|
|
dependencies: ["IPhotoSync"],
|
|
|
|
|
path: "@packages/iphoto/Tests/IPhotoSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iMail Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "IMailSyncTests",
|
|
|
|
|
dependencies: ["IMailSync"],
|
|
|
|
|
path: "@packages/imail/Tests/IMailSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iCal Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "ICalSyncTests",
|
|
|
|
|
dependencies: ["ICalSync"],
|
|
|
|
|
path: "@packages/ical/Tests/ICalSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
2026-05-15 18:02:04 -07:00
|
|
|
// MARK: iReminders Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "IReminderSyncTests",
|
|
|
|
|
dependencies: ["IReminderSync"],
|
|
|
|
|
path: "@packages/ireminders/Tests/IReminderSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// MARK: iNotes Tests
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "INoteSyncTests",
|
|
|
|
|
dependencies: ["INoteSync", "MacSyncShared"],
|
|
|
|
|
path: "@packages/inotes/Tests/INoteSyncTests"
|
|
|
|
|
),
|
|
|
|
|
|
2026-05-15 17:05:39 -07:00
|
|
|
// MARK: ContactsSyncCore Tests (pure functions — no Contacts framework required)
|
2026-05-15 17:05:13 -07:00
|
|
|
.testTarget(
|
2026-05-15 17:05:39 -07:00
|
|
|
name: "ContactsSyncCoreTests",
|
|
|
|
|
dependencies: ["ContactsSyncCore"],
|
|
|
|
|
path: "@packages/contacts-sync-core/Tests/ContactsSyncCoreTests"
|
2026-05-15 17:05:13 -07:00
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
)
|