-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
127 lines (123 loc) · 4.8 KB
/
Package.swift
File metadata and controls
127 lines (123 loc) · 4.8 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// swift-tools-version:6.2
//===----------------------------------------------------------------------===//
//
// This source file is part of the DynamoDBTables open source project
//
// This file is forked from
// https://github.com/amzn/smoke-dynamodb/Package.swift.
// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Licensed under Apache License v2.0
//
// Changes specified by
// https://github.com/swift-server-community/dynamo-db-tables/compare/9ab0e7a..main
// Copyright (c) 2026 the DynamoDBTables authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of DynamoDBTables authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CompilerPluginSupport
import PackageDescription
let swiftSettings: [SwiftSetting] = []
let package = Package(
name: "dynamo-db-tables",
platforms: [
.macOS(.v15), .iOS(.v18), .watchOS(.v11), .tvOS(.v18),
],
products: [
.library(
name: "DynamoDBTables",
targets: ["DynamoDBTables"]
),
.library(
name: "DynamoDBTablesAWS",
targets: ["DynamoDBTablesAWS"]
),
.library(
name: "DynamoDBTablesSoto",
targets: ["DynamoDBTablesSoto"]
),
],
traits: [
.default(enabledTraits: ["AWSSDK"]),
.trait(name: "AWSSDK"),
.trait(name: "SOTOSDK"),
],
dependencies: [
.package(url: "https://github.com/awslabs/aws-sdk-swift.git", from: "1.0.0"),
.package(url: "https://github.com/soto-project/soto.git", from: "7.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-metrics.git", "1.0.0"..<"3.0.0"),
.package(url: "https://github.com/apple/swift-configuration.git", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"603.0.0"),
.package(url: "https://github.com/tachyonics/smockable", from: "1.0.0-rc.2"),
.package(url: "https://github.com/tachyonics/swift-local-containers", from: "0.6.0"),
],
targets: [
.macro(
name: "DynamoDBTablesMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
.target(
name: "DynamoDBTables",
dependencies: [
.target(name: "DynamoDBTablesMacros"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Metrics", package: "swift-metrics"),
.product(name: "Configuration", package: "swift-configuration"),
],
swiftSettings: swiftSettings
),
.target(
name: "DynamoDBTablesAWS",
dependencies: [
.target(name: "DynamoDBTables"),
.product(name: "AWSDynamoDB", package: "aws-sdk-swift", condition: .when(traits: ["AWSSDK"])),
],
swiftSettings: swiftSettings
),
.target(
name: "DynamoDBTablesSoto",
dependencies: [
.target(name: "DynamoDBTables"),
.product(name: "SotoDynamoDB", package: "soto", condition: .when(traits: ["SOTOSDK"])),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "DynamoDBTablesTests",
dependencies: [
.target(name: "DynamoDBTables"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
.product(name: "Smockable", package: "smockable"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "DynamoDBTablesMacrosTests",
dependencies: [
.target(name: "DynamoDBTablesMacros"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "IntegrationTests",
dependencies: [
.target(name: "DynamoDBTables"),
.target(name: "DynamoDBTablesAWS", condition: .when(traits: ["AWSSDK"])),
.target(name: "DynamoDBTablesSoto", condition: .when(traits: ["SOTOSDK"])),
.product(name: "ContainerMacrosLib", package: "swift-local-containers"),
.product(name: "ContainerTestSupport", package: "swift-local-containers"),
],
swiftSettings: swiftSettings,
plugins: [.plugin(name: "ContainerCodeGen", package: "swift-local-containers")]
),
]
)