-
Notifications
You must be signed in to change notification settings - Fork 10
/
Package.swift
154 lines (151 loc) · 5.23 KB
/
Package.swift
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
#if os(Linux)
var dependencies: [Package.Dependency] = [
.package(
name: "FlatBuffers", url: "https://github.com/google/flatbuffers.git",
.revision("c92e78a9f841a6110ec27180d68d1f7f2afda21d")),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
.package(
name: "SQLite3", url: "https://github.com/liuliu/swift-sqlite3-support.git", from: "3.47.1"),
]
let sqliteDflatDependencies: [Target.Dependency] = ["Dflat", "_SQLiteDflatOSShim", "SQLite3"]
#else
var dependencies: [Package.Dependency] = [
.package(
name: "FlatBuffers", url: "https://github.com/google/flatbuffers.git",
.revision("c92e78a9f841a6110ec27180d68d1f7f2afda21d")),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
]
let sqliteDflatDependencies: [Target.Dependency] = ["Dflat", "_SQLiteDflatOSShim"]
#endif
#if swift(>=5.6)
dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"))
#endif
let package = Package(
name: "Dflat",
platforms: [.macOS(.v10_14), .iOS(.v11), .watchOS(.v3), .tvOS(.v10)],
products: [
.library(name: "Dflat", type: .static, targets: ["Dflat"]),
.library(name: "SQLiteDflat", type: .static, targets: ["SQLiteDflat"]),
],
dependencies: dependencies,
targets: [
.target(
name: "Dflat",
dependencies: ["FlatBuffers", .product(name: "Atomics", package: "swift-atomics")],
path: "src",
sources: [
"Atom.swift",
"ChangeRequest.swift",
"Expr.swift",
"FetchedResult.swift",
"FlatBuffersCodable.swift",
"Publisher.swift",
"QueryBuilder.swift",
"SQLiteExpr.swift",
"TransactionContext.swift",
"Workspace.swift",
"exprs/Addition.swift",
"exprs/Field.swift",
"exprs/In.swift",
"exprs/LessThan.swift",
"exprs/Not.swift",
"exprs/Or.swift",
"exprs/And.swift",
"exprs/IsNotNull.swift",
"exprs/LessThanOrEqualTo.swift",
"exprs/NotEqualTo.swift",
"exprs/Subtraction.swift",
"exprs/EqualTo.swift",
"exprs/IsNull.swift",
"exprs/Mod.swift",
"exprs/NotIn.swift",
"exprs/Value.swift",
"exprs/sqlite/SQLiteAddition.swift",
"exprs/sqlite/SQLiteField.swift",
"exprs/sqlite/SQLiteIn.swift",
"exprs/sqlite/SQLiteLessThan.swift",
"exprs/sqlite/SQLiteNot.swift",
"exprs/sqlite/SQLiteOr.swift",
"exprs/sqlite/SQLiteAnd.swift",
"exprs/sqlite/SQLiteIsNotNull.swift",
"exprs/sqlite/SQLiteLessThanOrEqualTo.swift",
"exprs/sqlite/SQLiteNotEqualTo.swift",
"exprs/sqlite/SQLiteSubtraction.swift",
"exprs/sqlite/SQLiteEqualTo.swift",
"exprs/sqlite/SQLiteIsNull.swift",
"exprs/sqlite/SQLiteMod.swift",
"exprs/sqlite/SQLiteNotIn.swift",
"exprs/sqlite/SQLiteValue.swift",
]),
.target(
name: "_SQLiteDflatOSShim",
path: "src/sqlite",
sources: [
"os.c"
],
publicHeadersPath: "include"),
.target(
name: "SQLiteDflat",
dependencies: sqliteDflatDependencies,
path: "src/sqlite",
sources: [
"dict/dict_data_model_generated.swift",
"dict/dict_generated.swift",
"dict/dict_mutating_generated.swift",
"dict/dict_query_generated.swift",
"SQLiteAtom.swift",
"SQLiteConnection.swift",
"SQLiteConnectionPool.swift",
"SQLiteExpr.swift",
"SQLiteFetchedResult.swift",
"SQLiteObjectRepository.swift",
"SQLitePersistenceToolbox.swift",
"SQLitePublisher.swift",
"SQLiteQueryBuilder.swift",
"SQLiteResultPublisher.swift",
"SQLiteTableSpace.swift",
"SQLiteTableState.swift",
"SQLiteTransactionContext.swift",
"SQLiteValue.swift",
"SQLiteWorkspace.swift",
"SQLiteWorkspaceDictionary.swift",
"SQLiteWorkspaceState.swift",
"OSShim.swift",
]),
.testTarget(
name: "Tests",
dependencies: ["SQLiteDflat"],
path: "src/tests",
sources: [
"AsyncTests.swift",
"ConcurrencyTests.swift",
"DictionaryTests.swift",
"ExprTests.swift",
"FetchTests.swift",
"namespace.swift",
"monster_generated.swift",
"monster_data_model_generated.swift",
"monster_mutating_generated.swift",
"monster_query_generated.swift",
"orb_weapon_generated.swift",
"orb_weapon_data_model_generated.swift",
"orb_weapon_mutating_generated.swift",
"monster_v2_generated.swift",
"monster_v2_data_model_generated.swift",
"monster_v2_mutating_generated.swift",
"monster_v2_query_generated.swift",
"monster_v3_generated.swift",
"monster_v3_data_model_generated.swift",
"monster_v3_mutating_generated.swift",
"monster_v3_query_generated.swift",
"ObjectRepositoryTests.swift",
"SchemaUpgradeTests.swift",
"SerialTests.swift",
"SQLiteWorkspaceCRUDTests.swift",
"SubscribeTests.swift",
]),
]
)