-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPackage.swift
More file actions
115 lines (106 loc) · 5.15 KB
/
Copy pathPackage.swift
File metadata and controls
115 lines (106 loc) · 5.15 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// swift-tools-version: 6.2
//
// Zhip — root SPM package.
//
// Single flat manifest at repo root. The `Zhip.xcodeproj` (generated by
// XcodeGen) consumes the products from this package; the iOS-app target
// itself is an ultra-tiny shell that just calls into the `AppFeature`
// product's public bootstrap.
//
// Library products:
//
// Validation reactive validation framework
// Resources bundled fonts/html/audio (Bundle.module)
// AppFeature everything else — the Zhip app itself
// (Coordinators, Scenes, Views, ViewModels,
// Models, UseCases, Persistence, ...).
//
// The reactive-MVVM scaffolding (formerly `SingleLineController*`) lives
// in a sibling repo, consumed below as the `NanoViewController` package.
import PackageDescription
let package = Package(
name: "Zhip",
// Required by SPM when any target ships localized resources (.xcstrings etc.).
// The Resources/AppFeature targets host the .xcstrings catalogs.
defaultLocalization: "en",
// macOS 14 listed alongside iOS so `swift build` / `swift test` on a
// macOS host can exercise the Combine APIs. The actual app is iOS-only;
// the macOS minimum exists only for the package's own host-side runs.
// iOS 26 matches NanoViewController's `@MainActor` isolation model
// (UIView/UIViewController are SDK-level @MainActor in iOS 26).
platforms: [.iOS(.v26), .macOS(.v14)],
products: [
// Reactive validation framework.
.library(name: "Validation", targets: ["Validation"]),
// Bundled resources (fonts, html, audio) routed through Bundle.module.
.library(name: "Resources", targets: ["Resources"]),
// The Zhip app itself, minus the iOS-app shell.
.library(name: "AppFeature", targets: ["AppFeature"]),
],
dependencies: [
// Reactive-MVVM scaffolding extracted from this repo (was the
// `SingleLineController*` modules). Pinned to a tagged release;
// bump as new tags ship.
.package(url: "https://github.com/Sajjon/NanoViewController", exact: "0.1.6"),
// Third-party SPM deps consumed by AppFeature. Versions mirror the
// Zhip.xcodeproj's previous package references.
.package(url: "https://github.com/OpenZesame/Zesame", from: "2.1.1"),
.package(url: "https://github.com/Skyscanner/SkyFloatingLabelTextField", from: "4.0.0"),
.package(url: "https://github.com/yannickl/QRCodeReader.swift", from: "10.1.1"),
.package(url: "https://github.com/evgenyneu/keychain-swift", from: "19.0.0"),
.package(url: "https://github.com/hmlongco/Factory", from: "2.4.0"),
],
targets: [
// MARK: - Validation
.target(
name: "Validation",
dependencies: [
.product(name: "NanoViewControllerCore", package: "NanoViewController"),
.product(name: "NanoViewControllerCombine", package: "NanoViewController"),
]
),
// MARK: - Resources
.target(
name: "Resources",
// Resources/ subdir is implicitly processed by SPM.
resources: [
.process("Resources"),
]
),
// MARK: - AppFeature
.target(
name: "AppFeature",
dependencies: [
// NanoViewController stack (sibling repo).
.product(name: "NanoViewControllerCore", package: "NanoViewController"),
.product(name: "NanoViewControllerCombine", package: "NanoViewController"),
.product(name: "NanoViewControllerNavigation", package: "NanoViewController"),
.product(name: "NanoViewControllerController", package: "NanoViewController"),
.product(name: "NanoViewControllerSceneViews", package: "NanoViewController"),
.product(name: "NanoViewControllerDIPrimitives", package: "NanoViewController"),
"Validation",
"Resources",
// Third-party SPM products
.product(name: "Zesame", package: "Zesame"),
.product(name: "SkyFloatingLabelTextField", package: "SkyFloatingLabelTextField"),
.product(name: "QRCodeReader", package: "QRCodeReader.swift"),
.product(name: "KeychainSwift", package: "keychain-swift"),
.product(name: "Factory", package: "Factory"),
],
resources: [
// .xcstrings catalogs auto-generate `String.LocalizationValue.<Catalog>`
// symbols scoped to this module.
.process("Localization"),
// Asset catalog (Images/Icons) auto-generates `ImageResource.<name>`
// symbols. AppIcon.appiconset stays in App/Assets.xcassets because
// ASSETCATALOG_COMPILER_APPICON_NAME on the iOS-app target needs it.
.process("Resources/Assets.xcassets"),
]
),
// MARK: - Test targets
.testTarget(
name: "ValidationTests",
dependencies: ["Validation"]
),
]
)