-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
60 lines (58 loc) · 2.75 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
// swift-tools-version:5.2
import PackageDescription
// Disable availability checking to use concurrency API on macOS for development purpose
// SwiftNIO exposes concurrency API with availability for deployment environment,
// but in our use case, the deployment target is Linux, and we only use macOS while development,
// so it's always safe to disable the checking in this situation.
let swiftSettings: [SwiftSetting] = [
.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])
]
let package = Package(
name: "rocket-api",
platforms: [
.macOS(.v10_15),
],
products: [
.executable(name: "Run", targets: ["Run"]),
],
dependencies: [
// 💧 A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "4.54.0"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.4.0"),
.package(url: "https://github.com/vapor/jwt-kit.git", from: "4.3.0"),
.package(url: "https://github.com/kateinoigakukun/StubKit.git", from: "0.1.6"),
.package(url: "https://github.com/MaxDesiatov/XMLCoder.git", from: "0.12.0"),
.package(url: "https://github.com/tid-kijyun/Kanna.git", from: "5.2.2"),
.package(path: "Modules/LoggingDiscord"),
.package(path: "Modules/Core"),
.package(path: "Modules/Endpoint"),
],
targets: [
.target(
name: "App",
dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "XMLCoder", package: "XMLCoder"),
.product(name: "Kanna", package: "Kanna"),
.product(name: "Fluent", package: "fluent"),
.product(name: "JWTKit", package: "jwt-kit"),
.product(name: "Persistance", package: "Core"),
.product(name: "Service", package: "Core"),
.product(name: "Endpoint", package: "Endpoint"),
.product(name: "LoggingDiscord", package: "LoggingDiscord")
],
swiftSettings: [
// Enable better optimizations when building in Release configuration. Despite the use of
// the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
// builds. See <https://github.com/swift-server/guides#building-for-production> for details.
.unsafeFlags(["-cross-module-optimization"], .when(configuration: .release)),
] + swiftSettings
),
.target(name: "Run", dependencies: [.target(name: "App")]),
.testTarget(name: "AppTests", dependencies: [
.target(name: "App"),
.product(name: "XCTVapor", package: "vapor"),
.product(name: "StubKit", package: "StubKit")
]),
]
)