-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
71 lines (68 loc) · 2.35 KB
/
Copy pathPackage.swift
File metadata and controls
71 lines (68 loc) · 2.35 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
// swift-tools-version: 6.1
import Foundation
import PackageDescription
let package = Package(
name: "sqlite-undo",
platforms: [
.iOS(.v16),
.macOS(.v13),
],
products: [
.library(name: "SQLiteUndo", targets: ["SQLiteUndo"])
],
traits: [
.trait(
name: "ComposableArchitecture",
description: "Enable undo support for the Composable Architecture"
)
],
dependencies: [
.package(
url: "https://github.com/pointfreeco/swift-composable-architecture.git",
from: "1.25.0"
),
.package(url: "https://github.com/pointfreeco/swift-custom-dump.git", from: "1.3.3"),
.package(url: "https://github.com/pointfreeco/swift-dependencies.git", from: "1.9.5"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.18.7"),
.package(url: "https://github.com/pointfreeco/sqlite-data.git", from: "1.10.0"),
],
targets: [
.target(
name: "SQLiteUndo",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "DependenciesMacros", package: "swift-dependencies"),
.product(name: "SQLiteData", package: "sqlite-data"),
.product(
name: "ComposableArchitecture",
package: "swift-composable-architecture",
condition: .when(traits: ["ComposableArchitecture"])
),
]
),
.testTarget(
name: "SQLiteUndoTests",
dependencies: [
"SQLiteUndo",
.product(name: "CustomDump", package: "swift-custom-dump"),
.product(name: "DependenciesTestSupport", package: "swift-dependencies"),
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
.product(name: "SQLiteDataTestSupport", package: "sqlite-data"),
.product(name: "SnapshotTestingCustomDump", package: "swift-snapshot-testing"),
.product(
name: "ComposableArchitecture",
package: "swift-composable-architecture",
condition: .when(traits: ["ComposableArchitecture"])
),
]
),
]
)
// NB: Xcode provides no way to select traits for the package you have open, so
// uncomment the '|| true' below to work on the trait-gated code there.
if ProcessInfo.processInfo.environment["SPI_GENERATE_DOCS"] != nil // || true
{
package.traits.insert(
.default(enabledTraits: ["ComposableArchitecture"])
)
}