forked from maticzav/swift-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
114 lines (106 loc) · 3.92 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
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "swift-graphql",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6)
],
products: [
// SwiftGraphQL
.library(name: "SwiftGraphQL", targets: ["SwiftGraphQL"]),
.library(name: "SwiftGraphQLClient", targets: ["SwiftGraphQLClient"]),
.library(name: "SwiftGraphQLCodegen", targets: ["SwiftGraphQLCodegen"]),
// CLI
.executable( name: "swift-graphql", targets: ["SwiftGraphQLCLI"]),
// Utilities
.library(name: "GraphQL", targets: ["GraphQL"]),
.library(name: "GraphQLAST", targets: ["GraphQLAST"]),
.library(name: "GraphQLWebSocket", targets: ["GraphQLWebSocket"])
],
dependencies: [
// .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-format", from: "0.50600.1"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.0"),
.package(url: "https://github.com/dominicegginton/Spinner", from: "1.0.0"),
.package(url: "https://github.com/JohnSundell/Files", from: "4.0.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "4.0.4"),
],
targets: [
// Spec
.target(name: "GraphQL", dependencies: [], path: "Sources/GraphQL"),
.target(name: "GraphQLAST", dependencies: [], path: "Sources/GraphQLAST"),
.target(
name: "GraphQLWebSocket",
dependencies: [
"GraphQL",
.product(name: "Logging", package: "swift-log"),
"Starscream"
],
path: "Sources/GraphQLWebSocket",
exclude: ["README.md"]
),
// SwiftGraphQL
.target(
name: "SwiftGraphQL",
dependencies: ["GraphQL", "SwiftGraphQLUtils"],
path: "Sources/SwiftGraphQL"
),
.target(
name: "SwiftGraphQLClient",
dependencies: [
"GraphQL",
"GraphQLWebSocket",
.product(name: "Logging", package: "swift-log"),
"SwiftGraphQL",
],
path: "Sources/SwiftGraphQLClient"
),
.target(
name: "SwiftGraphQLCodegen",
dependencies: [
"GraphQLAST",
.product(name: "SwiftFormat", package: "swift-format"),
.product(name: "SwiftFormatConfiguration", package: "swift-format"),
"SwiftGraphQLUtils"
],
path: "Sources/SwiftGraphQLCodegen"
),
.target(name: "SwiftGraphQLUtils", dependencies: [], path: "Sources/SwiftGraphQLUtils"),
// Executables
.executableTarget(
name: "SwiftGraphQLCLI",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"Files",
"Spinner",
"SwiftGraphQLCodegen",
"Yams",
],
path: "Sources/SwiftGraphQLCLI"
),
// Tests
.testTarget(
name: "SwiftGraphQLTests",
dependencies: [
"Files",
"GraphQL",
"GraphQLAST",
"GraphQLWebSocket",
"SwiftGraphQLCodegen",
"SwiftGraphQL",
"SwiftGraphQLClient",
"SwiftGraphQLUtils",
],
path: "Tests",
exclude: [
"SwiftGraphQLCodegenTests/Integration/schema.json",
"SwiftGraphQLCodegenTests/Integration/swiftgraphql.yml",
]
)
]
)