-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPackage.swift
More file actions
68 lines (66 loc) · 2.58 KB
/
Package.swift
File metadata and controls
68 lines (66 loc) · 2.58 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
// swift-tools-version:6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "{{hbPackageName}}",
{{^hbLambda}}
platforms: [.macOS(.v15), .iOS(.v18), .tvOS(.v18)],
{{/hbLambda}}
{{#hbLambda}}
platforms: [.macOS(.v15)],
{{/hbLambda}}
products: [
.executable(name: "{{hbExecutableName}}", targets: ["{{hbExecutableName}}"]),
],
dependencies: [
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"),
{{#hbLambda}}
.package(url: "https://github.com/hummingbird-project/hummingbird-lambda.git", from: "2.0.0"),
{{/hbLambda}}
.package(url: "https://github.com/apple/swift-configuration.git", from: "1.0.0", traits: [.defaults, "CommandLineArguments"]),
{{#hbOpenAPI}}
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.6.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.7.0"),
.package(url: "https://github.com/hummingbird-project/swift-openapi-hummingbird.git", from: "2.0.1"),
{{/hbOpenAPI}}
],
targets: [
.executableTarget(name: "{{hbExecutableName}}",
dependencies: [
.product(name: "Configuration", package: "swift-configuration"),
.product(name: "Hummingbird", package: "hummingbird"),
{{#hbLambda}}
.product(name: "HummingbirdLambda", package: "hummingbird-lambda"),
{{/hbLambda}}
{{#hbOpenAPI}}
.byName(name: "{{hbExecutableName}}API"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIHummingbird", package: "swift-openapi-hummingbird"),
{{/hbOpenAPI}}
],
path: "Sources/App"
),
{{#hbOpenAPI}}
.target(
name: "{{hbExecutableName}}API",
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime")
],
path: "Sources/AppAPI",
plugins: [.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator")]
),
{{/hbOpenAPI}}
.testTarget(name: "{{hbExecutableName}}Tests",
dependencies: [
.byName(name: "{{hbExecutableName}}"),
{{^hbLambda}}
.product(name: "HummingbirdTesting", package: "hummingbird")
{{/hbLambda}}
{{#hbLambda}}
.product(name: "HummingbirdLambdaTesting", package: "hummingbird-lambda"),
{{/hbLambda}}
],
path: "Tests/AppTests"
)
]
)