1
- // swift-tools-version:6.0
1
+ // swift-tools-version:6.1
2
2
3
3
import PackageDescription
4
4
@@ -8,34 +8,38 @@ let package = Package(
8
8
products: [
9
9
// this library exports `AWSLambdaRuntimeCore` and adds Foundation convenience methods
10
10
. 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 " ] ) ,
13
11
// plugin to package the lambda, creating an archive that can be uploaded to AWS
14
12
// requires Linux or at least macOS v15
15
13
. plugin( name: " AWSLambdaPackager " , targets: [ " AWSLambdaPackager " ] ) ,
16
14
// for testing only
17
15
. library( name: " AWSLambdaTesting " , targets: [ " AWSLambdaTesting " ] ) ,
18
16
] ,
17
+ traits: [
18
+ " FoundationJSONSupport " ,
19
+ " ServiceLifecycleSupport " ,
20
+ " LocalServerSupport " ,
21
+ . default(
22
+ enabledTraits: [
23
+ " FoundationJSONSupport " ,
24
+ " ServiceLifecycleSupport " ,
25
+ " LocalServerSupport " ,
26
+ ]
27
+ )
28
+ ] ,
19
29
dependencies: [
20
30
. package ( url: " https://github.com/apple/swift-nio.git " , from: " 2.81.0 " ) ,
21
31
. package ( url: " https://github.com/apple/swift-log.git " , from: " 1.5.4 " ) ,
22
32
. 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 " ] ) ,
23
34
] ,
24
35
targets: [
25
36
. target(
26
37
name: " AWSLambdaRuntime " ,
27
38
dependencies: [
28
- . byName( name: " AWSLambdaRuntimeCore " ) ,
29
39
. product( name: " NIOCore " , package : " swift-nio " ) ,
30
- ]
31
- ) ,
32
- . target(
33
- name: " AWSLambdaRuntimeCore " ,
34
- dependencies: [
35
40
. product( name: " DequeModule " , package : " swift-collections " ) ,
36
41
. product( name: " Logging " , package : " swift-log " ) ,
37
42
. product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
38
- . product( name: " NIOCore " , package : " swift-nio " ) ,
39
43
. product( name: " NIOPosix " , package : " swift-nio " ) ,
40
44
]
41
45
) ,
@@ -58,15 +62,15 @@ let package = Package(
58
62
. testTarget(
59
63
name: " AWSLambdaRuntimeCoreTests " ,
60
64
dependencies: [
61
- . byName( name: " AWSLambdaRuntimeCore " ) ,
65
+ . byName( name: " AWSLambdaRuntime " ) ,
62
66
. product( name: " NIOTestUtils " , package : " swift-nio " ) ,
63
67
. product( name: " NIOFoundationCompat " , package : " swift-nio " ) ,
64
68
]
65
69
) ,
66
70
. testTarget(
67
71
name: " AWSLambdaRuntimeTests " ,
68
72
dependencies: [
69
- . byName( name: " AWSLambdaRuntimeCore " ) ,
73
+ // .byName(name: "AWSLambdaRuntimeCore"),
70
74
. byName( name: " AWSLambdaRuntime " ) ,
71
75
]
72
76
) ,
0 commit comments