-
Notifications
You must be signed in to change notification settings - Fork 9
/
Package.swift
76 lines (73 loc) · 3.41 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
// swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "swiftarr",
platforms: [
.macOS(.v13)
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.99.3"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.9.0"),
.package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.8.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
.package(url: "https://github.com/vapor/redis.git", from: "4.10.0"),
.package(url: "https://github.com/vapor/leaf.git", from: "4.3.0"),
.package(url: "https://github.com/vapor/queues-redis-driver.git", from: "1.1.1"),
.package(url: "https://github.com/swift-server/swift-prometheus.git", from: "2.0.0-alpha"),
.package(url: "https://github.com/johnsundell/ink.git", from: "0.6.0"),
.package(url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMajor(from: "0.9.0")),
.package(url: "https://github.com/challfry/CoreXLSX.git", .upToNextMinor(from: "0.14.1")),
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.6.0"),
],
targets: [
.systemLibrary(name: "gd", pkgConfig: "gdlib", providers: [.apt(["libgd-dev"]), .brew(["gd"]), .yum(["gd-devel"])]),
.systemLibrary(name: "jpeg", pkgConfig: "libjpeg", providers: [.apt(["libjpeg-dev"]), .brew(["jpeg-turbo"]), .yum(["libjpeg-turbo-devel"])]),
.target(name: "gdOverrides", dependencies: ["gd", "jpeg"], publicHeadersPath: "."),
.executableTarget(
name: "swiftarr",
dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "FluentPostgresDriver", package: "fluent-postgres-driver"),
.product(name: "Redis", package: "redis"),
.product(name: "Leaf", package: "leaf"),
.product(name: "Vapor", package: "vapor"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "QueuesRedisDriver", package: "queues-redis-driver"),
.product(name: "Prometheus", package: "swift-prometheus"),
.product(name: "Ink", package: "ink"),
.product(name: "CoreXLSX", package: "CoreXLSX"),
.product(name: "SwiftSoup", package: "SwiftSoup"),
"gd",
"jpeg",
"gdOverrides",
"ZIPFoundation",
],
resources: [
.copy("Resources"),
.copy("seeds"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "AppTests",
dependencies: [
.target(name: "swiftarr"),
.product(name: "XCTVapor", package: "vapor")
],
swiftSettings: swiftSettings
)
],
cLanguageStandard: .c11
)
var swiftSettings: [SwiftSetting] { [
// .enableUpcomingFeature("StrictConcurrency"),
] }
/// Because I have discovered and forgotten this 3 times now, and because it's difficult to find the answer as it's Google-obscured:
///
/// To make changes to a package and test them in Swiftarr, checkout the package locally and replace the `.package(url:...)` line with `.package(path: "<filepath>")`.
/// Accessing the package this way also makes it not process any version restrictions.
/// The path is rooted at the Package.swift's directory, may include `../..` and can probably include absolute paths.
///
/// I'm calling this solution 'google-obscured' because there's tons of info out there on how to edit a package that's part of a `.xcodeproj` project file, and the method to do that
/// is very different than how to do it with a `Package.swift` project.