Skip to content

Commit 63de883

Browse files
committed
Apply package traits
1 parent 61cd5d5 commit 63de883

File tree

111 files changed

+304
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+304
-283
lines changed

Package.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.1
22

33
import PackageDescription
44

@@ -8,34 +8,38 @@ let package = Package(
88
products: [
99
// this library exports `AWSLambdaRuntimeCore` and adds Foundation convenience methods
1010
.library(name: "AWSLambdaRuntime", targets: ["AWSLambdaRuntime"]),
11-
// this has all the main functionality for lambda and it does not link Foundation
12-
.library(name: "AWSLambdaRuntimeCore", targets: ["AWSLambdaRuntimeCore"]),
1311
// plugin to package the lambda, creating an archive that can be uploaded to AWS
1412
// requires Linux or at least macOS v15
1513
.plugin(name: "AWSLambdaPackager", targets: ["AWSLambdaPackager"]),
1614
// for testing only
1715
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
1816
],
17+
traits: [
18+
"FoundationJSONSupport",
19+
"ServiceLifecycleSupport",
20+
"LocalServerSupport",
21+
.default(
22+
enabledTraits: [
23+
"FoundationJSONSupport",
24+
"ServiceLifecycleSupport",
25+
"LocalServerSupport",
26+
]
27+
)
28+
],
1929
dependencies: [
2030
.package(url: "https://github.com/apple/swift-nio.git", from: "2.81.0"),
2131
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
2232
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.4"),
33+
.package(url: "https://github.com/apple/swift-service-lifecycle.git", from: "2.6.3", traits: ["ServiceLifecycleSupport"]),
2334
],
2435
targets: [
2536
.target(
2637
name: "AWSLambdaRuntime",
2738
dependencies: [
28-
.byName(name: "AWSLambdaRuntimeCore"),
2939
.product(name: "NIOCore", package: "swift-nio"),
30-
]
31-
),
32-
.target(
33-
name: "AWSLambdaRuntimeCore",
34-
dependencies: [
3540
.product(name: "DequeModule", package: "swift-collections"),
3641
.product(name: "Logging", package: "swift-log"),
3742
.product(name: "NIOHTTP1", package: "swift-nio"),
38-
.product(name: "NIOCore", package: "swift-nio"),
3943
.product(name: "NIOPosix", package: "swift-nio"),
4044
]
4145
),
@@ -58,15 +62,15 @@ let package = Package(
5862
.testTarget(
5963
name: "AWSLambdaRuntimeCoreTests",
6064
dependencies: [
61-
.byName(name: "AWSLambdaRuntimeCore"),
65+
.byName(name: "AWSLambdaRuntime"),
6266
.product(name: "NIOTestUtils", package: "swift-nio"),
6367
.product(name: "NIOFoundationCompat", package: "swift-nio"),
6468
]
6569
),
6670
.testTarget(
6771
name: "AWSLambdaRuntimeTests",
6872
dependencies: [
69-
.byName(name: "AWSLambdaRuntimeCore"),
73+
// .byName(name: "AWSLambdaRuntimeCore"),
7074
.byName(name: "AWSLambdaRuntime"),
7175
]
7276
),

0 commit comments

Comments
 (0)