generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
100 lines (94 loc) · 3.16 KB
/
Package.swift
File metadata and controls
100 lines (94 loc) · 3.16 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
// swift-tools-version: 5.9
import Foundation
import PackageDescription
let package = Package(
name: "aws-sdk-swift-s3-transfer-manager",
platforms: [
.macOS(.v12),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6)
],
products: [
.library(
name: "S3TransferManager",
targets: ["S3TransferManager"]
),
],
dependencies: runtimeDependencies,
targets: [
.target(
name: "S3TransferManager",
dependencies: [
.product(name: "AWSS3", package: "aws-sdk-swift"),
.product(name: "AWSClientRuntime", package: "aws-sdk-swift"),
.product(name: "Smithy", package: "smithy-swift"),
.product(name: "SmithyHTTPAPI", package: "smithy-swift"),
.product(name: "SmithyStreams", package: "smithy-swift"),
.product(name: "ClientRuntime", package: "smithy-swift")
]
),
.target(
name: "TestUtil",
dependencies: [ .product(name: "AWSS3", package: "aws-sdk-swift") ]
),
.testTarget(
name: "TestUtilTests",
dependencies: [ "TestUtil" ]
),
.testTarget(
name: "S3TransferManagerUnitTests",
dependencies: [
"S3TransferManager",
"TestUtil",
.product(name: "AWSS3", package: "aws-sdk-swift"),
.product(name: "Smithy", package: "smithy-swift"),
.product(name: "SmithyStreams", package: "smithy-swift"),
],
path: "Tests",
exclude: [
"IntegrationTests",
"ConcurrentIntegrationTests",
"TestUtilTests"
],
sources: ["HelperFunctionUnitTests"]
),
.testTarget(
name: "S3TransferManagerIntegrationTests",
dependencies: [
"S3TransferManager",
"TestUtil",
.product(name: "AWSS3", package: "aws-sdk-swift"),
.product(name: "Smithy", package: "smithy-swift"),
.product(name: "SmithyStreams", package: "smithy-swift"),
],
path: "Tests",
exclude: [
"HelperFunctionUnitTests",
"TestUtilTests"
],
sources: [
"IntegrationTests",
"ConcurrentIntegrationTests",
]
)
]
)
private var runtimeDependencies: [Package.Dependency] {
let smithySwiftLocal = "../smithy-swift"
let smithySwiftGitURL = "https://github.com/smithy-lang/smithy-swift"
let awsSDKSwiftLocal = "../aws-sdk-swift"
let awsSDKSwiftGitURL = "https://github.com/awslabs/aws-sdk-swift.git"
let useLocalDeps = ProcessInfo.processInfo.environment["AWS_SWIFT_SDK_S3TM_USE_LOCAL_DEPS"] != nil
if useLocalDeps {
return [
.package(path: smithySwiftLocal),
.package(path: awsSDKSwiftLocal)
]
} else {
return [
.package(url: smithySwiftGitURL, from: "0.146.0"),
.package(url: awsSDKSwiftGitURL, from: "1.5.0")
]
}
}